Share via


KinectSensor.MapDepthToColorImagePoint Method

Kinect for Windows 1.5, 1.6, 1.7, 1.8

Obsolete starting with version 1.6; replaced by the CoordinateMapper.MapDepthPointToColorPoint method. In versions prior to 1.6, this method maps a depth coordinate with depth value to a color coordinate.

Syntax

public ColorImagePoint MapDepthToColorImagePoint (
         DepthImageFormat depthImageFormat,
         int depthX,
         int depthY,
         short depthPixelValue,
         ColorImageFormat colorImageFormat
)
'Declaration
Public Function MapDepthToColorImagePoint ( _
         depthImageFormat As DepthImageFormat, _
         depthX As Integer, _
         depthY As Integer, _
         depthPixelValue As Short, _
         colorImageFormat As ColorImageFormat _
) As ColorImagePoint 

Parameters

  • depthImageFormat
    Type: DepthImageFormat
    The depth format of the source.
  • depthX
    Type: Int32
    The x-coordinate of the depth frame.
  • depthY
    Type: Int32
    The y-coordinate of the depth frame.
  • depthPixelValue
    Type: Int16
    The value from the depth frame's pixel data at the given (depthX, depthY) coordinate.
  • colorImageFormat
    Type: ColorImageFormat
    The desired target image format.

Return Value

Type: ColorImagePoint
The ColorImagePoint corresponding to the point in DepthImageFrame space.

Remarks

Since the input format is based on the depth frame's pixel data, the depth is in the high-order 13 bits of the pixel (see Depth Stream). If you are calling this function using the depth value in depthPixelValue, bit-shift the depth value left by 3 bits before calling this function.

There is a known issue with calling this method when the sensor is stopped or disconnected.

Requirements

Namespace: Microsoft.Kinect

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

See Also

Reference

KinectSensor Class
KinectSensor Members
Microsoft.Kinect Namespace