Question

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

Was it helpful?

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);
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top