See

OpenCV C++ - Facial Features Recognizer

Recognizes facial features such as gender, age and emotion.

OpenCV Python - Emotion Detection

Train and predict human emotions using OpenCV in python.