MSDN Library

CoordinateMapper.MapDepthPointToColorPoint Method

Maps a point from depth space to color space.

public ColorImagePoint MapDepthPointToColorPoint (
         ColorImageFormat colorImageFormat,
         DepthImageFormat depthImageFormat,
         DepthImagePoint depthPoint


Type: ColorImageFormat
The color space format.
Type: DepthImageFormat
The depth space format.
Type: DepthImagePoint
The supplied DepthImagePoint.

Return Value

Type: ColorImagePoint
The resulting ColorImagePoint.

Because depth image data and color image data come from separate sensors, pixels in the two images may not always line up exactly. The two sensors may have different fields of view, or may not be aimed precisely in the same direction. This means that a point near the edge of the depth image may correspond to a pixel just beyond the edge of the color image, or vice versa.

This function accepts coordinates outside the bounds of the depth image. It may return pixels outside the color image. This means that you can use data from the two images in combination, even when the two images do not line up completely. You must verify that the coordinates that are returned lie within the color image before using the coordinates to reference pixels in that color image.

The depth image coordinates you specify are not required to be within the bounds of the depth frame image, but they should not be too far outside the depth frame image bounds. If the coordinates are far outside the depth frame image, they are unlikely to map to coordinates inside the bounds of the color image. This function will then return color image coordinates that are unlikely to be useful.

Namespace: Microsoft.Kinect
Assembly: Microsoft.Kinect (in microsoft.kinect.dll)

Community Additions

© 2016 Microsoft