Adjust regionprops orientation in order to get 360 degree value.
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I have a point at an end of an ellipse that I am considering the 'head' and I want to get the "orientation" of this ellipse from 0-360 degrees with the head point facing directly up as 0 degrees. I understand that the Orientation field in regionprops works on the X axis from 0 to -90 degrees. How can I adjust this information to fit my goal.
2 commentaires
Matt J
le 12 Sep 2019
I want to get the "orientation" of this ellipse from 0-360 degrees
I assume you really mean 0-180.
Réponses (1)
Matt J
le 12 Sep 2019
Modifié(e) : Matt J
le 12 Sep 2019
theta = 90-Orientation
assuming theta increases clockwise.
1 commentaire
KAE
le 12 Sep 2019
Modifié(e) : KAE
le 12 Sep 2019
The angle definition of regionprops orientation can trip you up. In Matlab all images have the y-axis reversed, so y=0 is at the image top. The angle is defined to be CCW from the x-axis to the shape's main axis, when seen with the y-axis reversed. Just a cautionary note which is not spelled out in the documentation page for regionprops.
Voir également
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!