MATLAB: How can i get no of white pixels in a binary image

white pixels

help me to extract code;. this is my image i converted it to binary.

Best Answer

The color image you show has very few white pixels.
If you have converted it to binary then
number_of_white_pixels = nnz(TheBinaryImage);