Kinect For Azure Python API
Public Member Functions | Static Public Member Functions | List of all members
Device Class Reference

A class that represents a connected Azure Kinect device. More...

Public Member Functions

def close (self)
 Closes an Azure Kinect device. More...
 
def get_raw_calibration (self)
 Get the raw calibration blob for the entire Azure Kinect device. More...
 
def start_imu (self)
 Starts the IMU sample stream. More...
 
def stop_cameras (self)
 Stops the color and depth camera capture. More...
 
def stop_imu (self)
 Stops the IMU capture. More...
 

Static Public Member Functions

def get_device_count ()
 Gets the number of connected devices. More...
 

Detailed Description

A class that represents a connected Azure Kinect device.

Property Name Type R/W Description ---------------—
serial_number str R The unique serial number of the device.
hardware_version HardwareVersion R The hardware versions in the device.
color_ctrl_cap dict R The color control capabilities of the device.
sync_out_connected bool R True if the sync out is connected.
sync_in_connected bool R True if the sync in is connected.
Remarks
  • Use the static factory function open() to get a connected Device instance.
  • Do not use the Device() constructor to get a Device instance. It will return an object that is not connected to any device. Calling open() on that object will fail.

Member Function Documentation

◆ close()

def close (   self)

Closes an Azure Kinect device.

Remarks
  • Once closed, the Device object is no longer valid.
  • Before deleting a Device object, ensure that all Captures have been deleted to ensure that all memory is freed.

◆ get_device_count()

def get_device_count (   int)
static

Gets the number of connected devices.

Returns
Number of sensors connected to the PC.
Remarks
  • This API counts the number of Azure Kinect devices connected to the host PC.

◆ get_raw_calibration()

def get_raw_calibration (   self,
  bytearray 
)

Get the raw calibration blob for the entire Azure Kinect device.

Returns
bytearray: A byte array containing the raw calibration data. If this function fails to get the raw calibration data, then None is returned.
Remarks
  • If this function fails to get the raw calibration data, then None is returned.
See also
Calibration

◆ start_imu()

def start_imu (   self,
  EStatus 
)

Starts the IMU sample stream.

Returns
EStatus: EStatus.SUCCEEDED is returned on success, and EStatus.FAILED is returned otherwise.
Remarks
  • Call this API to start streaming IMU data. It is not valid to call this function a second time on the same Device until stop_imu() has been called.
  • This function is dependent on the state of the cameras. The color or depth camera must be started before the IMU. EStatus.FAILED will be returned if neither of the cameras is running.

◆ stop_cameras()

def stop_cameras (   self)

Stops the color and depth camera capture.

Remarks
  • The streaming of individual sensors stops as a result of this call. Once called, start_cameras() may be called again to resume sensor streaming.
  • This function may be called while another thread is blocking in get_capture(). Calling this function while another thread is in that function will result in that function returning None.
See also
start_cameras

◆ stop_imu()

def stop_imu (   self)

Stops the IMU capture.

Remarks
  • The streaming of the IMU stops as a result of this call. Once called, start_imu() may be called again to resume sensor streaming, so long as the cameras are running.
  • This function may be called while another thread is blocking in get_imu_sample(). Calling this function while another thread is in that function will result in that function returning a failure.

The documentation for this class was generated from the following file: