about image pixel rotate

1 回表示 (過去 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 Center および File ExchangeImage 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