Skip to content

a simple c api for accessing kinect2 body/image streams + python bindings

License

Notifications You must be signed in to change notification settings

maxime-tournier/kinect2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Requirements

  • kinect2 sdk

  • visual studio (unless you manage to feed Kinect.h to a standard-compliant c++ compiler)

Building

  • open kinect2.vcxproj, select your preferred arch/type then Build/Build Solution (F7)

Python Bindings

Make sure the resulting dll is in the same directory as kinect2.py, then the following example should work (you need opencv2):

import kinect2

import cv2
import sys

flags = kinect2.source_type.color + kinect2.source_type.body
for f in kinect2.frames(flags):

    img = f.get('color', None)
    if img is not None:
        cv2.imshow('image', img)
        if cv2.waitKey(1) & 0xFF == ord('q'):
            sys.exit(0)

    body = f.get('body', None)
    if body is not None:
        print(body)
        sys.stdout.flush()

About

a simple c api for accessing kinect2 body/image streams + python bindings

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published