[Insight-users] NormalizedCorrelationImageFilter producing infinity?
David Doria
daviddoria at gmail.com
Tue Sep 20 19:09:39 EDT 2011
I am trying to make a demo of NormalizedCorrelationImageFilter with a mask:
http://www.itk.org/Wiki/ITK/Examples/Broken/Images/NormalizedCorrelationImageFilterMasked
Without a mask, if I create two images that are a translation of one
another, the resulting maximum correlation value is 1 and the offset
is exactly the index of the maximum (minus the patch radius). However,
even before I got to trying the masked correlation, I ran into a
problem. I created the same translated image, but this time set the
value under the soon-to-be masked region to 122 (the images were
previously binary with values 0 and 255). I expected the resulting
correlation value to be some value less than 1, and for the index of
the maximum to be essentially arbitrary. However, the result I get is
infinity:
Maximum location fixed: [25, -25]
Maximum value: inf
You can reproduce this by commenting/uncommenting this line:
FillRegion(image2, maskRegion, 122);
Can anyone explain why the correlation value would ever be infinity?
Thanks,
David
More information about the Insight-users
mailing list