hello i have some binary image i found the orientation and rotated the image
stats1 = regionprops(bw,'Orientation','Area');
bwRot=imrotate(bw,-stats1.Orientation);
after finding some interesting pixels i want to find their locations in the original image i create the matrix and try to rotate back but recive negative coordinates any help ,,
You need to call imrotate with the 'crop' option to preserve the size of the input image.
As for the negative xy, it is possible for a rotation to bring points in/out of the image field of view. That's the whole reason why imrotate has the 'crop' option to begin with.
Be mindful as well that imrotate's origin of rotation is at the center of the image. However, the BoundingBox coordinates are relative to an origin at the upper left corner of the image.
No se puede completar la acción debido a los cambios realizados en la página. Vuelva a cargar la página para ver el estado actualizado.
Translated by
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.