Search code examples
kinect-sdk

Kinect 2 SDK: MapSkeletonPointToDepthPoint?


What is the Kinect 2 equivalent of MapSkeletonPointToDepthPoint?

In the 1.8 and below SDK, it was used to map skeleton points to the color or depth images like this:

DepthImagePoint newJointPos = coordinateMapper.MapSkeletonPointToDepthPoint(skeletonPt, depthFormat);

But that method is missing from the new Kinect 2 CoordinateMapper class.


Solution

  • MapCameraPointToDepthSpace() is the Kinect2 equivalent of Kinect1's MapSkeletonPointToDepthPoint().

    Given a skeletonPt of type CameraSpacePoint:

    DepthSpacePoint depthPt = _mapper.MapCameraPointToDepthSpace(skeletonPt);
    ColorSpacePoint colorPt = _mapper.MapCameraPointToColorSpace(skeletonPt);