Code Monkey home page Code Monkey logo

kinectpv2's Introduction

KinectPV2

Kinect for Windows v2 library for Processing


Version 0.7.5

Library is curretly on develop with the Windows SDK Version 1409 (9/16/2014)

Library for Mac check out the OpenKinect-for-Processing library.


####Requirements

  • A Kinect for Windows v2 Device (K4W2).
  • Kinect SDK v2
  • 64bit computer with a dedicated USB 3.0.
  • Windows 10, 8, 8.1
  • Processing 3.0
  • Update your latest video card driver.
  • Install DirectX 11.

Reference and tutorial

Webpage tutorial with a couple of useful examples.

Install for Processing 3.0

  • Install the Kinect for Windows SDK v2
    • Install the library using Processing Contributed Library Manager
    • Manual install, download the latest KinectPV2 version from the releases tab, and copy the KinectPV2 folder into your processing libraries sketch folder.
  • Enjoy

For Processing 2.2.1 please use the KinectPV2 0.7.2 version.

Examples

  • TestImages, Test all Frames/Images for the Kinect.
  • SkeletonMaskDepth, Skeleton positions are mapped to match the depth and body index frames.
  • SkeletonColor, Skeleton is mapped to match the color frame.
  • Skeleton3d, 3d Skeleton example needs love.
  • SimpleFaceTracking, simple face tracking with mode detection.
  • PointCloudOGL, Point cloud depth render using openGL and shaders.
  • PointCloudDepth, point cloud in a single 2d Image and threshold example.
  • PointCloudColor, Point cloud in color, using openGL and shaders.
  • MaskTest, Body Index test, and body index with depth.
  • Mask_findUsers, find number of users base on body index information.
  • MapDepthToColor, depth to color mapping, depth frame is aligned with color frame.
  • HDFaceVertex, Face vertices are match with the color frame.
  • HDColor, 1920 x 1080 RGB frame.
  • DepthTest, Depth test with raw depth data.
  • CoordinateMapperRGBDepth, example broken, check 0.7.2 version.
  • RecordPointCloud, simple OBJ recording of the point cloud positions.
  • OpenCV examples:
    • Live Capture App
    • Find Contours with depth or bodyIndex

Build

To build the KinectPV2 library from source code, look at the Build_libs folder

  • KinectPV2_vc2012, builds the .dll library with JNI code.
  • KinectPV2_Eclipse, builds the .jar library for processing.

Know issues

  • Missing "msvcp110.dll", or "Kinect20.Face.dll: Can't find dependent libraries on thread"
  • Problems with the video, update your video card driver and install DirectX 11.

Todo


Simple Device

To include the library into a processing sketh you just need to import it and initialize it.

import KinectPV2.*;
KinectV2 kinect;

void setup() {

  kinect = new KinectV2(this);
  //Start up methods go here
  kinect.init();
}

Images

To obtain the color Image, depth Image, infrared Image, bodyIndex Image and long Exposure Image as a PImage you need to active with the following method

 void enableColorImg(boolean toggle);
 void enableDepthImg(boolean toggle);
 void enableInfraredImg(boolean toggle);
 void enableBodyTrackImg(boolean toggle);
 void enableInfraredLongExposureImg(boolean toggle);
 
 PImage getColorImage();
 PImage getDepthImage();
 PImage getInfraredImage();
 PImage getBodyTrackImage();
 PImage getInfraredLongExposureImage();

just initialize in the setup()

  kinect = new KinectV2(this);
  kinect.enableColorImg(true);
  kinect.init();

get the PImage in the draw()

PImage imgC = kinect.getColorImage();
image(imgC, 0, 0);

Raw Data is only available for the color, depth ad bodytrack frames/images. Once the frames are activated just call them.

  //raw Data int valeus from [0 - 4500]
  int [] rawData = kinect.getRawDepthData();
  
  //values for [0 - 256] strip
  int [] rawData256 = kinect.getRawDepth256Data();
  
  //raw body data 0-6 users 255 nothing
  int [] rawData = kinect.getRawBodyTrack();
  
  //unpacket color values
  int [] colorRaw = kinect.getRawColor();
  

License

MIT License http://en.wikipedia.org/wiki/MIT_License

kinectpv2's People

Contributors

thomaslengeling avatar

Watchers

 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.