I need to implement cross-correlation of 2 images in C++. The process is unclear to me since i do not seem to find a definite formula for it.
What i thought this means:
- FFT2 on both images
- multiply them: FFT2(IMG1)*conj(FFT2(IMG2))
- IFFT2 on the output
I seem to get another version each time, thus confusing me, and i need to know which is the correct method so that i can proceed with the implementation.
Unfortunately i can not use libs that could help me with that either. So i am a bit at a loss here.
– user3253067 Jan 02 '23 at 10:50ifftshiftand its open-source implementations. For even-length 1D sequences it's just swapping left and right halves. For 2D, first apply on every row (or col) of the 2D input, then col (or row). – OverLordGoldDragon Jan 02 '23 at 10:54