필터 지우기
필터 지우기

image rotation along x and y axis using bilinear interpolation

조회 수: 5 (최근 30일)
Kritika
Kritika 2015년 2월 4일
댓글: Kritika 2015년 2월 5일
I am rotating the image by theta1 along x axis and theta2 along y axis using the mapping equation: f(x,y)=f([cos(theta1)*x+sin(theta1)*y]/cos(theta1-theta2),[-sin(theta2)*x+cos(theta2)*y]/cos(theta1-theta2)). Now I am facing two problems here: 1. if theta1 and theta2 are taken different then image gets cropped. So, how to set the size of output that no matter what you take as theta1 and theta2, the complete image is obtained. 2. How to re-rotate the above result to get the intial image again using bilinear interpolation.
I am enclosing the code, Please do help me.

답변 (1개)

Image Analyst
Image Analyst 2015년 2월 4일
Why reinvent the wheel? Just use imresize(). It has a bilinear option.
  댓글 수: 5
Image Analyst
Image Analyst 2015년 2월 5일
rotatedImage = imrotate(originalImage, 30); % Rotate 30 degrees.
Kritika
Kritika 2015년 2월 5일
I got it, but what if I have to rotate y axis with different angle?

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

카테고리

Help CenterFile Exchange에서 Geometric Transformation and Image Registration에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by