I am trying to calculate perimeter of regions in binary image using matlab. I am using the following code:
perimeter_stats = regionprops(binary_image,'Perimeter');
The problem is in the results. The image contains large regions but the calculated perimeter is small (e.g. 3.2092). Can anyone help me in getting the right values of perimeter?
Well you did something wrong. I doubt that the mean of allPerimeter is 3.2092 pixels. Why don't you list what allPerimeter is so I can see it. I would think that the minimum a perimeter could be is 1 pixel, but it's typically in the hundreds or thousands, not 3 unless your binary image is just a single dot.
Play games and win prizes!Learn more