Export (0) Print
Expand All
2 out of 2 rated this helpful - Rate this topic

NUI_IMAGE_FRAME Structure

Kinect for Windows 1.5, 1.6, 1.7, 1.8

Contains information about a depth or color image frame.
typedef struct _NUI_IMAGE_FRAME {
    LARGE_INTEGER liTimeStamp;
    DWORD dwFrameNumber;
    NUI_IMAGE_TYPE eImageType;
    NUI_IMAGE_RESOLUTION eResolution;
    INuiFrameTexture *pFrameTexture;
    DWORD dwFrameFlags;
    NUI_IMAGE_VIEW_AREA ViewArea;
} NUI_IMAGE_FRAME;

Members

liTimeStamp
The timestamp of the most recent depth frame. The timestamp is expressed as the number of milliseconds that have elapsed since the most recent call to the NuiInitialize function or the INuiSensor::NuiInitialize method.
dwFrameNumber
The frame number of the most recent depth frame. The frame number is a counter that increments by one every time that a new depth frame is generated by the Kinect sensor array. Color frames always have the same frame number as the most recent depth frame.

If you are retrieving color frames at a slower rate than the sensor array is generating depth frames, you will see gaps in the frame number sequence of color frames. However, a later frame will always have a higher frame number than an earlier frame.

Frame numbers reset to zero every time that NuiInitialize is called or the sensor array is plugged in. This means that you can see the frame numbers reset during operation if the sensor array is unplugged and plugged back in, even if your application did not explicitly reinitialize the sensor.

eImageType
A NUI_IMAGE_TYPE value that contains the type of the frame.
eResolution
A NUI_IMAGE_RESOLUTION value that contains the resolution of the frame.
pFrameTexture
A pointer to an INuiFrameTexture object that can be used to access or manipulate frame data as a texture resource.
dwFrameFlags
Not used.
ViewArea
Not used.

To access the frame data, call the INuiFrameTexture::LockRect method on the object pointed to by the pFrameTexture member, and then use the pBits member of the returned NUI_LOCKED_RECT structure.

The format of color image data depends on the color image type. If the eImageType member is NUI_IMAGE_TYPE_COLOR or NUI_IMAGE_TYPE_COLOR_YUV, the data is 32-bits-per-pixel RGB. If the image type is NUI_IMAGE_TYPE_COLOR_RAW_YUV, the data is raw YUYV data, without conversion to RGB.

If your application included NUI_INITIALIZE_FLAG_USES_DEPTH in the dwFlags argument to NuiInitialize, depth data is returned as a 16-bit value in which the low-order 12 bits (bits 0–11) contain the depth value in millimeters.

If your application included NUI_INITIALIZE_FLAG_USES_DEPTH_AND_PLAYER_INDEX in the dwFlags argument to NuiInitialize, depth data is returned as a 16-bit value that contains the following information:

  • The low-order three bits (bits 0–2) contain the skeleton (player) ID.
  • The high-order bits (bits 3–15) contain the depth value in millimeters. A depth data value of zero indicates that no depth data is available at that position because all of the objects were either too close to the camera or too far away from it.
Header: Declared in NuiImageCamera.h; however, include NuiApi.h in your project.
Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.