Drawing undistorted point cloud with jit.openni

Dec 6, 2013 at 7:31am

Drawing undistorted point cloud with jit.openni

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:

<code>

– Pasted Max Patch, click to expand. –

</code>

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!

http://jts3k.com/other/miscellany/curved_walls.png

Any thoughts would be most appreciated!

#274955
Dec 6, 2013 at 11:29am

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.

#274975
Dec 6, 2013 at 12:04pm

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?

#274982
Dec 6, 2013 at 2:19pm

PCL can be one resource for you http://pointclouds.org/

#274990

You must be logged in to reply to this topic.