find out the orientation, length and radius of curved rectangular object

조회 수: 1 (최근 30일)
Tai-Yen Chen
Tai-Yen Chen 2012년 7월 18일
I have a image as shown as fig.1.I am trying to fit this binary image with a curved rectangular (fig.2)to figure out:
1. the orientation (the angle between the long axis and the horizontal axis of the curved rectangle)
2. the length (l) and radius (R) of the object. What is the best way to do it?
My very naive idea is using least square fit to fit the boundary of the object and find out these information. However it turns out there is no equation for capped rectangle. In matlab there is a function called rectangle can create the capped rectangle perfectly however it seems just for the plot purpose and can not be implanted into the least square fit. Any help or clue is greatly appreciated.
Thanks for the help.

답변 (2개)

Ryan
Ryan 2012년 7월 19일
Have you looked at MF regionprops()?
  댓글 수: 2
Walter Roberson
Walter Roberson 2012년 7월 19일
That can give major and minor axes, and eccentricity equivalent to an ellipse, but an ellipse is not what is desired in this situation.
Tai-Yen Chen
Tai-Yen Chen 2012년 7월 19일
Yes, Walter is right. I do check the regionprops but did not meet my purpose.

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


Image Analyst
Image Analyst 2012년 7월 19일
편집: Image Analyst 2012년 7월 19일
John D'Errico's File Exchange http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A679 has a minimum bounding rectangle function http://www.mathworks.com/matlabcentral/fileexchange/34767-a-suite-of-minimal-bounding-objects. The rectangle can be at any angle. I think this should give you what you want, or close enough (especially considering the very low resolution of your image).
  댓글 수: 1
Tai-Yen Chen
Tai-Yen Chen 2012년 7월 19일
Hi image Analyst, This is indeed a great start. But just out of curiosity, if I do have a high resolution image, will you have other suggestion on solving this issue?

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

카테고리

Help CenterFile Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by