Issue with using imrotate to determine the location of a pixle after rotating an image
Afficher commentaires plus anciens
Hello,
I am trying to simply rotate an array by some angle theta, and then determine the location of one particular value after rotation. I started out by imaging a 1024 by 1024 array. Then I used [a,b] = guinput(1) to pick a point on the image. Next I rotated my image by some random angle. Now I want to find the location of the pixel I choose previously on my newly rotated image. For this I simply produced a 1024 by 1024 matrix "Z" of zeros and set the point Z(a,b) = 1. I used the same imrotate(Z,theta) to rotate my zero's matrix, and I used find(rotated Z == 1) to find the location of rotated pixel. However, this does not work all the time. Every so often, when I rotate my zeros matrix, the pixel with a value of 1 disappears. I am lost to why this occurs, and how to prevent this from occurring. If anyone can give me a little insight onto how to correct for this I would be very appreciative.
Thanks, Eric
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Geometric Transformation and Image Registration dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!