Drawing undistorted point cloud with jit.openni

    Dec 06 2013 | 3:31 pm
    Hi All,
    I'm interested in using diablodale's lovely jit.openni object to draw point clouds from a Kinect. I have a working patch but it seems that I need a method for undistorting the depth field:
    Does anyone have a working example that draws an undistorted point cloud using jit.openni?
    I'm familiar with dtr's handy methods for undistorting the depth field produced by jit.freenect.grab - but I was not able to easily translate those techniques. I thought that undistorting was not needed with jit.openni, but perhaps I am missing something.
    Here is a screenshot showing what my patch currently produces - curved walls, ceilings, etc. - lovely to look at, but inaccurate!
    Any thoughts would be most appreciated!

    • Dec 06 2013 | 7:29 pm
      Just use dp.kinect. It can output point clouds automatically. If you are on Macintosh, however...
      The data that is returned from jit.openni is undistorted. All of the math is done by OpenNI to give you real world x, y, z in millimeters in joints. And in the depthmap, the Z is undistorted, but the X and Y are in screen/pixel space and need to be transformed into real-world X, Y.
      jit.freenect.grab returned distorted data and needed code to derive x, y, and z from its depthmap. This exact same code can't be used on jit.openni because its z data isn't distorted.
    • Dec 06 2013 | 8:04 pm
      Thanks Dale! Alas, I am working on a Mac. Can you point me towards any examples for transforming the XY space to real-world XY?
    • Dec 06 2013 | 10:19 pm
      PCL can be one resource for you http://pointclouds.org/