Normalised cross correlation

Tony Yu tsyu80 at gmail.com
Fri Mar 30 10:27:15 EDT 2012


On Fri, Mar 30, 2012 at 9:55 AM, Tony Yu <tsyu80 at gmail.com> wrote:

>
>
> 2012/3/27 Stéfan van der Walt <stefan at sun.ac.za>
>
>> On Mon, Mar 26, 2012 at 6:36 PM, Tony Yu <tsyu80 at gmail.com> wrote:
>> > Thanks for checking. What do you mean by "correct position in the
>> > correlation"?
>>
>> It looked like you took the result of np.correlate, and then
>> normalized those coefficients.  I wasn't sure (didn't verify) whether
>> the normalization was computed for the correct position in the
>> np.correlate result.
>>
>
> Yes, you're correct---not sure why I was confused by before.
>
>
>> > Hmm, I was under the impression that half-template matches would be
>> > appropriately penalized.
>>
>> That explanation seems reasonable--such behaviour seems totally sane.
>>
>> Stéfan
>>
>
>
> I added some commits to the template PR<https://github.com/scikits-image/scikits-image/pull/100>.
> I changed the interface: `pad_output` is replaced by `pad_input`, which
> defaults to False. When True, the input image is padded with a border that
> is half the template dimensions on each side, and the padding value is the
> image mean, as Mike suggested. Note that this function still does not
> produce results similar to Matlab's; no one made the case for it, so I left
> it out (and as Stefan pointed out: the user can manually pad the input if
> such a result is desired). Are people happy with this interface?
>
> I added a simpler example plot<https://github.com/scikits-image/scikits-image/pull/100/files#diff-0>to the gallery, but there should probably only be a single example.
> Personally, I prefer the simpler plot. (The more complex plot<https://github.com/scikits-image/scikits-image/pull/100/files#diff-1>,
> however, is more "realistic" since it has noise and uses a peak detector.)
> Any objections to removing the complex plot?
>
> -Tony
>

Actually, I decided I like this third
example<https://github.com/scikits-image/scikits-image/pull/100/files#diff-2>better.
(I'm just trying to see how many commits I can get into this PR
before it's closed.)

-Tony
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/scikit-image/attachments/20120330/b218b5f7/attachment.html>


More information about the scikit-image mailing list