Date: Nov 25, 2012 10:27 PM
Author: MarryPopins
Subject: How can I find the covariance between two images?

I have used the following code for this. Please let me know if I am doing it right.

im1 = rgb2gray(im1);
im2 = rgb2gray(im2);

im1 = double(im1);
im2 = double(im2);

cov(im1(:) im2(:))