Steve on Image Processing with MATLAB

Image processing concepts, algorithms, and MATLAB

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.

|
  • print

评论

要发表评论,请点击 此处 登录到您的 MathWorks 帐户或创建一个新帐户。