4

In my Kinect project, I'm trying to create a point cloud from a Kinect sensor. When displaying the 3D points, I'm getting a skewed model where the walls and floors are curved.

EDIT: I'm using Microsoft's Kinect SDK. This point cloud was generated with the sensor a feet or two away from the wall.

Kinect Example

user977198
  • 309
  • 2
  • 11
  • Provide a little more detail, like: whether you're using the "official" Kinect API or libkinect, and how far away the Kinect was from the walls. – Rahul Banerjee Apr 02 '13 at 01:58
  • I used Microsoft's SDK. The walls are about a foot or so away from the Kinect. – user977198 Apr 02 '13 at 02:53
  • Could you elaborate a bit on how you produce the x,y coordinates for the point clouds? Do you use distortion values of the IR sensor? – Sassa Apr 02 '13 at 03:06
  • This "barrel distortion" occurs at close ranges, only in the horizontal axis, and is an artifact of the way the Kinect works. For more detail, see page 35 of [this paper](http://repository.lib.ncsu.edu/ir/bitstream/1840.16/7690/1/etd.pdf) – Rahul Banerjee Apr 02 '13 at 03:24
  • @Chrys The x and y are the pixel coordinates of the depth image. The values are essentially what the Kinect sensor returns as the depth data. I don't know what the distortion values of the IR sensor are. – user977198 Apr 02 '13 at 06:08
  • @RahulBanerjee The image I posted is a top-down image and doesn't necessarily only occur at close ranges. From the paper, it looks like the barreling effect happens with planes that are parallel with with the image plane, but this curving only happens with planes that are perpendicular (or simply not parallel) with the image plane, including the ground as well (not shown). – user977198 Apr 02 '13 at 06:14

1 Answers1

5

I found out the answer. I was using the depth image, which isn't real world coordinates. I used the CoordinateMapper class in the Kinect SDK to transform the depth image into SkeletonPoints, which are real world coordinates.

It would go something like this:

using (DepthImageFrame depthFrame = e.OpenDepthImageFrame()) {
  DepthImagePixel[] depth = new DepthImagePixel[depthFrame.PixelDataLength];
  SkeletonPoint[] realPoints = new SkeletonPoint[depth.Length];

  depthFrame.CopyDepthImagePixelDataTo(depth);

  CoordinateMapper mapper = new CoordinateMapper(sensor);
  mapper.MapDepthFrameToSkeletonFrame(DEPTH_FORMAT, depth, realPoints);
}
user977198
  • 309
  • 2
  • 11