Drawing Our First Point Cloud

OK. Now that we’re oriented, it’s time to get back to the Kinect. We’re going to access the Kinect’s data as a set of 3D points so we can draw them in our sketch. The code for doing this will be similar in some ways to the code we’ve written in the past that accessed the Kinect’s pixels, but it will be simpler. In that old code, we asked SimpleOpenNI for the depth values, and it gave them to us as a simple array of integers. We then had to translate from that one-dimensional array of depth values into x- and y- positions on screen.

This time, though, we’re going to ask SimpleOpenNI for something more sophisticated. In addition to the simple array of depth values, SimpleOpenNI can give us the Kinect’s data as a set ...

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.