Calculating perimeter of regions in binary image using matlab

조회 수: 3 (최근 30일)
Safaa
Safaa 2012년 12월 5일
Hi all:
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');
allPerimeter= [perimeter_stats.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?
Regards,
Safaa

채택된 답변

Image Analyst
Image Analyst 2012년 12월 5일
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.
  댓글 수: 5
Safaa
Safaa 2012년 12월 8일
Many thanks for your clarification
Image Analyst
Image Analyst 2012년 12월 9일
So did that answer your question? Are you ready to mark this as "Answered", or is it still not solved for you?

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by