Share via


ColorImageStream.OpenNextFrame Method

Kinect for Windows 1.5, 1.6, 1.7, 1.8

Opens the next frame of color data from the sensor.

Syntax

public ColorImageFrame OpenNextFrame (
         int millisecondsWait
)
'Declaration
Public Function OpenNextFrame ( _
         millisecondsWait As Integer _
) As ColorImageFrame 

Parameters

  • millisecondsWait
    Type: Int32
    The amount of time to wait (in milliseconds) before returning from the function without a new frame.

Return Value

Type: ColorImageFrame
The next frame of color data in a new ColorImageFrame, or NULL if the wait time (in millisecondsWait) has elapsed.

Remarks

If you want the method to return with the next frame immediately, set millisecondsWait to 0. Otherwise, set millisecondsWait to a positive, non-zero value, to notify the runtime that the application can wait this number of milliseconds before the application is ready to process the next frame of data.

If the method succeeds, call ImageFrame.Dispose Method when you are done with the object.

Requirements

Namespace: Microsoft.Kinect

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

See Also

Reference

ColorImageStream Class
ColorImageStream Members
Microsoft.Kinect Namespace