{"id":84,"date":"2006-09-07T11:31:57","date_gmt":"2006-09-07T15:31:57","guid":{"rendered":"https:\/\/blogs.mathworks.com\/steve\/?p=84"},"modified":"2019-10-22T16:25:54","modified_gmt":"2019-10-22T20:25:54","slug":"use-makehgtform-for-3-d-rotation","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/steve\/2006\/09\/07\/use-makehgtform-for-3-d-rotation\/","title":{"rendered":"Use makehgtform for 3-D rotation"},"content":{"rendered":"<p>\r\nDeveloper Mike G. read my <a href=\"https:\/\/blogs.mathworks.com\/steve\/?p=79\">recent post about three-dimensional image rotation<\/a> and suggested that users might want to use the MATLAB function <tt>makehgtform<\/tt> to construct the affine transform matrix. It has some convenient syntaxes.\r\n<\/p>\r\n\r\n<p>\r\nAs an alternative to the code I posted, Mike says you could do something like this:\r\n<\/p>\r\n\r\n<pre>\r\n  T = makehgtform('translate',blob_center,...\r\n                   'yrotate',pi\/8,...\r\n                   'translate',-blob_center);\r\n  T = T';\r\n<\/pre>\r\n\r\n<p>\r\n(The transposition step is necessary to satisfy the convention used in the Image Processing Toolbox functions.)\r\n<\/p>\r\n\r\n<p>\r\nThanks, Mike - I didn't know about that one.\r\n<\/p>\r\n","protected":false},"excerpt":{"rendered":"<p>\r\nDeveloper 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... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/steve\/2006\/09\/07\/use-makehgtform-for-3-d-rotation\/\">read more >><\/a><\/p>","protected":false},"author":42,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[10],"tags":[244],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/84"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/users\/42"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/comments?post=84"}],"version-history":[{"count":1,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/84\/revisions"}],"predecessor-version":[{"id":2679,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/posts\/84\/revisions\/2679"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/media?parent=84"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/categories?post=84"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/steve\/wp-json\/wp\/v2\/tags?post=84"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}