1 | initial version |
Basically you want two steps for this
For the first item, you can simply use the Viola&Jones platform, which is available in OpenCV, and which can be easily adapted to match your needs. More info on this link:
Once you have detected the region you can go to psosible directions
First approach is possible by applying an abstract representation of the image (eigenFaces, fisherFaces, ...) creating a unique representation of each mood and fitting a codebook featurevector to it. Then match vectors using a distance measure to find the best match.
Interesting links for you
Second approach asks more reading of papers, google on face landmarks. Try to use the eye and mouth models of openCV to detect them inside the face region, ... This will work alot better, but will be more challenging to implement.