How to count image binary
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
mohd akmal masud
am 30 Jul. 2019
Bearbeitet: KALYAN ACHARJYA
am 31 Jul. 2019
Hi all
if i have binary image, how to calculate the white pixel, and black pixel?
5 Kommentare
Adam Danz
am 31 Jul. 2019
Do you mean you want to calculate the location of a single white pixel? Or you want to determine if a given coordinate is a white pixel? Maybe a picture will help.
Akzeptierte Antwort
KALYAN ACHARJYA
am 31 Jul. 2019
Bearbeitet: KALYAN ACHARJYA
am 31 Jul. 2019
Let's say input binary image is image_bw
result=bwareafilt(image_bw,1,'Largest');
count_w=sum(result);
fprintf('The white pixel count is: %d',count_w);
0 Kommentare
Weitere Antworten (0)
Siehe auch
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!