필터 지우기
필터 지우기

How to find object perimeter/bounding box perimeter?

조회 수: 1 (최근 30일)
Dominic
Dominic 2017년 8월 13일
댓글: Image Analyst 2018년 1월 6일
Can some one please provide me a code that finds a ratio between object perimeter and bounding box perimeter:
ratio = object perimeter / bounding box perimeter
  댓글 수: 2
KSSV
KSSV 2017년 8월 13일
What data you have?
Dominic
Dominic 2017년 8월 13일
I have five blobs in a binary image.
Now i want to divide the perimeter of blobs by their corresponding bounding box perimeter.

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

채택된 답변

Image Analyst
Image Analyst 2017년 8월 13일
  댓글 수: 5
sana trimeche
sana trimeche 2018년 1월 6일
the widths = X max - X Min then widths= bb(3:4:end)- bb(1:4:end); NO ?
Image Analyst
Image Analyst 2018년 1월 6일
No. Why do you think bb(3) is the x max value? You can tell whomever told you that, that they're wrong because you and I can both read regionprops and see that "the vector [ul_corner width], ul_corner specifies the upper-left corner of the bounding box in the form [x y z ...]. width specifies the width of the bounding box along each dimension in the form [x_width y_width ...]"
So bb is [xLeft, yTop, xWidth, yHeight].

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

추가 답변 (0개)

Community Treasure Hunt

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

Start Hunting!

Translated by