matejak / imreg_dft

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

Image is shifted out of frame #37

Open jlshin opened 4 years ago

jlshin commented 4 years ago

https://github.com/matejak/imreg_dft/blob/3eb7137403dd0689711ff1dae78200b0fbdcedfb/src/imreg_dft/imreg.py#L566-L570

I ran into an issue where the shift applied dest0 shifted my image out of the frame resulting in a registered image that appears cropped. I moved lines 566-7 to after line 570 so that the shift operates on the dest variable after it has been embedded into the new background. Although this solution worked for my example, I am unsure if it will work in general.