How can I rotate a figure in an image according to its principal axis?
5 views (last 30 days)
Show older comments
Jehiel Santos
on 24 Sep 2014
Answered: Image Analyst
on 24 Sep 2014
Good day!
I have read some papers that indicates that as part of their image pre-processing, specifically the image with the hand pattern, they rotate the images first. As for example, the papers would indicate that the image in Figure A will be rotated to look like Figure B but they do not indicate the necessary steps on how to do it. They just simply mentioned that they are rotated according to its principal axis. How will I be able to rotate the images to Figure B even if the hand is oriented in different manner than Figure A? Thank you very much!
0 Comments
Accepted Answer
Image Analyst
on 24 Sep 2014
I have code to do exactly that posted in my Answer http://www.mathworks.com/matlabcentral/answers/154523#answer_151500. Take a look at the code and plug in your image name.
0 Comments
More Answers (1)
Sean de Wolski
on 24 Sep 2014
Use regionprops to find the _'orientation'_and imrotate to rotate it with this information
doc regionprops
doc imrotate
0 Comments
See Also
Categories
Find more on Geometric Transformation and Image Registration 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!