bibigone / k4a.net

K4A.Net - Three-in-one .NET library to work with Azure Kinect devices (also known as Kinect for Azure, K4A, Kinect v4). It includes sensor API, recording and playback API, body tracking API. Samples for WPF, .NET Core and Unity are included.
MIT License
164 stars 39 forks source link

K4A.Net (K4AdotNet)

K4A.NetThree-in-one managed .NET library to work with Azure Kinect depth sensors (also known as Kinect for Azure, K4A, Kinect v4). Also it can be used to work with Orbbec Femto Bolt and Mega depth sensors via Orbbec SDK K4A Wrapper. It consists of the following "components":

  1. Sensor API — access to depth camera, RGB camera, accelerometer and gyroscope, plus device-calibration data and synchronization control
    • Corresponding namespace: K4AdotNet.Sensor
    • Corresponding native API: k4a.h
  2. Record API — data recording from device to MKV-files, and data reading from such files
    • Corresponding namespace: K4AdotNet.Record
    • Corresponding native API: record.h and playback.h
  3. Body Tracking API — body tracking of multiple skeletons including eyes, ears and nose
    • Corresponding namespace: K4AdotNet.BodyTracking
    • Corresponding native API: k4abt.h

Key features

Dependencies

K4AdotNet depends on the following native libraries (DLLs) from Azure Kinect Sensor SDK and Azure Kinect Body Tracking SDK:

Library "component" Depends on Version in use Location in repository Included in NuGet package
Sensor API k4a.dll, depthengine_2_0.dll(1) 1.4.1 externals/k4a/windows-desktop/amd64 YES
Record API k4arecord.dll 1.4.1 externals/k4a/windows-desktop/amd64 YES
Body Tracking API k4abt.dll(2), dnn_model_2_0_op11.onnx and/or dnn_model_2_0_lite_op11.onnx 1.1.2 no(3)

Notes:

How to use Body Tracking runtime:

Versions

See https://github.com/bibigone/k4a.net/releases

How to build

Orbbec Femto Bolt/Mega support

This library is compatible with Orbbec Femto Bolt and Mega depth sensors. It is possible due to Orbbec SDK K4A Wrapper that implements the API of original native K4A library via Orbbec SDK.

ORBBECSDK_K4A_WRAPPER constant must be defined to compile the Orbbec-compatible version of the library. See Product.props file for details.

Note. There is no full compatibility between Orbbec SDK K4A Wrapper and original K4A library. Major differences between them are described here. But actually there are much more inconsistencies. Check value of the Sdk.IsOrbbecSdkK4AWrapper property in client code to determine what version of library is in use.