Uncertanity in counting the number of a pixel in a binary image
Show older comments
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 Comments
Rik
on 31 Oct 2017
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
on 31 Oct 2017
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.
Accepted Answer
More Answers (0)
Categories
Find more on Image Segmentation and Analysis in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!