how to find the number of pixels in the white region of a binary image
18 views (last 30 days)
Raghav on 3 Jul 2022
Edited: Jan on 3 Jul 2022
Hi @Rah Ul
As white pixels have a value=1 (and black pixels' value=0), doing sum of pixel values can return the total number of white pixels in the binary image. If Image is stored in "Im", you can write the expression:
If you want to find the area of object formed by white pixels, use the function - bwarea().
To understand more about bwarea(), refer to the link that I am attaching below: