What is wrong with my code to align images?
I have a folder containing images (PNG) of brain slices. I want to write a script that rotates the images, so that the brain slice are all aligned in the same direction. I have written the following code that, uses scikit-image’s phase_cross_correlation, and I have chosen three example images that all have the correct alignment. The code saves the new aligned png files in a new folder, but when I looked at the images, they were mostly completely blank or only had a bit of the brain in the image. Here is my code:
What is wrong with my code to align images?
I have a folder containing images (PNG) of brain slices. I want to write a script that rotates the images, so that the brain slice are all aligned in the same direction. I have written the following code that, uses scikit-image’s phase_cross_correlation, and I have chosen three example images that all have the correct alignment. The code saves the new aligned png files in a new folder, but when I looked at the images, they were mostly completely blank or only had a bit of the brain in the image. Here is my code: