Measuring similarity between two very similar pictures I know similar questions have already been asked, but as I understand, little differences in my goal make a difference on a decision on which algorithm to use. As I am a total novice in this area, I am asking which algorithm would be best for measuring the similarity of two very similar images - e.g. two photos of faces which were taken from the same angle and are grayscale. Basically, this algorithm would need to quantify the difference or similarity of these two very similar pictures.

What software can I use to do that? Basically, I need something that inputs 2 pictures and then produces a number which tells me how different/similar they are. 

EDITED: Picture examples 

Hey something as similar as these two pictures  and . And which software can be used for these analyses?
This measure really depends on how your images look like. A very basic thing would be the calculate the point-wise difference between both images and summing them up. The smaller this value is, the more equal they are. Possibly, you can perform some Gaussian Smoothing and contrast equalization before. But, that's really depending on the images.