At the time of this writing, there are no official Matlab bindings for Azure Kinect.
This library allows using Azure Kinect directly in Matlab.
- Install the Azure Kinect SDK as described here where it says Microsoft installer. For Windows, Download the .exe and follow the steps. For Ubuntu use the sudo apt install commands shown in the same page.
- For Body tracking functionality (optional) you need an NVIDIA GPU and install CUDA. Download from here.
- For Body tracking, install the Azure Kinect Body Tracking SDK. For Windows, download the msi installer from here. For Ubuntu simply run the sudo apt install command provided in the webpage.
- Before compiling the code for Matlab, make sure the Kinect works correctly using the viewers provided my Microsoft, e.g. C:\Program Files\Azure Kinect SDK v1.4.1\tools\k4aviewer.exe and C:\Program Files\Azure Kinect Body Tracking SDK\tools\k4abt_simple_3d_viewer.exe. In Linux just type k4aviewer or k4abt_simple_3d_viewer in the terminal.
- Once the Kinect is correctly installed, close the viewer, and open Matlab.
- In Matlab, set the compiler for C++ as shown here.
- Open the compile_for_windows.m or compile_for_linux.m, set the corresponding paths and run. If the compilation was successful,
- For the case of Windows, add to the windows path environmental variable the bin directory containing the k4a.dll and optionally k4abt.dll (if compiling the body tracking SDK). For example add C:\Program Files\Azure Kinect SDK v1.4.1\tools to the path environmental variable. Follow the instructions described here.
Inside demos directory, you'll find demos showing all the features of the library.
Currently, there are only 5 demos:
- videoDemo: shows how to get color, depth IR, and IMU sensors.
- calibrationDemo: shows how to extract camera calibration values.
- pointcloudDemos: shows how to get the colored pointcloud and visualize it.
- bodyTrackingDemo: shows how to get body tracking information and visualize it.
For more details checkout the wiki pages.
@article{terven_cordova_kinz,
title = {KinZ an azure kinect toolkit for Python and Matlab},
journal = {Science of Computer Programming},
pages = {102702},
year = {2021},
author = {Juan R. Terven and Diana M. Córdova-Esparza},
keywords = {Azure Kinect, Python, Matlab}}