The main drawback of using the PrimeSense Java wrappers is their lack
of documentation. As I explain in chapter 1, I had to decompile the
libraries' JAR files, and work out the correspondences between the Java
source and the somewhat better documented C++ OpenNI/NITE APIs. This is
why including "secrets" in the book's title isn't too excessive :).
This book covers programming topics not found elsewhere. I start
off with the basics, with chapters on depth, infrared, and RGB
imaging, point clouds, skeletal user tracking, hand tracking, and gesture
support. Moving beyond that, I look at several novel and unusual features,
Controls for the Kinect motor, LED, and accelerometer, which aren't part
of the standard OpenNI API. In fact, their absence is often held up as a
serious drawback of the API. It's actually quite easy to add these capabilities
using a custom-built USB driver.
3D graphics programming in the point cloud and skeletal tracking examples,
using Java 3D.
A computer vision chapter which explains how to link the Kinect to the
popular (and powerful)
Early (sometimes very early) draft versions of KOPS's
chapters can be downloaded from here (see the links below).
All the book's code is here, downloadable on
a chapter-by-chapter basis from each chapter's page, or as a single
zip file (576 KB).
I'll also be adding new chapters here; chapters which
don't appear in the book.
If you're looking for Killer Game Programming in Java
then it's here.
What this Book is Not About
I'm concentrating on the Kinect without including chapters explaining
OOP concepts such as classes, objects, and inheritance.
This is not a book for first-time Java programmers.
More importantly, I don't have the space to seriously explain the topics
of 3D graphics or computer vision. I introduce them (in the form of Java 3D
and JavaCV) in enough detail so that you can understand my examples, but
there are worlds of material which I don't mention. When I get to these topics,
I'll suggest books and websites where you can find more information.
Two installation guides for Ubuntu (a great Linux distro):
Last updated 27th September 2012:
Added Chapter 2.1. on charting the depth map.
All the code from the book as a single
zip file (576 KB).
This doesn't include extra chapters, such as chapter 14, which don't appear
in the book.
Powerpoint slides from JavaOne 2012 (14.1 MB).
These don't include the demo videos I used during the talk, otherwise the
file size would go up to 1.4 GB!!. I included examples on finger
detection, augmented reality, and emperor tracking, which aren't on this
website yet, but will be added as soon as I have time.
If you want to see a VIDEO of my talk, which includes all the demos,
along with my dulcet voice commentary, then visit the
CON3400 - Kinect Open Source Programming Secrets: Hacking with OpenNI, NITE, and Java.
Click the link in the "Media" section in the right-hand sidebar.