How to rotate an image about a corner point?
조회 수: 2 (최근 30일)
이전 댓글 표시
We have an image in rectangular shape which is tilted.We have found the corner points and now we want to rotate the rectangular image about one of its corner points.We want the image in horizontal position.Thank you in advance...
댓글 수: 0
답변 (2개)
venkat vasu
2012년 8월 4일
help imrotate B = imrotate(A,ANGLE) rotates image A by ANGLE degrees in a counterclockwise direction around its center point. To rotate the image clockwise, specify a negative value for ANGLE. imrotate makes the output image B large enough to contain the entire rotated image. imrotate uses nearest neighbor interpolation, setting the values of pixels in B that are outside the rotated image to 0 (zero).
Example
-------
% This example brings image I into horizontal alignment by
% rotating the image by -1 degree.
I = fitsread('solarspectra.fts');
I = mat2gray(I);
J = imrotate(I,-1,'bilinear','crop');
figure, imshow(I), figure, imshow(J)
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 3-D Scene Control에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!