I am developing a C++ application for face authentication. First, I have to detect the face and pre-process the image.
Can't you then use another Haar classifier to find each eye (eyes are very easy to find) then assuming the person has two eyes and we define a 'level' face to mean the eyes are horizontal.
Simply measure the anlge between the two eyes and rotate the image by that angle.
angle = atan ( eye1.Y - eye2.Y ) / (eye1.X - eye2.X )