Pubblicato da: Pedro | maggio 11, 2008

OpenCV and compiz head tracking

OpenCV is, If you don’t still known it, a library for computer vision purpose in real time. This library allows you to quickly execute complicated algoritms such as face recogniction.

My interest to this library begin when i saw the videos from the Wiimote wizard Johnny Lee.

This researcher has studied a system to realize a virtual 3d desktop system using the IR camera of the wiimote controller (the bluetooth controller of the Nintendo Wii game console).

This video will explain you all in the clearer way:

My idea is to use the embedded webcam of my (and probably yours) laptop to do the same thing. But for do that i really need to recognize faces and/or IR dots registering the distance and the position of the head.

Use of the head tracking is quite impossible due to the high use of CPU time of the alghoritm (~300mS on my T7200 system), but using a pair of glasses with IR sources at the end we can strongly reduce the complexity of the problem allowing a real time operation.

First experiments has showed me that most of webcams are sensible to IR light. Shielding the visible part of the spectrum with a magnetic taper from a VHS turns the webcam into a great IR detector, like the wiimote.

In the meanwhile the compiz fusion plugin “wiitrack” uses the Lee’s code to manipulate the desktop cube with wiimote, showing us a possible future use of the trick.

I think that, with a simple integration with this pair of projects, will give us a way to obtain a cheap head tracking system for VR 3D desktop system on our Linux Box.

Too mutch ambitious?



  1. Hi Pedro!
    It’s a nice video, but you should have tried more with the headtracking solution.
    You mght be interested in this:
    Best regards,

  2. Amazing, it’s exatly what i mean!
    I’m going to checkout and compile your code!


Inserisci i tuoi dati qui sotto o clicca su un'icona per effettuare l'accesso:


Stai commentando usando il tuo account Chiudi sessione /  Modifica )

Google+ photo

Stai commentando usando il tuo account Google+. Chiudi sessione /  Modifica )

Foto Twitter

Stai commentando usando il tuo account Twitter. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )


Connessione a %s...


%d blogger hanno fatto clic su Mi Piace per questo: