about image pixel rotate

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

Réponses (1)

Matt J
Matt J le 30 Mai 2013

2 votes

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).'

Question posée :

UTA
le 30 Mai 2013

Community Treasure Hunt

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

Start Hunting!

Translated by