Question about regionprops3 'Orientation' angles / origin
Show older comments
I want to find out the spatial orientation of an object in a 3D image stack. For this, I am using regionprops3 of the Image Processing Toolbox. However the "order" of x-y-z angles confuses me, as the description sais "The angles are based on the right-hand rule. regionprops3 interprets the angles by looking at the origin along the x-, y-, and z-axis representing roll, pitch, and yaw respectively." Does this mean, the origin is at the lower front right corner of my image stack?
So my question is, can someone please help me translate the x-y-z angles into my image stack coordinate system, where the origin is at the top-left corner, y/rows goes down, x/columns to the right and z/pages "towards you"? As far as I figured, the "x" angle of regionprops seems to refer to what's my "Z"? Thanks a lot.
1 Comment
Hello Matlab
on 6 Jul 2018
Edited: Hello Matlab
on 20 Jul 2018
Accepted Answer
More Answers (1)
KARSH THARYANI
on 21 Jun 2018
Edited: KARSH THARYANI
on 21 Jun 2018
0 votes
The co-ordinate system based on your description is not right handed. If your x is towards the left and increasing, the y is increasing downwards then, z must be normally-inwards to the page.
Nonetheless, when you created a 3-D array it is assumed that the origin is the top left corner, the x is increasing in the column number, and y is increasing in the row number and z is the inward dimension or the stack number increasing inwards(like I said).
The document says that the roll-pitch-yaw rotations correspond to the rotations along the x-axis, y-axis and z-axis respectively and in that order. For Euler rotations the order of rotations matters because given same rotation magnitudes two different order rotations will result in a different orientation. I hope that cleared your doubt regarding axis conventions.
Also, counter-clockwise rotations are considered to be positive according to the function.
1 Comment
Hello Matlab
on 22 Jun 2018
Edited: Hello Matlab
on 22 Jun 2018
Categories
Find more on Image Arithmetic in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!