Count of total pixels and dimensions(rows and columns) of a picture?
8 次查看(过去 30 天)
显示 更早的评论
How do I obtain the number of pixels and the dimensions of this picture?
0 个评论
采纳的回答
Davide Masiello
2022-3-16
编辑:Davide Masiello
2022-3-16
grayImage = imread('retina.jpg');
numberOfPixels = numel(grayImage)
[rows,cols] = size(grayImage)
3 个评论
Image Analyst
2022-3-16
image is a built-in function. It's best to choose another name, like grayImage.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Read, Write, and Modify Image 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!