count how many pixel has value 255 in an image

5 views (last 30 days)
The image cameraman, how can we find how many pixel has value of 255? Please help me

Accepted Answer

KALYAN ACHARJYA
KALYAN ACHARJYA on 16 Feb 2022
Edited: KALYAN ACHARJYA on 16 Feb 2022
data=GrayImage==255;
total_pix=sum(data(:))
  4 Comments
Tu Nguyen
Tu Nguyen on 16 Feb 2022
Thank you, I just use the cameraman as an example. Thank a lot

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!