Count of total pixels and dimensions(rows and columns) of a picture?
8 views (last 30 days)
Show older comments
Mara Pereira
on 16 Mar 2022
Commented: Davide Masiello
on 16 Mar 2022
How do I obtain the number of pixels and the dimensions of this picture?
0 Comments
Accepted Answer
Davide Masiello
on 16 Mar 2022
Edited: Davide Masiello
on 16 Mar 2022
grayImage = imread('retina.jpg');
numberOfPixels = numel(grayImage)
[rows,cols] = size(grayImage)
3 Comments
Image Analyst
on 16 Mar 2022
image is a built-in function. It's best to choose another name, like grayImage.
More Answers (0)
See Also
Categories
Find more on Read, Write, and Modify Image in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!