Rotate binary object around its centroid

Hi, I have a small problem. I am trying to rotate image in 2D but around custom axis. I mean, I have a centroid of binary object and now I want to rotate it but around that centroid point. Can somebody help me?

 采纳的回答

Try using imtranslate() or circshift() to shift the centroid to the middle, then call imrotate(), then shift back to the original location. Otherwise, just use the rotation matrix (see Wikipedia).

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Geometric Transformation and Image Registration 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by