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?

采纳的回答

Davide Masiello
Davide Masiello 2022-3-16
编辑:Davide Masiello 2022-3-16
grayImage = imread('retina.jpg');
numberOfPixels = numel(grayImage)
numberOfPixels = 1879445
[rows,cols] = size(grayImage)
rows = 1357
cols = 1385

更多回答(0 个)

类别

Help CenterFile 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!

Translated by