MATLAB: Finding pixels having a specific intensity value

intensity

Hi, I want to find the pixels or the infinitesimal areas having an intensity value of 255 in a grayscaled image and calculate the area they occupy in the image. Can anyone help me?

Best Answer

To "find the pixels", as in getting the rows and columns where they live , do this:
[rows, columns] = find(grayImage == 255);
To get the area in pixels, use the formula like Walter gave.
Related Question