Skip to content

perevalovds/ofxAzureKinect

 
 

Repository files navigation

ofxAzureKinect

ofxAddon that allows you to use Azure Kinect in openFrameworks.

  • Get depth, color, depth to world, and color in depth frames as ofPixels or ofTexture.
  • Get point cloud VBO with texture coordinates in depth space.
  • Get body tracking skeleton and index texture.
  • Use multiple sensors per machine (tested up to 4!)
  • Set up sync mode (standalone, master, subordinate) with multiple devices when connected with sync cables.
  • Record and playback streams.

Forked from prisonerjohn/ofxAzureKinect, added example-pointcloudonly and improved addons setup for Windows.

Installation

The instructions below are based on the Azure Kinect Sensor SDK Usage page.

Windows

  1. Install the Azure Kinect Sensor SDK.
  2. Copy c:\Program Files\Azure Kinect SDK v1.4.1\sdk contents to ofxAzureKinect\libs\azure_sdk
  3. For each project copy all DLLs from azure_sdk into project's bin folder

For body tracking:

  1. Install the Azure Kinect Body Tracking SDK. 5 Add an environment variable for AZUREKINECT_BODY_SDK and set it to the Body SDK installation path (no trailing slash). The default is C:\Program Files\Azure Kinect Body Tracking SDK.

    Path

  2. Clone this repository in your openFrameworks addons folder.

  3. Use the OF Project Generator to generate projects with the appropriate headers and libraries included.

Windows:

  1. Copy ofxAzureKinectConfig.h from any of examples to project's src folder.
  2. Copy all DLLs from libs/azure_sdk to project's bin folder
  3. To use body tracking:
    • Uncomment #define USE_BODYTRACKER at ofxAzureKinectConfig.h
    • Copy all DLLs, PDB, JSON and XML from libs/azure_body_sdk to project's bin folder
    • Copy the cuDNN model file dnn_model_2_0.onnx from the Body SDK tools folder into your project's bin folder!
  4. Build as x64 (not 32 bit)

Linux

  1. Configure the Linux Software Repository for Microsoft. Note that for Ubuntu you'll need to set up the repo for 18.04 even if you're running newer versions.
  2. Install the Azure Kinect Sensor SDK packages: libk4a1.3 libk4a1.3-dev k4a-tools
  3. Install the Azure Kinect Body Tracking SDK packages: libk4abt1.0 libk4abt1.0-dev
  4. Setup udev rules by copying this file to /etc/udev/rules.d/99-k4a.rules.
  5. Install libjpeg-turbo.
  6. Clone this repository in your openFrameworks addons folder.
  7. You can then use the OF Project Generator to generate projects with the appropriate headers and libraries included.

Compatibility

Tested with:

  • openFrameworks 0.10.x / 0.11.x
  • Windows 10, Visual Studio 2017 / 2019
  • Ubuntu 19.10, Qt Creator

Examples

  • example-pointcloudonly demonstrates pure point cloud rendering
  • example-pointCloud demonstrates how to draw the basic point cloud VBO from the device.
  • example-streams demonstrates how to get depth, color, infrared textures from the device.
  • example-shader demonstrates how to reconstruct a point cloud using LUTs in a shader.
  • example-bodies demonstrates how to get the body tracking index texture, and skeleton joint information.
  • example-multi demonstrates how to use multiple devices in a single app.
  • example-record demonstrates how to record and playback device streams.

Use the OF Project Generator to create the example project files. If everything is installed correctly, it should properly locate all required include and library files. Also on Windows do the following:

  1. Copy all DLLs, PDB, JSON and XML from libs/azure_sdk to project's bin folder
  2. If example uses body tracking:
    • Uncomment #define USE_BODYTRACKER at ofxAzureKinectConfig.h
    • Copy all DLLs from libs/azure_body_sdk to project's bin folder
    • Copy the cuDNN model file dnn_model_2_0.onnx from the Body SDK tools folder into your project's bin folder!
  3. Build as x64 (not 32 bit)

About

An openFrameworks addon for the Azure Kinect.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 52.6%
  • C 43.2%
  • GLSL 2.2%
  • Makefile 2.0%