Skip to content

sshh12/LibKinect2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

33 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LibKinect2

A Python API for interfacing with the Kinect2.

Usage

Install (x64 Only)

pip install https://github.com/sshh12/LibKinect2/releases/download/v0.1.0/libkinect2-0.1.0.tar.gz

Demos

from libkinect2 import Kinect2
from libkinect2.utils import depth_map_to_image
import numpy as np
import cv2

# Init Kinect2 w/2 sensors
kinect = Kinect2(use_sensors=['color', 'depth'])
kinect.connect()
kinect.wait_for_worker()

for _, color_img, depth_map in kinect.iter_frames():
    
    # Display color and depth data
    cv2.imshow('color', color_img)
    cv2.imshow('depth', depth_map_to_image(depth_map))

    key = cv2.waitKey(1) & 0xFF
    if key == ord('q'):
        break

kinect.disconnect()

Example Scripts

cameras body audio mapper

Docs

For python docs, run:

from libkinect2 import Kinect2
help(Kinect2)

Other Docs

Issues

I'm sure there are plenty of issues, so fill free to create one or fix one.

Related

There's a whole bunch of these...