about image pixel rotate

조회 수: 2 (최근 30일)
UTA
UTA 2013년 5월 30일
Hi everyone,
I use 'imrotate' function to rotate a image, the rotate degree is theta, however, how can I get the location of fix points,let's say (x,y), after image rotated.
Thanks

답변 (1개)

Matt J
Matt J 2013년 5월 30일
Apply a rotation matrix,
R=@(theta) [cosd(t), -sind(t); sind(t), cosd(t)];
c=size(image)/2+1/2;
newpoint = R(theta)*([x,y]-c).'

카테고리

Help CenterFile Exchange에서 Image Processing and Computer Vision에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by