[SciPy-User] how to interpret scipy.signal.correlate2d
David Baddeley
david_baddeley@yahoo.com...
Mon Sep 10 17:00:33 CDT 2012
If you want to find out which _regions_ of images are similar then standard correlation is the wrong tool - it tells you how similar the entire images are at different relative shifts. The simplest test of regional similarity would be to subtract the mean from each image and then multiply them - regions with a high positive value are similar, those with a negative value are different. I suspect that this might work better if you smoothed the product image with a kernel of a size similar to the expected size of matching regions so you get a local average correlation. You might also want to do some form of normalisation if you want to then look at significance, or objectively compare results between different sets of images.
What correlate2d is doing is taking this product, and then taking the sum over all pixels, for all possible relative shifts between the two images.
cheers,
David
________________________________
From: Davide Cittaro <daweonline@gmail.com>
To: SciPy Users List <scipy-user@scipy.org>
Sent: Tuesday, 11 September 2012 12:42 AM
Subject: [SciPy-User] how to interpret scipy.signal.correlate2d
Hi all,
I would like to correlate two square matrices (same dimensions) with scipy.signal.correlate2d but I have some doubt on interpretation of results. In particular, I have a matrix A=(M, N) and another b=(m, n), when I apply correlate2d(A, b) I obtain a new matrix c=(M+m, N+n). What is the meaning of each element in the new matrix c?
I'm trying to find out which regions of two images are similar.
Thanks
d
---
Davide Cittaro
daweonline@gmail.com
http://sites.google.com/site/davidecittaro/
_______________________________________________
SciPy-User mailing list
SciPy-User@scipy.org
http://mail.scipy.org/mailman/listinfo/scipy-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/scipy-user/attachments/20120910/fd7dc625/attachment.html
More information about the SciPy-User
mailing list