Code Monkey home page Code Monkey logo

kinz-python's Introduction

KinZ for Python A library for Azure Kinect

At the time of this writing, there are no official python bindings for Kinect for Azure.
This library allows to use Azure Kinect directly in Python.

Installation:

  1. 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.
  2. For Body tracking functionality (optional), you need an NVIDIA GPU and install CUDA. Download from here.
  3. For Body tracking functionality (optional), 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.
  4. 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.
  5. Install the Python requirements (see environment.yaml). To create a fully functional conda environment run:
conda env create --file environment.yaml
  1. Install the library with:
pip install .
  1. To install KinZ with body tracking functionality run:
CFLAGS="-l:libk4abt.so -DBODY" pip install .

Demos

Inside demos directory, you'll find demos showing all the features of the library.
Currently, there are only 6 demos:

  • cameras_sensors_demo: shows how to get color, depth IR, and IMU sensors.
  • calibration-demo.py: shows how to extract camera calibration values.
  • map_depth_to_color_and_3d_demo.py: shows how to map sparse points from depth to color and from depth to 3D.
  • map_color_to_depth_and_3d_demo.py: shows how to map sparse points from color to depth and from color to 3D.
  • pointcloud_demo: shows how to get the colored pointcloud and visualize it with open3D.
  • body_tracking_demo: shows how to get body tracking information and visualize it.

Streaming Speed

The streaming speeds in Python are the following:

Resolution FPS Unaligned FPS Aligned Depth2Color
1280 x 720 30 30
1920 x 1080 30 30
2560 x 1440 30 22
2048 x 1536 30 30
3840 x 2160 30 16
4096 x 3072 15 9

Uninstall:

pip uninstall kinz

Coming soon ...

Hand pose estimation

Color image keypoints alt text

Depth image keypoints alt text

For more details checkout the wiki pages.

Citation

@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}}

Link to paper

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.