matejak / imreg_dft

Image registration using discrete Fourier transform.
Other
245 stars 68 forks source link

sample PNGs for LargeTemplate [tiling] example do not open with Pillow 7.2 #39

Open dregula opened 3 years ago

dregula commented 3 years ago

Thanks for this fascinating and useful code. I was perplexed when attempting to run the LargeTemplate [tiling] example, always getting an out-of-range error. imread was dropped from scipy.misc after v1.2, so I tried: forcing a scipy version < 1.2, using imageio.imread (as suggested in the SciPy documentation), and cv2.imread. I finally realized that all of these attempts resulted in an all-zero numpy-array after opening resources/examples/tiling/big.png and small.png I am an imaging novice, so I converted those sample images to a white background and the Large Template example went perfectly as expected (I think the sample PNGs have a transparent background, alpha?) Not entirely sure what module is actually loading these PNG images, but I am using Pillow 7.2 Would it be possible to update the imreg_dft repository to include sample PNGs with a white background under resources/examples/tiling? Thank you in advance!