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?

 Akzeptierte Antwort

Image Analyst
Image Analyst am 24 Mär. 2017

1 Stimme

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).

Weitere Antworten (0)

Kategorien

Community Treasure Hunt

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

Start Hunting!

Translated by