about image pixel rotate

4 views (last 30 days)
UTA
UTA on 30 May 2013
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

Answers (1)

Matt J
Matt J on 30 May 2013
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).'

Categories

Find more on Image Processing and Computer Vision in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!