How to count image binary
조회 수: 3 (최근 30일)
이전 댓글 표시
Hi all
if i have binary image, how to calculate the white pixel, and black pixel?
댓글 수: 5
Adam Danz
2019년 7월 31일
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.
채택된 답변
KALYAN ACHARJYA
2019년 7월 31일
편집: KALYAN ACHARJYA
2019년 7월 31일
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
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!