Image comparison using MATLAB
You can borrow from techniques used by the image stitching community, where they have to deal with registering translated and rotated images. Your mistake was that you calculated the correlation before finding the optimal translation. The Wikipedia article should give you enough information to help yourself.

Mathematica Example

First, I split the picture above into frame1.png and frame2.png. Then I shifted the second one to align with the first, and trimmed both to retain their intersection. Finally, I compute the correlation coefficient by flattening the matrix into a vector.

img1 = ColorConvert[Import["frame1.png"], "Grayscale"]
img2 = ColorConvert[Import["frame2.png"], "Grayscale"]
im2t = ImageAlign[img1, img2, "Transformation" -&gt; "Translation"]
imgtr = FindGeometricTransform[img1, img2, "Transformation" -&gt; "Translation"]
{trx, try} = Part[TransformationMatrix@Last@imgtr, {1, 2}, 3]
{trim1, trim2} = ImageTake[#, {1, Floor@try}, {1, Floor@trx}] &amp; /@ {img1, im2t}
{cimg1, cimg2} = Flatten@First@ImageData[#, "Interleaving" -&gt; False] &amp; /@ {trim1, trim2};
Correlation[cimg1, cimg2]


The result I got was 0.967834, indicating a close match. If necessary I would have considered scaling and rotation to better align the images but it was not necessary here.

Here is a MATLAB example.