Red dots = Left Eye Center (L), Right Eye Center (R), Mouth Center (M)
Purple Line = Line LR
Red Line = Horizontal line intersecting midpoint of L and R
Yellow Line = Vertical Line intersecting LR at M.x
Blue Line(s) = LM and RM
Green Line = Distance between X-Coordinates of L and R
Given this data, is it possible to determine the yaw, pitch and roll of a face?
All I have so far is the roll:
Roll = the angular difference between the left and right eye
Knowing that L, R and M all move relative to each other, it should be possible to calculate yaw and pitch in 2D space right?
My first thought was that yaw could be calculated as a ratio of the X coordinate of M relative to the distance of the x-coords of LR (The green line)
Any thoughts?
note: I'm using opencv
There is a function called solvePnP which can compute translation and rotation of an object from cameras coordinates system. You need 3D model of the said object, which is 3D positions of points on the object, and find these points on the picture.
Without the outline of the face, and without knowing the size of the eyes or mouth, there are a multitude of orientations that are duplicates. It seems like it should work, because our mind so easily uses those extra indicators to recognize and interpret facial movement and gestures.
If you are bored you can try it out! Take a dry-erase marker with you into your bathroom. Orient your face in some odd combination and mark your eye and mouth centers on the mirror. Now move your face into other twists and turns that keep your eyes and mouth in the same position.
One quick one is to rotate your head 45 degrees to the left. Mark your eyes/mouth positions, then rotate your head to where it is 45 degrees to the right, but move your whole head a half a head to the left. You should be able to line the marks up there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With