Search code examples
3dkinectpoint-clouds

Kinect Point Cloud Curved Walls


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


Solution

  • 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);
    }