Neglecting Edge Errors in FFT Cross Correlation Results

I have been using the sitk FFTNormalizedCrossCorrelation function to match the smaller image to its “best” location in the larger image.

My results at the moment are indicating that the best match is at the edge (shown in red), but in reality, the best match is where the green circle has been placed.

Is there a way to neglect the edge data when determining the FFT maxima (aka best location)?? Or is there some sort of edge settings that I need to change?

I also tried using the MaskedFFT version of this function, and got similar issues again.

Thank you!

I fixed this issue by changing to use the MaskedFFTNormalizedCrossCorrelation method, and setting the overlapping fraction to 0.5

1 Like

Hello,

The SimpleITK FFTNormailizedCrossCorrelation method current has requiredNumberOfOverlappingPixels parameter. This can be used similarly when the size of the images is known. It was an oversight that the similar fractional overlap parameter was not included. A PR was just merged to add RequiredFractionOfOverlappingPixels.

1 Like