Skeltrack: A Free Software library for skeleton tracking (GUADEC 2012)


Published on

By Joaquim Rocha.

With the release of the Kinect device, there was finally an affordable camera capable of giving depth information. This, together with the Kinect's open USB connection, led to a lot of innovative projects.

Still, the Kinect just gives raw signals and the only way to obtain more complex information, such as skeleton tracking was to use either the Microsoft SDK or the OpenNI framework. Both of these solutions are closed, proprietary and, in the case of Microsoft's, only for non-commercial work.

To solve the issue above, Igalia developed Skeltrack, a Free and Open Source library published under LGPL that performs human skeleton tracking and identifies a number of skeleton joints.
It is a more atomic solution than the other commercial counterparts because it does not connect directly to the Kinect nor to any other depth camera, instead it expects to be given the buffer corresponding to the depth buffer.

In this talk Joaquim will present how Skeltrack was developed and show a demo of it working.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Skeltrack: A Free Software library for skeleton tracking (GUADEC 2012)

  1. 1. Skeltrack - Open Source Skeleton Tracking Joaquim Rocha, Igalia GUADEC 2012 - A Coruña
  2. 2. Igalia's Interactivity Team was on to investigate immersive applications using FOSS
  3. 3. These applications represent new/different ways of interaction for users
  4. 4. Those can go from entertainment to more serious applications
  5. 5. The Kinect
  6. 6. Microsoft's Kinect was the first camera with a price affordable to the public
  7. 7. The USB connection is open and thus hackable
  8. 8. This originated Open Source projects like the libfreenect, a library to control the Kinect device and get its information
  9. 9. We created a GLib wrapper for libfreenect called GFreenect
  10. 10. GFreenect offers asynchronous functions (and some synchronous as well) and makes it easy to use with other GNOME technologies
  11. 11. GObject Introspection opens these technologies for users of Python, Javascript, Vala, etc.
  12. 12. The Kinect has a structured light camera which gives depth information
  13. 13. But that's raw information... values from 0-2048
  14. 14. libfreenect/GFreenect can give those values in mm
  15. 15. Still...
  16. 16. It does NOT tell you there is a person in the picture
  17. 17. Or a cow
  18. 18. Or a monkey
  19. 19. Let alone a skeleton and where its joints are!
  20. 20. For this you need a skeleton tracking solution
  21. 21. Skeleton Tracking
  22. 22. Three proprietary/closed solutions exist:
  23. 23. Microsoft Kinect SDK: non-commercial only
  24. 24. OpenNI: commercial compatible
  25. 25. Kinect for Windows: commercial use allowed but incompatible with the XBox's Kinect
  26. 26. Conclusion: There were no Free solutions to perform skeleton tracking... :(
  27. 27. So Igalia built one!
  28. 28. Enter Skeltrack
  29. 29. What we wanted: ✩ A shared library, no fancy SDK ✩ Modular (do one thing) ✩ Device independent ✩ No pattern matching, no databases ✩ Easy to use (everybody wants that!)
  30. 30. Not as easy as it sounds!
  31. 31. The current version tracks up to 7 joints: ✩ Head; ✩ Shoulders; ✩ Elbows; ✩ Hands.
  32. 32. Smoothing is implemented using Holt's Double Exponential formulas
  33. 33. Smoothing and heuristics used can be tweaked using GObject properties
  34. 34. There are still some things missing...
  35. 35. Future work
  36. 36. Hands from elbows: If one of the extremas is an elbow, we need to infer where the hand is
  37. 37. Robustness: Use restrictions to ignore objects that are not the user
  38. 38. Multi-user: Track more than one person at a time
  39. 39. And of course, get the rest of the joints: hips, knees, etc.
  40. 40. How to use it?
  41. 41. First reduce the depth buffer's dimension Reducing the buffer's dimension will make things faster
  42. 42. While at it, it's wise to also apply a depth threshold
  43. 43. Asynchronous API
  44. 44. SkeltrackSkeleton *skeleton = SKELTRACK_SKELETON (skeltrack_skeleton_new ()); skeltrack_skeleton_track_joints (skeleton, depth_buffer, buffer_width, buffer_height, NULL, on_track_joints, NULL);
  45. 45. Synchronous API
  46. 46. SkeltrackJointList list; list = skeltrack_skeleton_track_joints_sync (skeleton, depth_buffer, buffer_width, buffer_height, NULL, NULL);
  47. 47. Skeleton Joint: ID: HEAD, LEFT_ELBOW, RIGHT_HAND, ... x: X coordinate in real world (in mm) y: Y coordinate in real world (in mm) screen_x: X coordinate in the screen (in pixels) screen_y: Y coordinate in the screen (in pixels)
  48. 48. Join us!
  49. 49. Nifty Tools for Development: GFreenect: GFreenect Utils:
  50. 50. GFreenect Python Example
  51. 51. Tool: depth-file-viewer
  52. 52. Tool: record-depth-file
  53. 53. Demo? Warning: Might go wrong!
  54. 54. Questions?
  55. 55. Creative Commons pictures from flickr: Kinect: Monkey: nothingtosay Kid Playing: Rob Welsh Skeleton: Dark Botxy Other non CC images: Doctor: Minority Report: