Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to find the correlation between two images

I need some help in trying to figure out something. I currently a python script which generates two images using the imshow method in matplotlib. My task is to find the correlation between these two images, or in other words the similarity between the two images. Both images are the same size and both use the jet colormap.
Let me know if this is clear enough or if i need to explain in more detail. It would be helpful if someone could provide an example code of how to do this.

like image 812
user1750948 Avatar asked Mar 03 '13 23:03

user1750948


1 Answers

Have you looked at the scipy signal processing kit?

from scipy import signal
cor = signal.correlate2d (im1, im2)

will calculate the 2D correlation for you.

like image 131
lxop Avatar answered Oct 02 '22 22:10

lxop