Rotate Axes with 2Dimage

Hi i'm currently working on Axes rotate task, i set image for axes and its fine. Now i need to rotate the axes for particular degree. how to do this?

1 comentario

Kevin Chng
Kevin Chng el 7 de Sept. de 2018
Editada: Kevin Chng el 7 de Sept. de 2018
You may rotate the image instead of the axes
B = imrotate(A,angle)
or refers to the documentation below

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 7 de Sept. de 2018

1 voto

You can create a hgtranform and parent the axes to that transform. Then you create a transformation matrix and apply it against the hgtransform . maketform() is useful for creating the transformation matrix.
Note: if you rotate an image out of the x/y plane even a little, it will mostly disappear almost immediately, leaving only lines for the edges. This is because in MATLAB, image objects are 2D not 3D, so they have no thickness. If you need to be able to rotate an image out of the x/y plane then you can use texture mapping. The warp() function can be useful for this purpose.

Categorías

Preguntada:

el 6 de Sept. de 2018

Respondida:

el 7 de Sept. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by