face rotation (angle)

Hello

im trying to detect face rotation with haarfinder ,

so far i can get rectangles with no rotation (zero degrees)

I’ve tested by using right/left eyes to find the rotation but this doesnt seems very stable,

what would be the simpler way to detect this rotation ?

maybe opencv has this implemented but ofxOpenCv wraper dont ?

thanks in advance.

hi

still lookig for a solution,
i’ve found some examples by using eyes detection im trying similar configurations for haarfinder.

could someone suggest one example with face angle detection feature ?

if you have an example un-rotated face you can use camshift to determine the face orientation.

but in general, the easiest solution is to rotate your image for each orientation you want to check, in 10-15 degree intervals. that’s what we did for ‘the portrait machine’:

i’ve just uploaded an addon i’ve been using lately, is based on the MPT library which could also be used to detect smiles and blinks although that code is not there yet. Anyway, i’m using the position of the eyes to calculate the rotation of the face, although it’s a little slower than haar cascade.

The face size is a little unstable, there’s some super simple filtering code inside the class but it’s commented cause in the end i’ve used some kalman filters from outside the addon.

https://github.com/arturoc/ofxMPT

Cool

im giving it a try to both camshift and your code Arturo.

Gracias .