Git Product home page Git Product logo

ofxkinectv2's Introduction

ofxKinectV2

An addon for the new Kinect For Windows V2 sensor. Based on the excellent work by the https://github.com/OpenKinect/libfreenect2 team ( @JoshBlake @floe and @christiankerl plus others )

New:

  • Supports multiple kinects.
  • Optimized for openFrameworks release 0.9.0
  • Uses OpenCL based decoding by default = much faster decoding
  • Less crashes on startup and shutdown
  • Supports both the early beta device and the new retail device.

Notes:

  • Kinect needs to have flashed firmware ( this currently needs to be done on Windows 8 )
  • Requires a USB 3 port on machine.
  • For OS X if you have issues connecting to the device, check in the System Profiler -> USB. If the Nui Sensor is not listed under SuperSpeed, unplug the power to the device and replug it in, without disconnecting the USB cable.
  • Only tested on OS X though Win / Nix should be possible too with patched libusb ( see: https://github.com/OpenKinect/libfreenect2/blob/master/depends/README.depends.txt )
  • If you have the ofxKinect ( v1 ) addon in your project remove the ofxKinect libusb lib and use the one that comes with this repo instead.
  • //On OS X if you are not using the example project. Make sure to add OpenCL.framework to the Link Binary With Library Build Phase and also change the line in Project.xcconfig to OTHER_LDFLAGS = $(OF_CORE_LIBS) $(OF_CORE_FRAMEWORKS) -framework OpenCL

Huge thanks to @christiankerl for a lot of the recent changes that made this work well on OS X.

Setup

Windows / Visual Studio

KinectV2 drivers

On Windows, to run multiple Kinects at the same time, you need to install custom drivers : libusbK driver

You don't need the Kinect for Windows v2 SDK to build and install libfreenect2, though it doesn't hurt to have it too. You don't need to uninstall the SDK or the driver before doing this procedure.

Install the libusbK backend driver for libusb. Please follow the steps exactly:

  • Download Zadig from http://zadig.akeo.ie/.
  • Run Zadig and in options, check "List All Devices" and uncheck "Ignore Hubs or Composite Parents"
  • Select the "Xbox NUI Sensor (composite parent)" from the drop-down box. (Important: Ignore the "NuiSensor Adaptor" varieties, which are the adapter, NOT the Kinect) The current driver will list usbccgp. USB ID is VID 045E, PID 02C4 or 02D8.
  • Select libusbK (v3.0.7.0 or newer) from the replacement driver list.
  • Click the "Replace Driver" button. Click yes on the warning about replacing a system driver. (This is because it is a composite parent.)

To uninstall the libusbK driver (and get back the official SDK driver, if installed):

  • Open "Device Manager"
  • Under "libusbK USB Devices" tree, right click the "Xbox NUI Sensor (Composite Parent)" device and select uninstall.
  • Important: Check the "Delete the driver software for this device." checkbox, then click OK.

If you already had the official SDK driver installed and you want to use it:

  • In Device Manager, in the Action menu, click "Scan for hardware changes."

This will enumerate the Kinect sensor again and it will pick up the K4W2 SDK driver, and you should be ready to run KinectService.exe again immediately.

You can go back and forth between the SDK driver and the libusbK driver very quickly and easily with these steps.

OpenCL

Refer to this tutorial to install the right OpenCL SDK depending on your GPU (Intel, NVIDIA or AMD)

Don't forget to add following environment variables in Windows system :

  • CUDA_INC_PATH with value C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\include
  • CUDA_LIB_PATH with value C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v7.5\lib

ofxkinectv2's People

Contributors

bazard avatar brannondorsey avatar kreigne avatar mattfelsen avatar oftheo avatar vinouz avatar

Stargazers

 avatar

Watchers

 avatar  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.