필터 지우기
필터 지우기

How to Rotate an image about center vertical axis?

조회 수: 3 (최근 30일)
JAI PRAKASH
JAI PRAKASH 2018년 5월 30일
답변: Image Analyst 2018년 5월 30일
Hello I am using Image Processing Toolbox. How to Rotate an image about center vertical axis?
Ofcourse the new pixels in the rotated image would be black ;p Thanks

채택된 답변

Guillaume
Guillaume 2018년 5월 30일
Remember that a images are 2D constructs. They don't have a 3rd dimension and therefore can't be rotated in a 3rd dimension. What you're asking is to simulate the concept of rotating a 2D surface in a 3d space. The actual transformation that simulate that is not a rotation, but a projection. This is achieved by using imwarp with a projective2d transformation (which you can create a number of different ways), e.g.:
tform = projective2d([1 -0.1 0.001; 0 1 0; 0 0 1]);
newimage = imwarp(yourimage, tform);
imshowpair(yourimage, newimage, 'montage');

추가 답변 (2개)

Image Analyst
Image Analyst 2018년 5월 30일

Image Analyst
Image Analyst 2018년 5월 30일
Did you try the rotation icon in the toolbar of the figure? Then use the File Menu to tell it to generate code.

카테고리

Help CenterFile Exchange에서 Point Cloud Processing에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by