Adjust regionprops orientation in order to get 360 degree value.
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Matt J
el 12 de Sept. de 2019
I want to get the "orientation" of this ellipse from 0-360 degrees
I assume you really mean 0-180.
Respuestas (1)
Matt J
el 12 de Sept. de 2019
Editada: Matt J
el 12 de Sept. de 2019
theta = 90-Orientation
assuming theta increases clockwise.
1 comentario
KAE
el 12 de Sept. de 2019
Editada: KAE
el 12 de Sept. de 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.
Ver también
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!