フィルターのクリア

Count of total pixels and dimensions(rows and columns) of a picture?

8 ビュー (過去 30 日間)
Mara Pereira
Mara Pereira 2022 年 3 月 16 日
コメント済み: Davide Masiello 2022 年 3 月 16 日
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
  3 件のコメント
Image Analyst
Image Analyst 2022 年 3 月 16 日
image is a built-in function. It's best to choose another name, like grayImage.
Davide Masiello
Davide Masiello 2022 年 3 月 16 日
@Image Analyst thanks! I changed it.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeRead, 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