1 | initial version |
Something you could do is apply the viola&jones framework to detect the face and the eyes using the provided cascades in the data folder. Then once you know the eyes bounding boxes, you can calculate a rotation to get them at the same height, then apply translation to your images in order to place all eye regions on the same level.
I have read that isn't the best approach around, but I have used it and it worked. Have done it in C++ but I guess the functionality will be available in python also, since the same libraries are actually used.
Just be sure that your python environment is configured correctly, meaning the correct includes and linker options are set, and that your system has the correct PATH variables added.
Link of the C++ tutorial: http://docs.opencv.org/doc/tutorials/objdetect/cascade_classifier/cascade_classifier.html#cascade-classifier
Cheers