Share via


INuiSensor::NuiInitialize Method

Kinect for Windows 1.5, 1.6, 1.7, 1.8

Initializes the Kinect.

Syntax

public:
HRESULT NuiInitialize(
         DWORD dwFlags
)

Parameters

  • dwFlags
    Type: DWORD
    [in] Initialization flags, which are a bitwise-OR combination of the NUI_INITIALIZE constants.

Return Value

Type: HRESULT
Returns S_OK if successful; otherwise, returns a failure code.

Remarks

Important

Applications can call NuiInitialize only once on a sensor. Subsequent calls to NuiInitialize by other applications will fail. This means that only one application can use the Kinect at any time.

The runtime processes data from the sensor in several processing stages, as specified by the value of the dwFlags parameter. The initialization flags also establish the image types and resolutions.

If the dwFlags parameter includes NUI_INITIALIZE_FLAG_USES_SKELETON, skeleton tracking processes depth frames to generate the floor clipping plane that is returned in the NUI_SKELETON_FRAME structure. The runtime signals a skeleton frame event every time a depth frame is available, even if no skeleton is detected.

Requirements

Header: Declared in NuiSensor.h; however, include NuiApi.h in your project.