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