Code Monkey home page Code Monkey logo

pykinect2's Introduction

Added more examples to PyKinect2

  1. examples/basic_2D.py shows examples of displaying body, body index, color, align color, depth and IR images in 2D using OpenCV
  2. examples/basic_3D.py shows examples of displaying coloured point cloud, joint and joint orientation in 3D using Open3D

Other than the prerequisites stated below, we will also need opencv-python and open3d-python for the 2D and 3D display as we are not using PyGame for the display

To create a Python virtual environment with the packages required:

conda env create -f environment.yml

Note: First time install of PyKinectV2 via pip may encounter AssertionError: 80 File "C:\Users...\Anaconda2\lib\site-packages\pykinect2\PyKinectV2.py", line 2216, in assert sizeof(tagSTATSTG) == 72, sizeof(tagSTATSTG) Just go to the pykinect2 installation in the site-packages folder on your computer and replace the PyKinectV2.py file with the one from this github repository.

PyKinect2

Enables writing Kinect applications, games, and experiences using Python. Inspired by the original PyKinect project on CodePlex.

Only color, depth, body and body index frames are supported in this version. PyKinectBodyGame is a sample game. It demonstrates how to use Kinect color and body frames.

Prerequisites

The easiest way to get most of the pre-requisites is to use Anaconda which includes NumPy. You'll then need to pip install comtypes. The PyKinectBodyGame sample requires PyGame which needs to be manually installed.

  1. Download Anaconda get the 32-bit version. This includes NumPy.
  2. pip install comtypes
  3. Install the Kinect for Windows SDK v2

Full List of Dependencies

Installation

The package can be installed through pip using the usual means:

pip install pykinect2

If you are using a virtual environment, be sure to activate it first.

For more information, please see https://pip.pypa.io/en/latest/user_guide.html#installing-packages

Installation (Manual)

To install the package manually, clone this repository to a local folder and include it in the appropriate python environment. If installing in a virtual environment, be sure to install all required dependencies (above).

For example:

cd c:\projects\myproject\env\
/Scripts/activate.bat

easy_install -a c:\projects\downloads\PyKinect2

After installation is complete, you can launch the interactive python shell and import pykinect2 to ensure everything has been installed properly.

Core helper classes for working with the Kinect sensor are located in PyKinectRuntime.py. For usage examples, please see /examples/PyKinectBodyGame.py.

pykinect2's People

Contributors

benlower avatar drglitch avatar guanming001 avatar icoxfog417 avatar jsarsfield avatar levisaya avatar limgm avatar pgrassia-opri avatar sjlevine avatar

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.