フィルターのクリア

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