Use makehgtform for 3-D rotation
Developer Mike G. read my recent post about three-dimensional image rotation and suggested that users might want to use the MATLAB function makehgtform to construct the affine transform matrix. It has some convenient syntaxes.
As an alternative to the code I posted, Mike says you could do something like this:
T = makehgtform('translate',blob_center,... 'yrotate',pi/8,... 'translate',-blob_center); T = T';
(The transposition step is necessary to satisfy the convention used in the Image Processing Toolbox functions.)
Thanks, Mike - I didn't know about that one.
- Category:
- Spatial transforms
Comments
To leave a comment, please click here to sign in to your MathWorks Account or create a new one.