imrotate - clockwise or counterclockwise ?

I observed that imrotate rotates images clockwise instead of counterclockwise, as indicated in the doc.

2 件のコメント

Andreas Goser
Andreas Goser 2011 年 2 月 25 日
I have difficulties to post this as an answer - so doing a "comment".
I modified the example from the doc to see the direction more obvious:
I = fitsread('solarspectra.fts');
I = mat2gray(I);
J = imrotate(I,45,'bilinear','crop');
figure, imshow(I)
figure, imshow(J)
Figure 2 is rotated counterclockwise for me.
David Young
David Young 2011 年 2 月 25 日
I also find it rotates the image anticlockwise. (That's the local word for counterclockwise.)

サインインしてコメントする。

回答 (1 件)

Dan
Dan 2011 年 2 月 25 日

1 投票

Sorry for my remark. I plot images of matrices, and I use Ydir in a 'normal' way. So the rotation is inverted. Thank you for your posts.

1 件のコメント

David Young
David Young 2011 年 2 月 25 日
Yes, but it's not your mistake: the help for imrotate should state which coordinate system it is assuming.

サインインしてコメントする。

タグ

質問済み:

Dan
2011 年 2 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by