From: Jun on
Why normxcorr2 function is much faster than xcorr2 function for processing two images? From my understanding, normxcorrs needs even more computations?

Thanks for any help!

JS
From: David Young on
I don't have the Signal Processing Toolbox, so I can't be sure, but one possibility is that it is because normxcorr2 makes use of the FFT if it is going to be faster. Perhaps xcorr2 stays in the spatial domain for all sizes of array.

If you are concerned to make correlation/convolution go quickly, you may care to check out this file exchange submission: http://www.mathworks.com/matlabcentral/fileexchange/22619-fast-2-d-convolution . It uses a very different trick to speed the process up.
From: Jun on
"David Young" <d.s.young.notthisbit(a)sussex.ac.uk> wrote in message <ho3ltk$4mh$1(a)fred.mathworks.com>...
> I don't have the Signal Processing Toolbox, so I can't be sure, but one possibility is that it is because normxcorr2 makes use of the FFT if it is going to be faster. Perhaps xcorr2 stays in the spatial domain for all sizes of array.
>
> If you are concerned to make correlation/convolution go quickly, you may care to check out this file exchange submission: http://www.mathworks.com/matlabcentral/fileexchange/22619-fast-2-d-convolution . It uses a very different trick to speed the process up.

Thanks.

Yes. The FFT apparoach can quickly get the cross-correlation. I have tested ifft2 and fft2 for this use.

JS