pykinect-azure

Python library to run Kinect Azure DK SDK functions

https://github.com/ibaigorordo/pykinectazure

Science Score: 44.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.5%) to scientific vocabulary

Keywords

azure-kinect azure-kinect-dk azure-kinect-sdk body-tracking deep-learning depth-camera k4a k4abt kinect kinect-azure opencv opencv-python python python3
Last synced: 4 months ago · JSON representation ·

Repository

Python library to run Kinect Azure DK SDK functions

Basic Info
  • Host: GitHub
  • Owner: ibaiGorordo
  • License: mit
  • Language: Python
  • Default Branch: master
  • Homepage:
  • Size: 1.11 MB
Statistics
  • Stars: 481
  • Watchers: 12
  • Forks: 122
  • Open Issues: 29
  • Releases: 5
Topics
azure-kinect azure-kinect-dk azure-kinect-sdk body-tracking deep-learning depth-camera k4a k4abt kinect kinect-azure opencv opencv-python python python3
Created over 5 years ago · Last pushed about 1 year ago
Metadata Files
Readme License Citation

README.md

PyPI

pyKinectAzure

Azure kinect color and depth combination

Python 3 library for the Azure Kinect DK sensor-SDK.

Similar solutions

Part of the ideas in this repository are taken from following repositories: * pyk4a: Really nice and clean Python3 wrapper for the Kinect Azure SDK.

  • Azure-Kinect-Python: More complete library using ctypes as in this repository, however, examples about how to use the library are missing and the library is harder to use.

The objective of this repository is to combine the strong points of both repositories by creating a easy to use library that allows the use of most of the functions of the Kinect Azure. Also, to create sample programs to showcase the uses of the library

Prerequisites

  • Azure-Kinect-Sensor-SDK: required to build this library. To use the SDK, refer to the installation instructions here.
  • ctypes: required to read the library.
  • numpy: required for the matrix calculations
  • opencv-python: Required for the image transformations and visualization.

Installation

commandline pip install pykinect_azure

How to use this library

  • The library has been tested in Windows 10 and Ubuntu 20.04 with the Kinect Azure SDK 1.4.0 and 1.4.1, it should also work with other operating systems.

    • Windows: When using the pyKinectAzure class, it requires the path to the k4a.dll module, make sure that the path is the correct one for your Kinect Azure SDK version. By default the path (module_path) is set to C:\\Program Files\\Azure Kinect SDK v1.4.0\\sdk\\windows-desktop\\amd64\\release\\bin\\k4a.dll.
    • Linux: When using the pyKinectAzure class, it requires the path to the k4a.so module, make sure that the path is the correct one for your Kinect Azure SDK version. When using Linux set module_path to /usr/lib/x86_64-linux-gnu/libk4a.so, please follow the instruction from microsoft to install the right packages.
    • Nvidia Jetson: When using the pyKinectAzure class, it requires the path to the k4a.so module, make sure that the path is the correct one for your Kinect Azure SDK version. When using Nvidia Jetson set module_path to to '/usr/lib/aarch64-linux-gnu/libk4a.so', please follow the instruction from microsoft to install the right packages.
  • The pyKinectAzure class is a wrapper around the _k4a.py module to make the library more understandable. However, the pyKinectAzure class still contains few methods from the Kinect Azure SDK

  • The _k4a.py module already contains all the methods in the Kinect Azure SDK. So, for more advanced of the Kinect Azure SDK check the _k4a.py module.

Examples

For an example on how to obtain and visualize the depth data from the Azure Kinect DK check the exampleDepthImageOpenCV.py script. git clone https://github.com/ibaiGorordo/pyKinectAzure.git cd pyKinectAzure/examples python exampleDepthImageOpenCV.py

Also, there is an example to obtain and visualize the smooth depth from the Azure Kinect DK check the exampleSmoothDepthImageOpenCV.py script. python exampleSmoothDepthImageOpenCV.py

note: when you are dealing on the linux platform, please insure that the user have permission to the usb devices, or always execute under the root permission by adding sudo ahead.

Azure kinect smoothed depth image comparison

Contribution

Feel free to send pull requests.

Bug reports are also appreciated. Please include as much details as possible.

TODO:

Wrappers for the Kinect Azure data

  • [x] Create wrapper to read depth images.
  • [x] Create wrapper to read Infrared images.
  • [x] Create wrapper to read IMU data.
  • [x] Create function to convert image buffer to image depending on the image type.
  • [x] Create wrapper to transform depth image to color image.
  • [x] Create wrapper to transform depth image to 3D point cloud.
  • [x] Create funtion to visualize 3D point cloud.

Create examples

  • [x] Example to visualize depth images.
  • [x] Example to visualize passive IR images.
  • [x] Example to plot IMU data.
  • [x] Example to visualize Depth as color image.
  • [x] Example to overlay depth color with alpha over real image.
  • [x] Example to visualize 3D point cloud

Body tracking

  • [x] Create library for the body tracking SDK similar the same way as the current library.
  • [x] Combine image and skeleton data.
  • [ ] Generate 3D skeleton visualization.

Future ideas

  • [ ] Run Deep Learning models on Kinect data (Openpose 3D skeleton, semantic segmentation with depth, monocular depth estimation validation)
  • [ ] Track passive infrared marker for motion capture analysis

Owner

  • Name: Ibai Gorordo
  • Login: ibaiGorordo
  • Kind: user
  • Location: Japan
  • Company: @turingmotors

Passionate about technology and its potential to help people.

Citation (CITATION.cff)

# This CITATION.cff file was generated with cffinit.
# Visit https://bit.ly/cffinit to generate yours today!

cff-version: 1.2.0
title: pyKinectAzure
message: You can cite this repository using the info below
type: software
authors:
  - given-names: Ibai
    family-names: Gorordo Fernandez
    orcid: 'https://orcid.org/0000-0003-3219-1879'

GitHub Events

Total
  • Issues event: 6
  • Watch event: 44
  • Issue comment event: 3
  • Pull request event: 3
  • Fork event: 7
Last Year
  • Issues event: 6
  • Watch event: 44
  • Issue comment event: 3
  • Pull request event: 3
  • Fork event: 7

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 130
  • Total Committers: 13
  • Avg Commits per committer: 10.0
  • Development Distribution Score (DDS): 0.215
Past Year
  • Commits: 3
  • Committers: 1
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Ibai Gorordo i****o@h****m 102
JReesW j****w@g****m 6
Azzedine Touazi 4****i 5
hurst j****r@w****e 5
ibai b****s@g****m 2
aiwhoo 7****o 2
tt t@t****t 2
chobe111 c****1@n****m 1
Yasunori Ozaki h****0@o****p 1
Wei Kin Khaw w****8@g****m 1
Md Shadman Hasan s****o@g****m 1
Louis-Philippe Asselin l****n 1
Jonathan Williams j****s@s****l 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 106
  • Total pull requests: 20
  • Average time to close issues: 3 months
  • Average time to close pull requests: 7 months
  • Total issue authors: 90
  • Total pull request authors: 15
  • Average comments per issue: 2.74
  • Average comments per pull request: 0.8
  • Merged pull requests: 9
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 6
  • Pull requests: 3
  • Average time to close issues: 17 minutes
  • Average time to close pull requests: 1 minute
  • Issue authors: 6
  • Pull request authors: 2
  • Average comments per issue: 0.67
  • Average comments per pull request: 0.67
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • jonas-hurst (2)
  • Lukikay (2)
  • VineetVS (2)
  • Avita0207 (2)
  • aiwhoo (2)
  • bs97 (2)
  • tonystark12 (2)
  • QiuJunning (2)
  • benpocklingtonhes (2)
  • fw-codes-files (2)
  • visonpon (2)
  • victorc365 (2)
  • hlyf-xs (2)
  • lsding (2)
  • JSCG95 (2)
Pull Request Authors
  • benpocklingtonhes (3)
  • chobe111 (2)
  • MojiCartman (2)
  • bagel897 (2)
  • aiwhoo (2)
  • spongebobbe (2)
  • alfredplpl (1)
  • murez (1)
  • WeiKin007 (1)
  • lpasselin (1)
  • JReesW (1)
  • MdShadmanHasan (1)
  • TitansWhale (1)
  • jonas-hurst (1)
  • davidliyutong (1)
Top Labels
Issue Labels
Pull Request Labels

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 355 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 4
  • Total maintainers: 1
pypi.org: pykinect-azure

Python library to run Kinect Azure DK SDK functions

  • Versions: 4
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 355 Last month
Rankings
Stargazers count: 3.6%
Forks count: 4.9%
Dependent packages count: 6.6%
Downloads: 11.2%
Average: 11.4%
Dependent repos count: 30.6%
Maintainers (1)
Last synced: 5 months ago

Dependencies

pyproject.toml pypi
  • numpy ^1.22.2
  • opencv-python ^4.5.5
  • python ^3.9
requirements.txt pypi
  • opencv-python *
setup.py pypi
  • numpy *
  • opencv-python *