Why is imrotate not rotating an image about its center point?
古いコメントを表示
Based on imrotate documentation, it rotates the image around its center point. If so why do I get the following result when I rotate my initial image I2D (256x256)to get I2DT? The dot is the center point in the original image. Shouldn't be at the same location? I have found the transformation matrix between the original and the rotated image using imregform. Even though I only applied rotation there is still a translation between the two images. The first two elements of the 3rd row in transformation matrix are nowhere near zero.

I have also tried to rotate the original image with imrotate having the 'crop' option on. This is the result:

Now it looks like the image is rotating about the center point, but the transformation matrix (found using imregform) indicates that there is still some translation. How could this be?
Please help! I'm very confused.
Thank you.
Bahar
2 件のコメント
Walter Roberson
2015 年 5 月 6 日
We need to see your code.
Bahar
2015 年 5 月 6 日
編集済み: Image Analyst
2015 年 5 月 6 日
採用された回答
その他の回答 (1 件)
Walter Roberson
2015 年 5 月 8 日
1 投票
imrotate() without 'crop' produces a large result array unless the angle is a multiple of 90 degrees. imshowpair() applied to two images of different size pads the bottom right of the smaller matrix with 0's so they can both be shown. The mismatch of center points on the graph is an artifact of the way you are displaying the images.
I do not currently have an explanation for why you see a translation when you rotate with crop. What is your output Tmatrix ?
1 件のコメント
Bahar
2015 年 5 月 8 日
編集済み: Walter Roberson
2015 年 5 月 8 日
カテゴリ
ヘルプ センター および File Exchange で Read, Write, and Modify Image についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!