Having fun with Qt and Kinect

Like so many others I bought a Xbox Kinect a couple of months ago. I think I had only like three or four gaming sessions with it before forgetting the whole thing. Recently my interest in graphics stuff has been on the rise again (my interests are clearly cyclic web, graphics programming, FPGAs, other electronics, audio programming , mobile programming, photography, travelling, mountains, staring at an empty wall – add one more a year, drop one, rinse and repeat) and decided to pick up the Kinect from gathering dust.

So here’s a quick thingy I made (with Qt of course) last night:

The shortness and occasional bad framerate of the video are because of the capture tool.

I’ve got all sorts of wacky ideas I can implement with the Kinect, so more stuff coming later.

This entry was posted in Programming and tagged , , . Bookmark the permalink.

4 Responses to Having fun with Qt and Kinect

  1. George says:

    Hi, I am a Qt enthusiast and I’ve been thinking about buying a kinect device to do some hacking, and looking over the internet found your video that combines both things. Loved that but you haven’t shared what you used to do that. Did you made your own wrapper of libfreenect, or you used some Qt/C++ wrapper already done?

    • Juha Turunen says:


      setting it up was pretty easy. There’s some instructions here on compiling the libfreenect (on Windows). It seems to compile fine with the mingw that ships with with QtSDK (or at least I think it used it – I have another mingw installation on my system too, but they’re probably pretty much the same). All you need to do is download the libusb binary (put the dll somewhere in your PATH and the libusb.a to \lib and the headers to \include of the mingw installation you’re using) and get CMAKE. You don’t really need GLUT or pthreads unless you want to compile the examples (you can get prebuilt binaries of those from the web if you just want to play around with them). After building it just copy the end products to the right places (just like libusb).

      And yes I made a quick Qt wrapper for the libfreenect. All it does is starts a new thread, changes the wrappers thread affinity to it, runs the libfreenect eventloop (see the glview demo source) in it and emits signals when there are new frames available from the camera. The signals get automagically converted to events for the main thread’s (which does the rendering) eventloop by Qt. Easy peasy.

      Sorry no public source right now, because the code is a bit messy and I’m too pedantic to put it on public display If you need help getting it working drop me an email.

  2. Mina says:

    Hello Juha,

    I am fairly new to Qt, and I also just picked me up a Kinect just to tinker with it and hoping to integrate it in a couple of Qt Apps. I was wondering if you have any tips for getting started to get Qt and Kinect to play nice using the libfreenect or OpenNI & NITE.



  3. Hello there, You’ve performed a fantastic job. I’ll definitely digg it and individually suggest to my friends. I’m sure they will be benefited from this web site.

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>