DepthImageFrame.CopyPixelDataTo Method (Int16[])
Kinect for Windows 1.5, 1.6, 1.7, 1.8
Copies the per-pixel depth data to a pre-allocated array of shorts using the pixel data length. The array size must be equal to the PixelDataLength property.
Syntax
public void CopyPixelDataTo (
short[] pixelData
)
Parameters
- pixelData
Type: Int16
An array of shorts to receive the pixel data.
Remarks
Each pixel of depth data is stored in a short; therefore the array in this method is an array of shorts. Here's an example:
// For depth data // frame = DepthImageFrame short[] pixelData = new short[frame.PixelDataLength]; frame.CopyPixelDataTo(pixelData);
Requirements
Namespace: Microsoft.Kinect
Assembly: Microsoft.Kinect (in microsoft.kinect.dll)
See Also
Reference
DepthImageFrame Class
DepthImageFrame Members
Microsoft.Kinect Namespace