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

Kevin Chng
Kevin Chng 2018년 9월 7일
편집: Kevin Chng 2018년 9월 7일
You may rotate the image instead of the axes
B = imrotate(A,angle)
or refers to the documentation below

댓글을 달려면 로그인하십시오.

답변 (1개)

Walter Roberson
Walter Roberson 2018년 9월 7일

1 개 추천

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.

카테고리

도움말 센터File Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

질문:

2018년 9월 6일

답변:

2018년 9월 7일

Community Treasure Hunt

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

Start Hunting!

Translated by