Re: Normalised cross correlation
Hi Tony On Sat, Mar 24, 2012 at 4:03 PM, Tony Yu <tsyu80@gmail.com> wrote:
zero, but round-off errors are causing it to go negative. If that's the case, then it's an easy fix to check that the argument is positive, but someone should check my math to make sure the the code matches the equation.
I checked the paper vs your code, and the code looks correct. The only thing I didn't check was whether the normalization was done on the correct position in the correlation.
Padding *the input* sounds like a good idea, but I think it should be done in such a way that the output is (M, N)---i.e. same size as the input image. I'm not a huge fan of the Matlab output size (but maybe some people expect this output?).
If the user wants to pad the input, they should probably do that themselves beforehand. Half-template matches feel sketchy (and where do you stop: when at least half the template matches?). Also, with the new proposed padding in numpy, this should become a lot easier. Stéfan
participants (1)
-
Stéfan van der Walt