Share via


DepthImageStream.OpenNextFrame Method

Kinect for Windows 1.5, 1.6, 1.7, 1.8

Gets the next frame of depth data from the sensor.

Syntax

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

Parameters

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

Return Value

Type: DepthImageFrame
The next frame of depth data in a new DepthImageFrame object, 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 when you are done with the object.

Requirements

Namespace: Microsoft.Kinect

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

See Also

Reference

DepthImageStream Class
DepthImageStream Members
Microsoft.Kinect Namespace