Why is imrotate not rotating an image about its center point?
Mostra commenti meno recenti
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 Commenti
Walter Roberson
il 6 Mag 2015
We need to see your code.
Bahar
il 6 Mag 2015
Modificato: Image Analyst
il 6 Mag 2015
Risposta accettata
Più risposte (1)
Walter Roberson
il 8 Mag 2015
1 voto
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 Commento
Bahar
il 8 Mag 2015
Modificato: Walter Roberson
il 8 Mag 2015
Categorie
Scopri di più su Read, Write, and Modify Image in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!