image = | fastCrossCorrelation3dImg (inImg3d,inTemplateImg) |
3D Cross correlation calculated in the Fourier domain
This algorithm computes the three dimensional Cross-Correlation (CC) between an image and a template
. To speed up the process, the calculation is performed in the frequency domain as follows :
Where is the configate of
,
represents the Fourier transform of an image
,
is the local mean intensity of the input image in the neighbourhood defined by the template,
is the template global mean intensity and
the inverse Fourier tranform.
The algorithm needs 4 working images with Real32 data to compute the Fourier transforms. If the template image is smaller than the reference image, it is padded before calculating its Fourier transform and two additional working images are used to store the padded template image.
Please, note that the results are not strictly identical to the Normalized Cross-Correlation 2d (NCC) and the maximum of the CC is located at the origin of the template whereas it is located at the template center coordinates for the NCC.
A 2d example of CC result is available at Normalized Cross-Correlation 2d.