[ITK] [ITK Community] Speeding up Cross Correlation
Arjun S Kumar
arjun89 at cmu.edu
Fri Nov 21 13:18:41 EST 2014
Hi all,
I am trying to cross correlate two images such that the output image displays the similarity of the first image and the second image as a function of the translation of the second image.
Currently, I'm using the itk::FFTNormalizedCorrelationImageFilter class. However, only a small portion, close to the center, of the output image is relevant for me. For example, for two images of sizes 500x500, the output image is about 1000x1000. However, I only need a 50x50 portion of the output image, centered at the center of the output image.
So my question is, can I use this fact to perform the cross correlation faster? I tried using the SetRequiredNumberOfOverlappingPixels method to discard regions outside the 50x50 portion of the image but this didn't have a discernible effect on the speed of the operation. Shouldn't setting the required number of overlapping pixels to a high number decrease the time needed by reducing the domain of the output image?
Is there a different way to manually set the size of the output image so that the computation is made faster? Can I change the requested region of the output image, just as we can do for input images?
Are there other ITK classes that are more suited for this purpose. Does anybody recommend using neighborhood iterators? The problem I see with this is using a 500x500 neighborhood, which is too high isn't it?
Please let me know.
Thanks,
Arjun
More information about the Community
mailing list