Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Skeltrack - Open Source Skeleton Tracking
Search
Joaquim Rocha
May 26, 2012
Programming
0
180
Skeltrack - Open Source Skeleton Tracking
Presentation of Skeltrack -- the only Open Source library for skeleton tracking.
Joaquim Rocha
May 26, 2012
Tweet
Share
More Decks by Joaquim Rocha
See All by Joaquim Rocha
Git: Best Practices
jrocha
3
3.8k
Skeltrack: Open Source Skeleton Tracking
jrocha
1
190
OCRFeeder: OCR Made Easy on GNOME
jrocha
1
320
Introduction to Django
jrocha
5
3.8k
Skeltrack: Open Source Skeleton Tracking
jrocha
1
3k
Other Decks in Programming
See All in Programming
AI駆動のマルチエージェントによる業務フロー自動化の設計と実践
h_okkah
0
190
Google Agent Development Kit でLINE Botを作ってみた
ymd65536
2
260
なぜ適用するか、移行して理解するClean Architecture 〜構造を超えて設計を継承する〜 / Why Apply, Migrate and Understand Clean Architecture - Inherit Design Beyond Structure
seike460
PRO
3
780
明示と暗黙 ー PHPとGoの インターフェイスの違いを知る
shimabox
2
580
チームのテスト力を総合的に鍛えて品質、スピード、レジリエンスを共立させる/Testing approach that improves quality, speed, and resilience
goyoki
5
990
PHP 8.4の新機能「プロパティフック」から学ぶオブジェクト指向設計とリスコフの置換原則
kentaroutakeda
2
990
CDK引数設計道場100本ノック
badmintoncryer
1
240
ご注文の差分はこちらですか? 〜 AWS CDK のいろいろな差分検出と安全なデプロイ
konokenj
3
370
Webの外へ飛び出せ NativePHPが切り拓くPHPの未来
takuyakatsusa
2
570
新メンバーも今日から大活躍!SREが支えるスケールし続ける組織のオンボーディング
honmarkhunt
5
8k
Git Sync を超える!OSS で実現する CDK Pull 型デプロイ / Deploying CDK with PipeCD in Pull-style
tkikuc
3
150
生成AI時代のコンポーネントライブラリの作り方
touyou
1
250
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
140
7k
Being A Developer After 40
akosma
90
590k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
How to Ace a Technical Interview
jacobian
278
23k
Measuring & Analyzing Core Web Vitals
bluesmoon
7
510
RailsConf 2023
tenderlove
30
1.1k
StorybookのUI Testing Handbookを読んだ
zakiyama
30
5.9k
BBQ
matthewcrist
89
9.7k
The Power of CSS Pseudo Elements
geoffreycrofte
77
5.9k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.6k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
Transcript
Skeltrack - Open Source Skeleton Tracking Joaquim Rocha, Igalia LinuxTag
2012 - Wunderbare Berlin
Guten Tag! ✩ I am a developer at Igalia ✩
I like doing innovative stuff like OCRFeeder and SeriesFinale ✩ and today I am presenting my latest project: Skeltrack
The Kinect
Microsoft's Kinect was the first camera with a price affordable
to the public
The USB connection is open and thus hackable
This originated Open Source projects like the libfreenect, a library
to control the Kinect device and get its information
We created a GLib wrapper for libfreenect called GFreenect
GFreenect offers asynchronous functions (and some synchronous as well) and
makes it easy to use with other GNOME technologies
GObject Introspection = free bindings (Python, Javascript, Vala)
Kinect has a structured light camera which gives depth information
But that's raw information... values from 0-2048
libfreenect/GFreenect can give those values in mm
None
Still...
It does NOT tell you there is a person in
the picture
Or a cow
Or an ampelmann
Let alone a skeleton and where its joints are
For this you need a skeleton tracking solution
Three proprietary/closed solutions exist:
Microsoft Kinect SDK: non-commercial only
OpenNI: commercial compatible
Kinect for Windows: commercial use allowed but incompatible with the
XBox's Kinect
None
Conclusion: There were no Free solutions to perform skeleton tracking...
:(
So Igalia built one!
Enter Skeltrack
What we wanted: ✩ A shared library, no fancy SDK
✩ Device independent ✩ No pattern matching, no databases ✩ Easy to use (everybody wants that!)
Not as easy as it sounds!
After some investigation we found Andreas Baak's paper "A Data-Driven
Approach for Real-Time Full Body Pose Reconstruction from a Depth Camera"
However this paper uses a database of poses to get
what the user is doing
So we based only part of our work on it
How does it work?
First we need to find the extremas
Make a graph whose nodes are the depth pixels
Connect two nodes if the distance is less than a
certain value
Connect the different graph's components by using connected-component labeling
Choose a starting point and calculate Dijkstra to each point
of the graph; choose the furthest point. There you got your extrema!
Then create an edge between the starting point and the
current extrema point with 0 cost and repeat the same process now using the current extrema as a starting point.
This comes from Baak's paper and the difference starts here:
choosing the starting point
Baak chooses a centroid as the starting point We choose
the bottom-most point starting from the centroid (this showed better results for the upper body extremas)
So we got ourselves some extremas! What to do with
them?
What extrema is a hand, a head, a shoulder?
For that we use educated guesses...
We calculate 3 extremas
Then we check each of them hoping they are the
head
How?
For each extrema we look for the points in places
where the shoulders should be, checking their distances between the extrema and between each other.
If they obey those rules then we assume they are
the head'n'shoulders (tm)
With the remaining 2 extremas, we will try to see
if they are elbows or hands
How to do it?
Calculate Dijkstra from the shoulders to each extrema
The closest extrema to any of the shoulders is either
a hand of an elbow of that shoulder
How to check if it's a hand or an elbow?
If the distance between the extrema and the shoulder is
less than a predefined value, then it is an elbow. Otherwise it is a hand.
If it is a hand, we find the elbow by
choosing the first point (in the path we created with Dijkstra before) whose distance exceeds the elbow distance mentioned before
None
There is still some things missing...
Future work
Hands from elbows: If one of the extremas is an
elbow, we need to infer where the hand is
Smoothing: Smooth the jittering of the joints
Robustness: Use restrictions to ignore objects that are not the
user
Multi-user: Track more than one person at a time
And of course, get the rest of the joints: hips,
knees, etc.
How to use it?
Asynchronous API
SkeltrackSkeleton *skeleton = SKELTRACK_SKELETON (skeltrack_skeleton_new ()); skeltrack_skeleton_track_joints (skeleton, depth_buffer, buffer_width,
buffer_height, NULL, on_track_joints, NULL);
None
Synchronous API
SkeltrackJointList list; list = skeltrack_skeleton_track_joints_sync (skeleton, depth_buffer, buffer_width, buffer_height, NULL,
NULL);
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)
Code/Bugs: https://github.com/joaquimrocha/Skeltrack
Nifty Tools for Development: GFreenect: https://github.com/elima/GFreenect GFreenect Utils: https://github.com/joaquimrocha/gfreenect-utils
GFreenect Python Example
Tool: record-depth-file
Tool: depth-file-viewer
Questions?
Creative Commons pictures from flickr: Kinect: Auxo.co.kr Ampelmann: echiner1 Kid
Playing: Rob Welsh Skeleton: Dark Botxy