Hi all
if i have binary image, how to calculate the white pixel, and black pixel?

댓글 수: 5

darova
darova 2019년 7월 30일
5Capture.PNG
Adam Danz
Adam Danz 2019년 7월 30일
Ha! Funny response, darova.
mohd akmal masud
mohd akmal masud 2019년 7월 31일
sorry, im newbie in matlab.
i want to calculate the white pixel in some location. i have row and colom
Adam Danz
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.
mohd akmal masud
mohd akmal masud 2019년 7월 31일
Untitled.jpg
Hi Adam, i want to calculate no of white pixel in red circle. let say the area row is 100-130, column 110-140. Please help me

댓글을 달려면 로그인하십시오.

 채택된 답변

KALYAN ACHARJYA
KALYAN ACHARJYA 2019년 7월 31일
편집: KALYAN ACHARJYA 2019년 7월 31일

1 개 추천

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개)

카테고리

도움말 센터File Exchange에서 Images에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by