Kinect Headtracking with OSC Support

left: GEM Window, right: head pose estimation by G.Fanellibased on
Real Time Head Pose Estimation from Consumer Depth Cameras by Gabriele Fanelli [1]

download source and windows/OSX binaries:

Application that detects head position from a depth image provided by Microsoft Xbox Kinect Sensor in x,y,z and Euler Angles (pitch, yaw, roll) from multiple persons.

–> needs no calibration!!

Application sends data as OSC[2] Message in the format:

/head_pose [User_ID] [x] [y] [z] [pitch] [yaw] [roll]

all arguments are float, angles in degree, User_ID starting at zero.

* can detect angles about +-75° yaw, +-60° pitch and +-50° roll.

* #…/head_pose_estimation> ./head_pose_estimation_demo config.txt

example how to not show visualization and use custom ip and port for sending OSC Messages:

./head_pose_estimation_demo config.txt 0 1 8000

Default IP/Port:

* you can find an example puredata/GEM patch in the folder pd
to visualize the headtracking.

(C) 2011/2012 by Matthias Kronlachner

Ready to use Binaries for OSX (64 bit) and Windows (32 bit) are included.

Binary is included
Windows version is compiled for Microsoft Kinect SDK!!

* get and install OpenCV from
* get and install Microsoft Kinect SDK for Windows


* you need cmake, OpenCV, OpenNI, freeglut, and OpenGL libraries
for installing OpenNI follow this instructions:

* get liblo

* edit demo/CMakeLists.txt and adjust paths

* #…/head_pose_estimation/demo> cmake CMakeLists.txt
* #…/head_pose_estimation/demo> make

* #…/head_pose_estimation> ./head_pose_estimation_demo config.txt


* you will need XCode to compile the demo application for OSX

* follow instructions on
to install OpenNI

* get liblo

* get OpenCV, OpenGL, Glut through macports

* open the XCode Project in demo folder,
adjust path settings for Frameworks and build it.



  1. [1]
  2. [2]Open Sound Control (OSC) is a message based communication protocol for multimedia systems.

Leave a Reply

Your email address will not be published. Required fields are marked *

Spam protection: * Time limit is exhausted. Please reload CAPTCHA.