Object orientation calculation in image
10 views (last 30 days)
Show older comments
Hi,
I have an image which include a rectangular (I have attached the image)
and I would like to calculate the orientation angle of this rectangular relative to the x and y axes. I tried to use in 'Orientation' in "regionprops" command, but the result wasn't the correct angle relative to the x and y axes.
1. How can I recognize automatically only the rectangular ?
2. How can I calculate the angle between the rectangular and the axes?
Thanks, Itai
0 Comments
Answers (1)
Image Analyst
on 19 Mar 2017
First of all, can you get a better image, like with no clutter outside the rectangle and a contrasting background, not one that gets about as dark as the rectangle itself?
I'd start out by trying an edge detector like imgradient() or a texture filter like stdfilt(). Then use hough() or houghlines().
Since the camera axes were setup somewhat arbitrarily, why is it so important to get the angle of the rectangular block with respect to the edges of the image?
See Also
Categories
Find more on Image Segmentation and Analysis in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!