CV tools head tracking and rotations.

dust's picture

so here is a snow leopard composition where im using my trackball to infer rotation based on the haar classification system. im glad the haar patch is working woot woot.

if you align your head to be in the middle of the camera frame you will be able to control the 3d model much better with facial recognition. if you want the model to follow you around hook up the xy to the models position and offset the origins so the rotations don't get messed up. you can infer a pseudo z depth by interpolating the product of the width and height as well. its a bit jumpy so i tried to smooth things out.

actually this got me all excited that cv tools is working with snow leopard in 64. i'm actually re-building a haar kit for snow leopard. i guess open cv is still using carbon based methods which took a bit to figure out, i need to be using gcc+4.0 compiler not 4.2. so i got that sorted now i need to figure out how to get open mp running so i can compile a multi thread haar kit to take advantage of the core2duo+. maybe there is a way i can use open CL and the LLVM compiler to make a haar kit. i think that would be much faster.

anyways when i get a working kit finished or compiled for SL. i will share it so you can do rapid object detection and other recognition stuff other than just facial, maybe gender recognition, hand recognition. could be cool to take photos of everything in my house and build a iphone cv program to guide me through my house blindfolded, i guess i would need an iphone for that though.

anyways here is how you can use facial tracking to do rotations etc... there are other methods for doing this like using the distance between the eyes to calculate rotation as well.

headTracker.zip1.33 MB

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

okbye's picture
Re: CV tools head tracking and rotations.

Hi mate, I m not using the snow leopard so can you send me an screenshot of project? so i can make some rotation.

my problem is, X and Y coordinates changing too much and when you rotate your face a little, quartz lost your face for tracking..

i'm waiting a screenshot of this script, please anyone.

Thanks and sorry for bad English :/

dust's picture
Re: CV tools head tracking and rotations.

here are some screen shots. this doesn't do head tracking in a rotational since so its more pseudo its tracking you face and creating rotations from moving your face left and right in rotating. in which case if you rotate to much then there isn't anything to track seeing this is a front cascade. but you can use eye tracking instead where you can calculate rotation based on the distance to the eyes. in this case you want to use two independent eye cascades one for the right and one for the left so you can get an origin point for each eye. to get this working in leopard you will just have to make a macro from my quaternion trackball example in the repository. here are the screen shots. just take all the library patches from the trackball example and make them macro clips instead then use this screen shot to put together.