Accessing Joint Positions
When we last left draw
, we’d
successfully accessed our tracked user from the list of users provided
by OpenNI, but skeleton data was not yet available, so we were not able
to proceed. Now that we’ve finished calibrating our user, the tables
have turned—kinect.isTrackingSkeleton(userId)
will return
true and we’ll be able to enter the inner if
statement. From here on out, our job is to
actually use the skeleton data provided by OpenNI to build an
interface.
In this sketch, we’re going to create the simplest interface possible: a red dot that follows your right hand. Creating this interface will take three steps. First we have to get the position of the right hand from OpenNI. OpenNI will give us this position in “real-world” ...
Get Making Things See now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.