Thursday, February 16, 2012

Colored Point Clouds from Kinect

Here's how to use your Kinect as a chintzy laser scanner and capture a point cloud of your own self or your own stuff!

There were a few things on the internet about getting colorless point clouds, and then a preview of a book on Google books that had an image of some code... so retyped that code and hacked some things together to get a pretty simple point cloud capturing program.

Live Processing application with code and kinect display


What you'll need:
  1. Processing (http://processing.org/)
  2. OpenNI and the Processing wrapper for OpenNI called SimpleOpenNI (http://code.google.com/p/simple-openni/ and installation instructions: http://code.google.com/p/simple-openni/wiki/Installation)
  3. This Processing code: http://www.cs.washington.edu/homes/ktuite/colored_point_cloud.pde
After you capture some point clouds (by pressing 'p' and then finding kinect_output.ply) you could go get PointCraft (http://photocitygame.com/pointcraft/) and use that to view and make geometry out of your point cloud.

Point cloud from Kinect loaded into PointCraft!

I feel the slightest bit bad for copying code from a preview of a book that is actually for sale and stuff (this one here: http://books.google.com/books?id=xJOxrWzJ5iUC) but the SimpleOpenNI examples were completely missing and all it really says is "omg you can use this function called alternativeViewPointDepthToImage() to get the depth image and the colored image from the kinect to line up!"

1 comment:

  1. This comment has been removed by a blog administrator.

    ReplyDelete