フィルターのクリア

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