필터 지우기
필터 지우기

Uncertanity in counting the number of a pixel in a binary image

조회 수: 2 (최근 30일)
Tala Hed
Tala Hed 2017년 10월 31일
답변: Image Analyst 2017년 11월 1일
I am trying to find the error in my measurement which is calculating the surface area of different objects.
Using "regionprops" I can count the number of black pixels (or 0) in a binary image. This number (I guess) depends on the threshold of the "im2bw" function. What happens to the pixels at the edge of the objects? Do they convert to 1 or 0? Is there a way to figure out how many edge pixels have not counted (which were supposed to be counted in reality) and how many are counted (which were not supposed to)? In short, I am trying to find the error in counting pixels! How many pixels are in a closed boundary in an image how many I get after I process the image!
Hope I am clear enough!
  댓글 수: 2
Rik
Rik 2017년 10월 31일
regionprops only works on binary data. This means that it indeed depends on the method you use to convert your image to binary. If edge pixels should have been counted, it sounds like you need to adjust the conversion.
Matt J
Matt J 2017년 10월 31일
Is there a way to figure out how many edge pixels have not counted (which were supposed to be counted in reality) and how many are counted (which were not supposed to)?
Only if you have ground truth prior knowledge of which pixels were supposed to be counted.

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

채택된 답변

Image Analyst
Image Analyst 2017년 11월 1일
"What happens to the pixels at the edge of the objects? Do they convert to 1 or 0?" That depends on if they were above or below the threshold. The threshold depends on the algorithm chosen and of course if the threshold changes, the number of white and black pixels in the binary image changes. Like Matt said, the only way to know if it's thresholding the image accurately is if you know for certain which way every pixel is supposed to be: 0 or 1. If you don't know that, then who's to say if it's right or wrong? No one.

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by