[SciPy-User] Template Matching via fftconvolve

Brandon Lerner lernerbrandon2@gmail....
Sun Feb 24 10:34:37 CST 2013

Hi all,

I've been trying to write a program that will find all matches of a smaller
image in a bigger image by using fftconvolve to do a normalized cross
correlation of  two differently sized 2D numpy arrays.

I've written a brute force pixel by pixel comparison that works but it is
way too slow for me to use. Any guidance to someone new at SciPy is
appreciated. After days of research, I've found some discussions about
this, but I can't figure out what to do next (look at attached code for an


Note: I've also found cv2 (cv2.templateMatch) or skimage(matchTemplate),
but I want to learn the math behind all of this.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20130224/c6368b57/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: templatematch.py
Type: application/octet-stream
Size: 2045 bytes
Desc: not available
Url : http://mail.scipy.org/pipermail/scipy-user/attachments/20130224/c6368b57/attachment.obj 

More information about the SciPy-User mailing list