1 | initial version |
The problem you face is "Facial expression recognition". Generally, each face image is represented as a feature vector resulted from a feature extraction algorithm, then a learning method might be used to eliminate redundant information and to reduce feature vector' length. In the classification phase, SVM can be used to determine the expression of the face. Thus, my suggestion for you is doing search with keyword to understand how to solve the problem more efficiently. Particularly on your question:
You can use metric function like Chi-Square (Histogram based features, like LBP or its variants), euclidean, or correlation distance to compute the similarities between images of different expressions.
The answer is depend on the images your have and the feature extraction algorithm you used, if any. And you need empirical experiments to see which one yields the highest accuracy. My suggestion is histogram equalization and retina filter, both are implemented in OpenCV (retina filter is in the opencv_contrib repo).