ofxKinectForWindows2
Implementation of Kinect For Windows v2 API using COM (not KinectCommonBridge)
Important notes
The current version is designed for the upcoming oF 0.10.0 available from GitHub, and works with Visual Studio 2015 (it is not compatible with non-windows platforms).
- If you are working with an 0.9.x release, please use the
0.9.0
tag - If you are working with an 0.8.x release, please use the
0.8.4
branch
Features
Currently lets you:
- Grab all the image streams (color, depth, IR, long exposure IR, body index)
- Generate a 3D ofMesh (point cloud or stitched mesh) with texture coordinates
- Track bodies (skeleton points, bone maps)
- Transfer coordinates
Currently doesn't support:
- Audio
- Some remapping functions
License
MIT License http://en.wikipedia.org/wiki/MIT_License
Usage
First install the Kinect for Windows SDK 2.0 installed (you will need to restart after installing this before all system paths are correctly set).
Try the examples to see if they build and run. Then try with your own project:
- Make your project with Project Generator, but do not select ofxKinectForWindows2 as an addon at this stage
- Open the solution, and add the ofxKinectForWindows2Lib.vcxproj to your solution (right click on the Solution and choose
Add > Existing Project...
) - In
Property Manager
(open it fromView -> Other Windows -> Property Manager
), right click on your project to selectAdd Existing Property Sheet...
and select theofxKinectForWindows2.props
file. - Go back to
Solution Explorer
, right click on your project (e.g. 'mySketch') and select 'Add Reference...', and add a reference toofxKinectForWindows2Lib
.
Alternative Usage with OF Project Generator
This method requires the OF nightly build of Project Generator. It will not work with the Project Generator from OF 0.9.8 or earlier.
- Make your project with Project Generator, including the ofxKinectForWindows2 addon, and open in IDE (Visual Studio 2015)
- In
Property Manager
(open it fromView -> Other Windows -> Property Manager
), right click on your project to selectAdd Existing Property Sheet...
and select theofxKinectForWindows2.props
file.
Notes
- The depth image comes in as 'RAW' mm values (i'm not amplifying the values), so it may appear dark. Look closely :)
- This addon does not ship with any libraries, it'll look locally on your system for them
- You'll need to get a copy of the Kinect v2 SDK (i'm testing with v1404 April release)
Troubleshooting
Kinect.h
or ofxKinectForWindows2.h
Can't find First, please check that you have the Kinect SDK installed. The Kinect.h
file should be here on your drive:
Second check that one of the examples shipped with ofxKinectForWindows2 builds and runs.
Third please make sure you're using standard paths, e.g.:
addons/ofxKinectForWindows2
apps/myAppFolder/myApp/myApp.sln
If you're using your own path structure then ofxKinectForWindows2 may not work.
Check that your Solution Explorer has the right settings, e.g.:
Check that the .props
file has been added correctly, e.g.:
Make sure the file path to your project isn't too long.
If you encounter errors like The specified task executable CL.exe could not be run
(or similarly ambiguous errors) it may be that the path to your project is too long for Visual Studio to compile (e.g. if your openFrameworks
folder is in a subfolder on your Desktop). While there are many solutions to making a shorter path, one easy solution is to move your openFrameworks root directory to something like C:\of
. reference.
Platform
This addon should work with both x86 and x64 platform settings. However, I'm mostly testing with x64 so I'd suggest you use that if you're having issues. Try changing the platfrom setting near the top of the Visual Studio window if you are having troubles.