Giter Club home page Giter Club 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:

  • Adds support for > 8m if needed with ofxKinectV2::Settings
  • Adds ofParameter for irExposure ( brightness for IR image ).
  • Supports multiple kinects.
  • Optimized for openFrameworks release 0.10.1
  • 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.
  • Supports linux64, see detailed installation instructions here.
  • Supports linuxarmv7l, see detailed installation instructions here.

Known Issues:

  • There is a bug with the OpenCLFrame destructor which casues a crash if the listener is deleted in ofProtonect::closeKinect. So we are not deleting the listener currently. This might cause a very small memory leak if you are opening and closing the Kinect many times. More info here: OpenKinect/libfreenect2#867

Notes:

  • 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 / Windows10 / Nix
  • 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 and VideoToolbox.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 -framework VideoToolbox

Windows 10 USB Setup.

  • Use zadig to install libusbK drivers onto the Kinect V2 device
  • Install the libusbK backend driver for libusb.

Please follow the steps exactly:

1. Download Zadig from http://zadig.akeo.ie/.
2. Run Zadig and in options, check "List All Devices" and uncheck "Ignore Hubs or Composite Parents"
3. 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.
4. Select libusbK (v3.0.7.0 or newer) from the replacement driver list.
5. 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):

1. Open "Device Manager"
2. Under "libusbK USB Devices" tree, right click the "Xbox NUI Sensor (Composite Parent)" device and select uninstall.
3. 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:

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

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

ofxkinectv2's People

Contributors

bakercp avatar bazard avatar brannondorsey avatar madelinegannon avatar mattfelsen avatar nickhardeman avatar oftheo avatar vinouz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ofxkinectv2's Issues

ofProtonect::openKinect Failed. - handle is NULL with optical USB 3.0 50 m extender

This is what I see in system report, when kinect is connected through a USB 3.0 fiber extender in the subj

screen shot 2014-08-27 at 10 59 17 am

Product ID: 0x02d9
Vendor ID: 0x045e (Microsoft Corporation)
Version: 0.70
Speed: Up to 5 Gb/sec
Manufacturer: Microsoft Corporation
Location ID: 0x07420000 / 3
Current Available (mA): 900
Current Required (mA): 0

Kinect works when plugged in directly into the same USB port.

Extender tested using an external USB 3 harddrive.

I wonder, If there is something I could check on the USB path itself to see what's hapening.

Thanks.

--8

Problem with libusb in windows

Hi,
I'm currently attempting to build in windows 10 and visual studio 2015. I would like to work with multiple KinectV2s, so using an extension which relies on the Microsoft SDK isn't an option for me.

To fix a previous error, I have already used the fix suggested here, but I'm now getting a compile error :

invalid or corrupt file

with libusb-1.0.dll being the problematic file.

Any idea how I can fix this one?

Get @hanasaan GPU decoding into core

Hey @hanasaan I was playing with your fork which has the GPU decoding.
Its really nice how you got it working!

I was able to get it working with both the ofxOpenGLContextScope approach you used and also GLFW's native context handling.

The issue I am seeing with both of these approaches though is flickering in the main example window where the window contents get inverted for a single frame.

I am guessing its to do with having two OpenGL contexts running in two different threads and occasionally they do something at the same time.

Have you noticed this on your system?

Thanks!!
Theo

USB PID of the retail version has changed

I have to get the full version kinect2. But I did not recognize.
The successful connection I made changes to the following code:

libs / protonect / ofProtonect.cpp
723
uint16_t pid = 0x02C4;

uint16_t pid = 0x02D8;

It was 0x02D9 in the system profiler of mac.
But I could not connect this ID

Can't Build Release Version (macOS)

Hi Theo!

Thanks for this addon.

I seem to be able to run it perfectly fine via Xcode as a Debug build, but the compiled app (Debug version) doesn't run when launching from the Finder.

I can't seem to be able to build a Release version from Xcode as well with the following linker errors:
Screenshot 2021-09-27 at 4 14 57 PM

I'm guessing I have to add libusb to my build settings somewhere when configuring for Release but not sure where/how to do it. Any help would be appreciated :)

System Details:
openFrameworks v0.11.2_osx_release
MacBook Pro 16" running macOS Catalina 10.15.7
Xcode Version 12.4 (12D4e)

can't open kinect v2, how to solve this problem???

The error is : Driver file operation error. DeviceIoControl failed (Cannot create a file when that file already exists. Error code = 183)
my PC is windows 10, openframework is 0.9.3, and VS is 2015,
if someone know this problem, please tell me,thank you very much.

Windows error after succesfull build

Hello, I am trying to get your addon working.
I have a WIN10 installation with Visual Studio 2017.
I installed the nightly build of openframeworks and had several successfull projects.

I added ofxKinectV2 but I can't figure out why I am getting an error on startup.
The build gives no error. But on start I am getting: The program '[53172] kinect_debug.exe' has exited with code -1073741701 (0xc000007b).
image

My properties are set like this:
{
"configurations": [
{
"inheritEnvironments": [
"msvc_x86"
],
"name": "x86-Debug",
"includePath": [
"${env.INCLUDE}",
"${workspaceRoot}\**"
],
"defines": [
"WIN32",
"_DEBUG",
"UNICODE",
"_UNICODE"
],
"intelliSenseMode": "windows-msvc-x86"
}
]
}

Kan you please help to get this working.

Don't grab RGB frame

Hi,

I try to optimize my app performances, and I noticed that there are some processes relative to the RGB frame that I could avoid because I just use depth and IR streams.
But there isn't any simple way to do it in the addon.

The first thing I noticed is that there are some parameters in ofProtonect that are available for that, in the openKinect function, when creating a new libfreenect2::SyncMultiFrameListener object.
The parameters are currently "libfreenect2::Frame::Color | libfreenect2::Frame::Ir | libfreenect2::Frame::Depth", which takes all streams.
It could be nice to be able to set which stream we want to grab.

I tried to remove the libfreenect2::Frame::Color parameter, but I don't know why, some functions which seems to be relative to the RGB stream are still called. Particularly the function ofRGBPacketProcessor::process which takes a lot of CPU usage with multiple kinects.

I have another problem which may (or not) be relative to that question : with 4 kinects on a computer (each one on a dedicated PCI USB3.0 bus), libusb gives me a "LIBUSB_ERROR_NO_MEM : Insufficient memory." error when opening the 4th kinect. I don't know if avoiding RGB could solve that problem, but if you have any suggestion, I'm willing to try anything.

Thanks !

Edit : Config used : Windows 10, OF 0.9.3, VS Community 2015

Features : Color/Depth registration, World, IR

Heya!
I'm teaching a workshop this weekend which relies on KinectV2 running on OSX
(It's a Rulr workshop, and Rhizomatiks is helping tto port Rulr to OSX for the mostly mac audience there)

I'm thinking to use this addon. Looks pretty neat and tidy and is top of the pops on ofxAddons

3 things I need seem to be missing right now:

  1. Getting world XYZ chords from depth coords (both to render a live mesh which could be in a shader, and to perform calibration tasks which should be on cpu)
  2. Depth <> Color registration and coordinate mappinh (ie individual points and all pixels). libfreenect2 seems to have a class Registration for these tasks
  3. Getting the IR image

Any tips about getting these features would be great.
I might be able to hack a couple of these together and send you the code.
Is anybody else using those features with libfreenect2 / OF do you know?

Notes at:
OpenKinect/libfreenect2#41

Thanks!
Elliof

Change the default max depth to more than 4.5m

DepthPacketProcessor::Config::Config() :
  MinDepth(0.5f),
  MaxDepth(4.5f),
  EnableBilateralFilter(true),
  EnableEdgeAwareFilter(true)
{

I think this can be set via the config in ofProtonect.

terminating with uncaught exception of type std::bad_alloc: std::bad_alloc

My situation is very closed to this issue.
The product ID of Kinect V2 was displayed as "0x02d9".
So I rewrite following code.

/ ofxKinectV2 / libs / protonect / ofProtonect.cpp  
Line:723

uint16_t pid[2] = {0x02d8, 0x02C4};
↓
uint16_t pid[2] = {0x02d8, 0x02d9};

Then I encounrtered following error.

[ error ] ofXml: loadFromBuffer(): DOM ERROR
[warning] ofXml: setTo(): empty document
Using libusbx v1.0.17.10852

Trying to open device 045E:02D8...
libusbx: error [darwin_reset_device] ResetDevice: unknown error
Trying to open device 045E:02D9...
libusbx: warning [darwin_open] USBDeviceOpen: another process has device opened for exclusive access
libusbx: error [darwin_reset_device] ResetDevice: device not opened for exclusive access
             speed: 480 Mbit/s (USB HighSpeed)
active configuration: 1, err: 0
Claiming interface 0...
libusbx: error [darwin_claim_interface] USBInterfaceOpen: another process has device opened for exclusive access
   Failed: -3.

Claiming interface 1...
libusbx: info [darwin_claim_interface] no interface found; setting configuration: 1
libusbx: error [darwin_claim_interface] could not set configuration
   Failed: -4.
running kinect...
Control transfer 1 - set isoch delay
Control transfer error: -9
Control transfer 2 - set sel u1/u2
Control transfer error: -9

Setting interface alt setting...
Setting stream status: Disable
Set stream status error: -5
   Failed: -1.
Control transfer 3 - enable u1
Control transfer error: -9
Control transfer 4 - enable u2
Control transfer error: -9
Control transfer 5 - set feature 768
Setting sensor status: Disable
Set sensor status error: -9
Kinect init done

iso max_packet_size: 4294967291
libc++abi.dylib: terminating with uncaught exception of type std::bad_alloc: std::bad_alloc

And line133 of "/ ofxKinectV2 / libs / protonect / src / transfer_pool.cpp" says "Thread1 1 : signal SIGABAT".

My mac spec:

mac book pro
having usb 3.0 port
Processor 2.5GHz intel Core i7

exc_bad_access when trying to use ofVboMesh

I am trying to go through a usual route of displaying pointclouds using VBOs. After adding a simple "depth pixels" -> VBO code, I started getting exc_bad_access at glDrawArrays line below:

screen shot 2014-09-01 at 9 37 03 pm

My first thought was that I am not setting the VBOs correctly, and to test that idea, I set the vbo WITHOUT using kinect data, lifted from the openframeworks' pointCloudExample, whereby the VBO is set from a static image. However, even in that case the code breaks in the same way.

That proves that setting the VBOs from kinect depth data is not an issue.

Furthermore, if I eliminate both
texDepth->loadData( kinect.getDepthPixels() );
texRGB.loadData( kinect.getRgbPixels() );

in update method, the problem goes away.

I think there might be a memory problem with the kinect data, which exhibits itself when it loads into textures.

The code I am using is below:

 #include "ofApp.h"
 #define DEPTH_WIDTH 512
 #define DEPTH_HEIGHT 424
 //--------------------------------------------------------------
 void ofApp::setup(){
     if( !ofFile::doesFileExist("11to16.bin") ){
         ofSystemAlertDialog("Make sure you have 11to16.bin, xTable.bin and zTable.bin in your data      folder!");
    ofExit(); 
     }

ofBackground(30, 30, 30);

panel.setup("distance in mm", "settings.xml", 540, 100);
panel.add(kinect.minDistance);
panel.add(kinect.maxDistance);

panel.setPosition(ofPoint(10,10));
panel.add(noiseAmount.setup("Noise Amount", 0.0, 0.0,20.0));
panel.add(pointSkip.setup("Point Skip", 1, 1,20));
panel.add(useRealColors.setup("Real Colors", false));
panel.add(colorAlpha.setup("Color Alpha", 255,0,255));
showGui = true;
panel.loadFromFile("settings.xml");

kinect.open();
////////
// fx
postFx.init(ofGetWidth(), ofGetHeight());

postFx.createPass<BloomPass>();
postFx.createPass<FxaaPass>();

pointSkip = 40;

syphonServerRGB.setName("kinectRGB");
syphonServerDepth.setName("kinectDepth");

isSaving = false;

 pointSize = 3;


///

// load an image from disk
img.loadImage("linzer.png");

// we're going to load a ton of points into an ofMesh
vbomesh.setMode(OF_PRIMITIVE_POINTS);

// loop through the image in the x and y axes
int skip = 4; // load a subset of the points
for(int y = 0; y < img.getHeight(); y += skip) {
    for(int x = 0; x < img.getWidth(); x += skip) {
        ofColor cur = img.getColor(x, y);
        if(cur.a > 0) {
            // the alpha value encodes depth, let's remap it to a good depth range
            float z = ofMap(cur.a, 0, 255, -300, 300);
            cur.a = 255;
            vbomesh.addColor(cur);
            ofVec3f pos(x, y, z);
            vbomesh.addVertex(pos);
        }
    }
}

ofEnableDepthTest();
glEnable(GL_POINT_SMOOTH); // use circular points instead of square points
glPointSize(3); // make the points bigger


//here I am trying to allocate texture on heap --- this has no effect.  
texDepth = new ofTexture();


 }

 //--------------------------------------------------------------
 void ofApp::update(){
kinect.update();
if( kinect.isFrameNew() ){
    texDepth->loadData( kinect.getDepthPixels() );
    texRGB.loadData( kinect.getRgbPixels() );
 //        //ofMesh mesh;
 //        vbomesh.clear();
 //        vbomesh.setMode(OF_PRIMITIVE_POINTS);
 //
 //     int skpDepth = 4;
 //     for(int x=0; x < DEPTH_WIDTH; x+=skpDepth) {
 //         for(int y=0; y < DEPTH_HEIGHT; y+=skpDepth) {
 //             float distance = kinect.getDepthPixels()[y * DEPTH_WIDTH + x]; //        getDistanceAt(x, y);
 //                
 //             if(distance > 100. && distance < 1100) {
 //                 vbomesh.addVertex(ofVec3f(x, y, distance));
 //             }
 //         }
 //     }
}
 }

//--------------------------------------------------------------
void ofApp::draw(){
//    texDepth.draw(10, 100);
//    texRGB.draw(10, 110 + texDepth.getHeight(), 1920/4, 1080/4);

if (texRGB.isAllocated()) {
    syphonServerRGB.publishTexture(&texRGB);
}

if (texDepth->isAllocated()){
    syphonServerDepth.publishTexture(texDepth);
}


ofSetColor(255, 255, 255);

easyCam.begin();
drawPointCloud();
easyCam.end();

// draw instructions
ofSetColor(255, 255, 255);
stringstream reportStream;
reportStream
<< "fps: " << ofGetFrameRate() << endl
<< "step = " << step << endl
<< "pointSize = " << pointSize << endl;
ofDrawBitmapString(reportStream.str(),20,20);
}

 void ofApp::exit(){
delete texDepth;
 }
 void ofApp::drawPointCloud() {
 //    if (!texDepth.isAllocated()) return;

ofVboMesh mesh;
mesh.setMode(OF_PRIMITIVE_POINTS);
int step = 4;
for(int y = 0; y < DEPTH_HEIGHT; y += step) {
    for(int x = 0; x < DEPTH_WIDTH; x += step) {
        float distance = 10.0;//kinect.getDepthPixels()[y * DEPTH_WIDTH + x];
        if(distance > 0. && distance < 10000) {
            //mesh.addColor(kinect.getColorAt(x,y));
            mesh.addVertex(ofVec3f(x,y,distance));
        }
    }
}
glPointSize(2);
ofPushMatrix();
// the projected points are 'upside down' and 'backwards'
ofScale(1, -1, -1);
//ofTranslate(0, 0, -1000); // center the points a bit
ofEnableDepthTest();
//texDepth.bind();
if (vbomesh.getNumVertices() > 0)
    vbomesh.draw();
ofDisableDepthTest();
ofPopMatrix();

 }

 void ofApp::drawPointCloud1() {
if (!texDepth->isAllocated()) return;

ofMesh mesh;
mesh.setMode(OF_PRIMITIVE_POINTS);
int step = 4;
for(int y = 0; y < DEPTH_HEIGHT; y += step) {
    for(int x = 0; x < DEPTH_WIDTH; x += step) {
        float distance = kinect.getDepthPixels()[y * DEPTH_WIDTH + x];
        if(distance > 0 && distance < 10000) {
            //mesh.addColor(kinect.getColorAt(x,y));
            mesh.addVertex(ofVec3f(x,y,distance));
        }
    }
}
glPointSize(2);
ofPushMatrix();
// the projected points are 'upside down' and 'backwards'
ofScale(1, -1, -1);
//ofTranslate(0, 0, -1000); // center the points a bit
ofEnableDepthTest();
mesh.drawVertices();
ofDisableDepthTest();
ofPopMatrix();

 }

 //--------------------------------------------------------------
 void ofApp::keyPressed(int key){

if (key == 's'){
    isSaving = !isSaving;
}

 }

 //--------------------------------------------------------------
 void ofApp::keyReleased(int key){

 }

 //--------------------------------------------------------------
 void ofApp::mouseMoved(int x, int y ){

 }

 //--------------------------------------------------------------
 void ofApp::mouseDragged(int x, int y, int button){

 }

 //--------------------------------------------------------------
 void ofApp::mousePressed(int x, int y, int button){

 }

 //--------------------------------------------------------------
 void ofApp::mouseReleased(int x, int y, int button){

 }

 //--------------------------------------------------------------
 void ofApp::windowResized(int w, int h){

 }

 //--------------------------------------------------------------
 void ofApp::gotMessage(ofMessage msg){

 }

 //--------------------------------------------------------------
 void ofApp::dragEvent(ofDragInfo dragInfo){ 

 }

Beginner Questions Reguarding documentation

@ofTheo Hi. Does this have the same documentation as libfreenect2? Does it have the same documentation as ofxKinect? Are there any diferences between its documentation and the ofxKinect documentation? Where can I find the documentation?

On Windows 10 - VS 2019: crashes after successful build

Thanks for the Addon!

I'm trying to run an empty project on Windows 10 in VS 2019. Using the project builder and adding ofxKinectV2 as an addon, everything appears to be working properly, the "console" part of the program in the back opens normally, but before the main window loads I get the error:

The program '[3904] test_ofxK2_3_debug.exe' has exited with code -1073741701 (0xc000007b).

I might have gotten it completely wrong from the beginning - sorry if my question is that of an absolute noob but such a noob I am with VS :D

hand detection?

Is there any way to use this library to do hand detection?

License

Hi, thanks for making this great add-on! I noticed that this project, while public, doesn't have an open source license attached to it, preventing use, contributions, derivative work, etc. Is this intentional, and is it okay if we use this code as part of an open source project? Thank you!

opencl_depth_packet_processor.cpp Compile Errors

Hi there, I'm trying to compile the example but am running into errors when compiling the opencl_depth_packet_processor.cpp file. Note: I am using OF v0.8.4, while the README says optimized for v0.9.0, could this be related?

/Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:73:44: warning: missing terminating '"' character [-Winvalid-pp-token]
static const std::string clInlineSource = R"(
                                           ^
/Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:73:43: error: use of undeclared identifier 'R'
static const std::string clInlineSource = R"(
                                          ^
/Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:455:2: warning: missing terminating '"' character [-Winvalid-pp-token]
)";
 ^
/Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:998:13: error: allocation of incomplete type 'libfreenect2::OpenCLDepthPacketProcessorImpl'
  impl_(new OpenCLDepthPacketProcessorImpl(deviceId))
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:29:
../../../addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/depth_packet_processor.h:168:7: note: forward declaration of 'libfreenect2::OpenCLDepthPacketProcessorImpl'
class OpenCLDepthPacketProcessorImpl;
      ^
/Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:1004:3: warning: deleting pointer to incomplete type 'libfreenect2::OpenCLDepthPacketProcessorImpl' may cause undefined behavior [-Wdelete-incomplete]
  delete impl_;
  ^      ~~~~~
In file included from /Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:29:
../../../addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/depth_packet_processor.h:168:7: note: forward declaration of 'libfreenect2::OpenCLDepthPacketProcessorImpl'
class OpenCLDepthPacketProcessorImpl;
      ^
/Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:1011:13: error: member access into incomplete type 'libfreenect2::OpenCLDepthPacketProcessorImpl'
  if ( impl_->config.MaxDepth != config.MaxDepth 
            ^
In file included from /Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:29:
../../../addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/depth_packet_processor.h:168:7: note: forward declaration of 'libfreenect2::OpenCLDepthPacketProcessorImpl'
class OpenCLDepthPacketProcessorImpl;
      ^
/Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:1015:10: error: member access into incomplete type 'libfreenect2::OpenCLDepthPacketProcessorImpl'
    impl_->programBuilt = false;
         ^
In file included from /Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:29:
../../../addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/depth_packet_processor.h:168:7: note: forward declaration of 'libfreenect2::OpenCLDepthPacketProcessorImpl'
class OpenCLDepthPacketProcessorImpl;
      ^
/Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:1016:10: error: member access into incomplete type 'libfreenect2::OpenCLDepthPacketProcessorImpl'
    impl_->programInitialized = false;
         ^
In file included from /Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:29:
../../../addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/depth_packet_processor.h:168:7: note: forward declaration of 'libfreenect2::OpenCLDepthPacketProcessorImpl'
class OpenCLDepthPacketProcessorImpl;
      ^
/Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:1018:17: error: member access into incomplete type 'libfreenect2::OpenCLDepthPacketProcessorImpl'
  else if (impl_->config.EnableBilateralFilter != config.EnableBilateralFilter
                ^
In file included from /Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:29:
../../../addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/depth_packet_processor.h:168:7: note: forward declaration of 'libfreenect2::OpenCLDepthPacketProcessorImpl'
class OpenCLDepthPacketProcessorImpl;
      ^
/Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:1022:10: error: member access into incomplete type 'libfreenect2::OpenCLDepthPacketProcessorImpl'
    impl_->programInitialized = false;
         ^
In file included from /Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:29:
../../../addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/depth_packet_processor.h:168:7: note: forward declaration of 'libfreenect2::OpenCLDepthPacketProcessorImpl'
class OpenCLDepthPacketProcessorImpl;
      ^
/Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:1025:8: error: member access into incomplete type 'libfreenect2::OpenCLDepthPacketProcessorImpl'
  impl_->config = config;
       ^
In file included from /Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:29:
../../../addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/depth_packet_processor.h:168:7: note: forward declaration of 'libfreenect2::OpenCLDepthPacketProcessorImpl'
class OpenCLDepthPacketProcessorImpl;
      ^
/Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:1026:13: error: member access into incomplete type 'libfreenect2::OpenCLDepthPacketProcessorImpl'
  if (!impl_->programBuilt)
            ^
In file included from /Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:29:
../../../addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/depth_packet_processor.h:168:7: note: forward declaration of 'libfreenect2::OpenCLDepthPacketProcessorImpl'
class OpenCLDepthPacketProcessorImpl;
      ^
/Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:1027:10: error: member access into incomplete type 'libfreenect2::OpenCLDepthPacketProcessorImpl'
    impl_->buildProgram(impl_->sourceCode);
         ^
In file included from /Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:29:
../../../addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/depth_packet_processor.h:168:7: note: forward declaration of 'libfreenect2::OpenCLDepthPacketProcessorImpl'
class OpenCLDepthPacketProcessorImpl;
      ^
/Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:1040:8: error: member access into incomplete type 'libfreenect2::OpenCLDepthPacketProcessorImpl'
  impl_->fill_trig_table(p0table);
       ^
In file included from /Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:29:
../../../addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/depth_packet_processor.h:168:7: note: forward declaration of 'libfreenect2::OpenCLDepthPacketProcessorImpl'
class OpenCLDepthPacketProcessorImpl;
      ^
/Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:1045:47: error: member access into incomplete type 'libfreenect2::OpenCLDepthPacketProcessorImpl'
  std::copy(xtable, xtable + TABLE_SIZE, impl_->x_table);
                                              ^
In file included from /Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:29:
../../../addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/depth_packet_processor.h:168:7: note: forward declaration of 'libfreenect2::OpenCLDepthPacketProcessorImpl'
class OpenCLDepthPacketProcessorImpl;
      ^
/Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:1046:47: error: member access into incomplete type 'libfreenect2::OpenCLDepthPacketProcessorImpl'
  std::copy(ztable, ztable + TABLE_SIZE, impl_->z_table);
                                              ^
In file included from /Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:29:
../../../addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/depth_packet_processor.h:168:7: note: forward declaration of 'libfreenect2::OpenCLDepthPacketProcessorImpl'
class OpenCLDepthPacketProcessorImpl;
      ^
/Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:1051:39: error: member access into incomplete type 'libfreenect2::OpenCLDepthPacketProcessorImpl'
  std::copy(lut, lut + LUT_SIZE, impl_->lut11to16);
                                      ^
In file included from /Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:29:
../../../addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/depth_packet_processor.h:168:7: note: forward declaration of 'libfreenect2::OpenCLDepthPacketProcessorImpl'
class OpenCLDepthPacketProcessorImpl;
      ^
/Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:1058:12: error: member access into incomplete type 'libfreenect2::OpenCLDepthPacketProcessorImpl'
  if(!impl_->programInitialized && !impl_->initProgram())
           ^
In file included from /Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:29:
../../../addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/depth_packet_processor.h:168:7: note: forward declaration of 'libfreenect2::OpenCLDepthPacketProcessorImpl'
class OpenCLDepthPacketProcessorImpl;
      ^
/Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:1064:8: error: member access into incomplete type 'libfreenect2::OpenCLDepthPacketProcessorImpl'
  impl_->startTiming();
       ^
In file included from /Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:29:
../../../addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/depth_packet_processor.h:168:7: note: forward declaration of 'libfreenect2::OpenCLDepthPacketProcessorImpl'
class OpenCLDepthPacketProcessorImpl;
      ^
/Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:1066:8: error: member access into incomplete type 'libfreenect2::OpenCLDepthPacketProcessorImpl'
  impl_->ir_frame->timestamp = packet.timestamp;
       ^
In file included from /Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:29:
../../../addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/depth_packet_processor.h:168:7: note: forward declaration of 'libfreenect2::OpenCLDepthPacketProcessorImpl'
class OpenCLDepthPacketProcessorImpl;
      ^
/Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:1067:8: error: member access into incomplete type 'libfreenect2::OpenCLDepthPacketProcessorImpl'
  impl_->depth_frame->timestamp = packet.timestamp;
       ^
In file included from /Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:29:
../../../addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/depth_packet_processor.h:168:7: note: forward declaration of 'libfreenect2::OpenCLDepthPacketProcessorImpl'
class OpenCLDepthPacketProcessorImpl;
      ^
/Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:1068:8: error: member access into incomplete type 'libfreenect2::OpenCLDepthPacketProcessorImpl'
  impl_->ir_frame->sequence = packet.sequence;
       ^
In file included from /Users/bdorse/Documents/of_v0.8.4_osx_release/addons/ofxKinectV2/libs/libfreenect2/src/opencl_depth_packet_processor.cpp:29:
../../../addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/depth_packet_processor.h:168:7: note: forward declaration of 'libfreenect2::OpenCLDepthPacketProcessorImpl'
class OpenCLDepthPacketProcessorImpl;
      ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
3 warnings and 20 errors generated.

Unable to build under Linux

Here's my complete build log. I have been able to build successfully under macOS, but running on elementary OS/Ubuntu, I get these errors about Logging.h. I have the same problem building under both Clang and GCC. I'm not sure what would be different across the platforms...

aroman@sensei:~/Developer/openFrameworks/addons/ofxKinectV2/example% ls
addons.make  config.make  Makefile                      openFrameworks-Info.plist  src
bin          DerivedData  ofxKinectV2Example.xcodeproj  Project.xcconfig
aroman@sensei:~/Developer/openFrameworks/addons/ofxKinectV2/example% make
HOST_OS=Linux
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl glfw3 gl glu glew gtk+-3.0 
Compiling OF library for Release
make[1]: Entering directory '/home/aroman/Developer/openFrameworks/libs/openFrameworksCompiled/project'
HOST_OS=Linux
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl glfw3 gl glu glew gtk+-3.0 
HOST_OS=Linux
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl glfw3 gl glu glew gtk+-3.0 
HOST_OS=Linux
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl glfw3 gl glu glew gtk+-3.0 
Done!
make[1]: Leaving directory '/home/aroman/Developer/openFrameworks/libs/openFrameworksCompiled/project'


Compiling example for Release
make[1]: Entering directory '/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/example'
HOST_OS=Linux
checking pkg-config libraries:   cairo zlib gstreamer-app-1.0 gstreamer-1.0 gstreamer-video-1.0 gstreamer-base-1.0 libudev freetype2 fontconfig sndfile openal openssl glfw3 gl glu glew gtk+-3.0 
cat: obj/linux64/Release/.compiler_flags: No such file or directory
Compiling /home/aroman/Developer/openFrameworks/addons/ofxKinectV2/example/src/ofApp.cpp
g++ -c -O3 -DNDEBUG -march=native -mtune=native -Wall -std=c++14 -DGCC_HAS_REGEX -DOF_USING_GTK -DOF_USING_GTK  -pthread -I/usr/include/gstreamer-1.0 -I/usr/lib/x86_64-linux-gnu/gstreamer-1.0/include -I/usr/include/AL -I/usr/include/libdrm -I/usr/include/gtk-3.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/at-spi-2.0 -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/usr/include/gtk-3.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/mirclient -I/usr/include/mircommon -I/usr/include/mircookie -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng12 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/home/aroman/Developer/openFrameworks/libs/fmodex/include -I/home/aroman/Developer/openFrameworks/libs/glfw/include -I/home/aroman/Developer/openFrameworks/libs/glfw/include/GLFW -I/home/aroman/Developer/openFrameworks/libs/kiss/include -I/home/aroman/Developer/openFrameworks/libs/poco/include -I/home/aroman/Developer/openFrameworks/libs/tess2/include -I/home/aroman/Developer/openFrameworks/libs/utf8cpp/include -I/home/aroman/Developer/openFrameworks/libs/utf8cpp/include/utf8 -I/home/aroman/Developer/openFrameworks/libs/openFrameworks -I/home/aroman/Developer/openFrameworks/libs/openFrameworks/sound -I/home/aroman/Developer/openFrameworks/libs/openFrameworks/video -I/home/aroman/Developer/openFrameworks/libs/openFrameworks/app -I/home/aroman/Developer/openFrameworks/libs/openFrameworks/events -I/home/aroman/Developer/openFrameworks/libs/openFrameworks/math -I/home/aroman/Developer/openFrameworks/libs/openFrameworks/3d -I/home/aroman/Developer/openFrameworks/libs/openFrameworks/graphics -I/home/aroman/Developer/openFrameworks/libs/openFrameworks/utils -I/home/aroman/Developer/openFrameworks/libs/openFrameworks/communication -I/home/aroman/Developer/openFrameworks/libs/openFrameworks/gl -I/home/aroman/Developer/openFrameworks/libs/openFrameworks/types -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/example/ofxKinectV2Example.xcodeproj/project.xcworkspace -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/example/ofxKinectV2Example.xcodeproj/project.xcworkspace/xcuserdata -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/example/ofxKinectV2Example.xcodeproj/project.xcworkspace/xcuserdata/theo.xcuserdatad -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/example/ofxKinectV2Example.xcodeproj/xcshareddata -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/example/ofxKinectV2Example.xcodeproj/xcshareddata/xcschemes -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/example/src -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/example/DerivedData -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/example/DerivedData/ofxKinectV2Example -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/example/DerivedData/ofxKinectV2Example/TextIndex -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/src -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2 -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/src -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/src/shader -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2 -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/internal -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/internal/CL -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/internal/libfreenect2 -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/internal/libfreenect2/protocol -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/internal/libfreenect2/usb -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/protonect -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libusb -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libusb/lib -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libusb/lib/vs -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libusb/lib/vs/x64 -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libusb/lib/vs/x64/Debug -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libusb/lib/vs/x64/Debug/dll -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libusb/lib/vs/x64/Release -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libusb/lib/vs/x64/Release/dll -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libusb/lib/vs/Win32 -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libusb/lib/vs/Win32/Debug -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libusb/lib/vs/Win32/Debug/dll -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libusb/lib/vs/Win32/Release -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libusb/lib/vs/Win32/Release/dll -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libusb/lib/osx -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libusb/include -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libusb/include/libusb -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libusb/include/libusb/os -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2 -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/internal -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/internal/CL -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/internal/libfreenect2 -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/internal/libfreenect2/protocol -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/internal/libfreenect2/usb -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libusb/include -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libusb/include/libusb -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libusb/include/libusb/os -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libusb/include/libusb -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/internal -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/internal/libfreenect2/usb -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/protonect -I/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/src -Isrc -I/home/aroman/Developer/openFrameworks/addons/ofxGui/src -MMD -MP -MF obj/linux64/Release/src/ofApp.d -MT obj/linux64/Release/src/ofApp.o -o obj/linux64/Release/src/ofApp.o -c /home/aroman/Developer/openFrameworks/addons/ofxKinectV2/example/src/ofApp.cpp
In file included from /usr/include/X11/Xlib.h:44:0,
                 from /usr/include/GL/glx.h:30,
                 from /home/aroman/Developer/openFrameworks/libs/openFrameworks/utils/ofConstants.h:184,
                 from /home/aroman/Developer/openFrameworks/libs/openFrameworks/ofMain.h:5,
                 from /home/aroman/Developer/openFrameworks/addons/ofxKinectV2/example/src/ofApp.h:3,
                 from /home/aroman/Developer/openFrameworks/addons/ofxKinectV2/example/src/ofApp.cpp:1:
/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/logger.h:46:5: error: expected identifier before numeric constant
     None = 0,
     ^
/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/logger.h:46:5: error: expected ‘}’ before numeric constant
/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/logger.h:46:5: error: expected unqualified-id before numeric constant
In file included from /home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/protonect/ofProtonect.h:12:0,
                 from /home/aroman/Developer/openFrameworks/addons/ofxKinectV2/src/ofxKinectV2.h:11,
                 from /home/aroman/Developer/openFrameworks/addons/ofxKinectV2/example/src/ofApp.h:4,
                 from /home/aroman/Developer/openFrameworks/addons/ofxKinectV2/example/src/ofApp.cpp:1:
/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/logger.h:52:10: error: ‘Level’ does not name a type
   static Level getDefaultLevel();
          ^
/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/logger.h:53:32: error: ‘Level’ was not declared in this scope
   static std::string level2str(Level level);
                                ^
/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/logger.h:55:19: error: declaration of ‘~libfreenect2::Logger’ as non-member
   virtual ~Logger();
                   ^
/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/logger.h:57:11: error: ‘Level’ does not name a type
   virtual Level level() const;
           ^
/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/logger.h:59:20: error: ‘virtual’ outside class declaration
   virtual void log(Level level, const std::string &message) = 0;
                    ^
/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/logger.h:59:20: error: variable or field ‘log’ declared void
/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/logger.h:59:20: error: ‘Level’ was not declared in this scope
/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/logger.h:59:33: error: expected primary-expression before ‘const’
   virtual void log(Level level, const std::string &message) = 0;
                                 ^
/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/logger.h:60:1: error: expected unqualified-id before ‘protected’
 protected:
 ^
/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/logger.h:64:2: error: ‘Logger’ does not name a type
  Logger *createConsoleLogger(Logger::Level level);
  ^
/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/logger.h:65:2: error: ‘Logger’ does not name a type
  Logger *createConsoleLoggerWithDefaultLevel();
  ^
/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/logger.h:68:2: error: ‘Logger’ does not name a type
  Logger *getGlobalLogger();
  ^
/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/logger.h:69:23: error: variable or field ‘setGlobalLogger’ declared void
  void setGlobalLogger(Logger *logger);
                       ^
/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/logger.h:69:23: error: ‘Logger’ was not declared in this scope
/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/logger.h:69:23: note: suggested alternative:
/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/logger.h:40:8: note:   ‘libfreenect2::Logger’
 class  Logger
        ^
/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/logger.h:69:31: error: ‘logger’ was not declared in this scope
  void setGlobalLogger(Logger *logger);
                               ^
/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/libs/libfreenect2/include/libfreenect2/logger.h:71:1: error: expected declaration before ‘}’ token
 } /* namespace libfreenect2 */
 ^
/home/aroman/Developer/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:200: recipe for target 'obj/linux64/Release/src/ofApp.o' failed
make[1]: *** [obj/linux64/Release/src/ofApp.o] Error 1
make[1]: Leaving directory '/home/aroman/Developer/openFrameworks/addons/ofxKinectV2/example'
/home/aroman/Developer/openFrameworks/libs/openFrameworksCompiled/project/makefileCommon/compile.project.mk:125: recipe for target 'Release' failed
make: *** [Release] Error 2
aroman@sensei:~/Developer/openFrameworks/addons/ofxKinectV2/example%

No inputs on Example

Hey, I'm able to compile the example and it even detects my Kinect.
However, it fails to get any input. Do I need to install any other software besides the addon?

[Info] [Freenect2Impl] enumerating devices...
[Info] [Freenect2Impl] 1 usb devices connected
[Info] [Freenect2Impl] found valid Kinect v2 @20:13 with serial 115837341047
[Info] [Freenect2Impl] found 1 devices
[Info] [OpenCLDepthPacketProcessorImpl]  devices:
[Info] [OpenCLDepthPacketProcessorImpl]   0: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz (CPU)[Intel]
[Info] [OpenCLDepthPacketProcessorImpl]   1: Intel(R) Iris(TM) Graphics 6100 (GPU)[Intel Inc.]
[Info] [OpenCLDepthPacketProcessorImpl] selected device: Intel(R) Iris(TM) Graphics 6100 (GPU)[Intel Inc.]
[Info] [OpenCLDepthPacketProcessorImpl] building OpenCL program...
[Info] [OpenCLDepthPacketProcessorImpl] OpenCL program built successfully
[Info] [Freenect2Impl] enumerating devices...
[Info] [Freenect2Impl] 1 usb devices connected
[Info] [Freenect2Impl] found valid Kinect v2 @20:13 with serial 115837341047
[Info] [Freenect2Impl] found 1 devices
[Info] [Freenect2DeviceImpl] opening...
[Info] [Freenect2DeviceImpl] transfer pool sizes rgb: 20*16384 ir: 4*128*33792
[Info] [Freenect2DeviceImpl] opened
[Info] [OpenCLDepthPacketProcessorImpl] building OpenCL program...
[Info] [OpenCLDepthPacketProcessorImpl] OpenCL program built successfully
[Info] [Freenect2DeviceImpl] starting...
[Debug] [Freenect2DeviceImpl] status 0x090000: 1073741824
[Debug] [Freenect2DeviceImpl] status 0x090000: timeout
[Debug] [Freenect2DeviceImpl] status 0x090000: 1073741824
[Info] [Freenect2DeviceImpl] submitting rgb transfers...
[Info] [Freenect2DeviceImpl] submitting depth transfers...
[Info] [Freenect2DeviceImpl] started
[verbose] ofProtonect::openKinect: device serial: 115837341047
[verbose] ofProtonect::openKinect: device firmware: 4.0.3916.0
[ error ] ofProtonect::updateKinect: Timeout serial: 115837341047
[ error ] ofGLUtils: ofGetGLInternalFormatFromPixelFormat(): unknown OF pixel format OF_PIXELS_UNKNOWN, returning GL_RGBA
[ error ] ofGLUtils: ofGetGLFormatFromPixelFormat(): unknown OF pixel format OF_PIXELS_UNKNOWN, returning GL_LUMINANCE
[ error ] ofTexture: allocate(): ofTextureData has 0 width and/or height: 0x0

Taking the address of a temporary object of type 'Freenect Device'

Error comes up as
Taking the address of a temporary objet of type 'Freenect2Device'::Color Camera Params in Proctnect.h

Also shows off a yellow flag in the same two places.

libfreenect2::Freenect2Device::ColorCameraParams* getColorCameraParams() {
			if (!dev) { return nullptr; }
			return &dev->getColorCameraParams(); //here
		}
		libfreenect2::Freenect2Device::IrCameraParams* getIrCameraParams() {
			if (!dev) { return nullptr; }
			return &dev->getIrCameraParams(); //here
		}

Xcode is ver 8.1
Openframeworks testing on stable, and 0.9.2.
macOS is Sierra.
Using macbook air 2014 ss release.

I don't see the superspeed come up, so maybe this is the problem, but any help?

fatal error: 'ofxKinectV2.h' file not found

Just pull down and correct the path to the OF root path, then make, get this error.
Is there anyone who know how can I fix this?

HOST_OS=Darwin
Compiling OF library for Release
HOST_OS=Darwin
HOST_OS=Darwin
HOST_OS=Darwin
Done!

Compiling example for Release
HOST_OS=Darwin
Compiling /Users/zhoujiahui/Kinect/ofxKinectV2-master/example/src/main.cpp
c++ -c -Os -DNDEBUG -mtune=native -stdlib=libc++ -Wall -fexceptions -fpascal-strings -mmacosx-version-min=10.7 -D__MACOSX_CORE__ -x objective-c++ -std=c++11 -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/FreeImage/include -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/boost/include -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/boost/include/boost -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/cairo/include -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/cairo/include/cairo -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/fmodex/include -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/freetype/include -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/freetype/include/freetype2 -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/freetype/include/freetype2/config -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/freetype/include/freetype2/internal -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/freetype/include/freetype2/internal/services -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/glew/include -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/glew/include/GL -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/glfw/include -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/glfw/include/GLFW -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/glut/include -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/openssl/include -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/openssl/include/openssl -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/poco/include -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/rtAudio/include -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/tess2/include -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/utf8cpp/include -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/utf8cpp/include/utf8 -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/openFrameworks -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/openFrameworks/3d -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/openFrameworks/app -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/openFrameworks/communication -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/openFrameworks/events -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/openFrameworks/gl -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/openFrameworks/graphics -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/openFrameworks/math -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/openFrameworks/sound -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/openFrameworks/types -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/openFrameworks/utils -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/libs/openFrameworks/video -I/Users/zhoujiahui/Kinect/ofxKinectV2-master/example/DerivedData -I/Users/zhoujiahui/Kinect/ofxKinectV2-master/example/DerivedData/ofxKinectV2Example -I/Users/zhoujiahui/Kinect/ofxKinectV2-master/example/DerivedData/ofxKinectV2Example/TextIndex -I/Users/zhoujiahui/Kinect/ofxKinectV2-master/example/ofxKinectV2Example.xcodeproj/project.xcworkspace -I/Users/zhoujiahui/Kinect/ofxKinectV2-master/example/ofxKinectV2Example.xcodeproj/project.xcworkspace/xcuserdata -I/Users/zhoujiahui/Kinect/ofxKinectV2-master/example/ofxKinectV2Example.xcodeproj/project.xcworkspace/xcuserdata/theo.xcuserdatad -I/Users/zhoujiahui/Kinect/ofxKinectV2-master/example/ofxKinectV2Example.xcodeproj/project.xcworkspace/xcuserdata/zhoujiahui.xcuserdatad -I/Users/zhoujiahui/Kinect/ofxKinectV2-master/example/ofxKinectV2Example.xcodeproj/xcshareddata -I/Users/zhoujiahui/Kinect/ofxKinectV2-master/example/ofxKinectV2Example.xcodeproj/xcshareddata/xcschemes -I/Users/zhoujiahui/Kinect/ofxKinectV2-master/example/src -I/Users/zhoujiahui/Kinect/of_v0.9.8_osx_release/addons/ofxGui/src -MMD -MP -MF obj/osx/Release/src/main.d -MT obj/osx/Release/src/main.o -o obj/osx/Release/src/main.o -c /Users/zhoujiahui/Kinect/ofxKinectV2-master/example/src/main.cpp
In file included from /Users/zhoujiahui/Kinect/ofxKinectV2-master/example/src/main.cpp:2:
/Users/zhoujiahui/Kinect/ofxKinectV2-master/example/src/ofApp.h:4:10: fatal error: 'ofxKinectV2.h' file not found
#include "ofxKinectV2.h"
^~~~~~~~~~~~~~~
1 error generated.
make[1]: *** [obj/osx/Release/src/main.o] Error 1
make: *** [Release] Error 2

How to make it run in VS 2019? - getting LIBUSB_ERROR_NOT_SUPPORTED

Hi - thanks again for the Addon!

Trying to run it in VS 2019 on Windows 10 and after the application window has launched properly but with black screens (no image), in the app's console I get four errors related to LIBUSB_ERROR_NOT_SUPPORTED:

  • [Error] [Freenect2Impl] failed to open Kinect v2: @1:9 LIBUSB_ERROR_NOT_SUPPORTED Operation not supported or unimplemented on this platform (TWICE)

  • [Error] [protocol::UsbControl] failed to claim interface with IrInterfaceId(=1)! LIBUSB_ERROR_NOT_SUPPORTED Operation not supported or unimplemented on this platform. Try debugging with environment variable: export LIBUSB_DEBUG=3 .

  • [Error] [Freenect2Impl] failed to open Kinect v2: @1:9

Also the device does not seem to be properly activated, i.e. I get no red light triplet on the front panel.

Any idea how I can make it work on VS 2019?
Thanks!

Using self compiled libfreenect2 with CUDA support?

Hey,
Thanks for this awesome addon. I built libfreenect2 from source on my machine with CUDA support. I was wondering how would I go for using it instead of the precompiled lib that is coming with this addon. Is it as simple as replacing the /libs/libfreenect2 folder? Or is there more that needs to be done?

I am trying to get a little bit more performance and stability out of this. I keep getting BSODs on one of my test machines when using multiple Kinects.

How to get correct bigdepth(rgb->depth)?

When I run feature-world coordinate branch, rgb frame->bytes_per_pixel == 3 in ofPronect.cpp.

On the other hand, when I run following simple code, I got a value of cout << rgb->bytes_per_pixel << endl; == 4. Why is rgb frame bytes_per_pixel value different?

#include <iostream>
#include <stdio.h>
#include <iomanip>
#include <time.h>
#include <signal.h>
#include <opencv2/opencv.hpp>
#include <cstdint>

#include <libfreenect2/libfreenect2.hpp>
#include <libfreenect2/frame_listener_impl.h>
#include <libfreenect2/registration.h>
#include <libfreenect2/packet_pipeline.h>
#include <libfreenect2/logger.h>

using namespace std;
using namespace cv;

bool protonect_shutdown = false; // Whether the running application should shut down.

void sigint_handler(int s) {
  protonect_shutdown = true;
}

int main() {
  std::cout << "Streaming from Kinect One sensor!" << std::endl;

  libfreenect2::Freenect2 freenect2;
  libfreenect2::Freenect2Device *dev = 0;
  libfreenect2::PacketPipeline *pipeline = 0;

  if (freenect2.enumerateDevices() == 0) {
    std::cout << "no device connected!" << std::endl;
    return -1;
  }

  string serial = freenect2.getDefaultDeviceSerialNumber();

  std::cout << "SERIAL: " << serial << std::endl;

  if (pipeline) {
    //! [open]
    dev = freenect2.openDevice(serial, pipeline);
    //! [open]
  } else {
    dev = freenect2.openDevice(serial);
  }

  if (dev == 0) {
    std::cout << "failure opening device!" << std::endl;
    return -1;
  }

  signal(SIGINT, sigint_handler);
  protonect_shutdown = false;


  libfreenect2::SyncMultiFrameListener listener(libfreenect2::Frame::Color);
  libfreenect2::FrameMap frames;

  dev->setColorFrameListener(&listener);
  dev->setIrAndDepthFrameListener(&listener);

  dev->start();

  std::cout << "device serial: " << dev->getSerialNumber() << std::endl;
  std::cout << "device firmware: " << dev->getFirmwareVersion() << std::endl;
 

  while (!protonect_shutdown)
  {
    listener.waitForNewFrame(frames);
    libfreenect2::Frame *rgb = frames[libfreenect2::Frame::Color];
    
    cout << rgb->bytes_per_pixel << endl;
   
    listener.release(frames);
  }
  
  dev->stop();
  dev->close();
  
  return 0;
}

I want to use libfreenect's registration -> apply() for handlingbigdepth.

The method must need 4 channel RGB frame.

In the feature-world coordinate branch , empty frame are defined as rbg4 instead of rgb images.

In this way I couldn't get the correct bigdepth.

If you know any good ideas, please let me know m(_ _)m

can't open camera "anymore"

Thanks for all your work.
After following your notes and updating the firmware of the camera I finally could make the program run the other day. But for some reason it doesn't work anymore, tried disconnecting, restarting, reinstalling, everything. No infrared lights or any other indicators on the camera itself, only the white light on the adapter. I'm using a new model (1520). And the osx system report tells me that the NUISensor is connected using usb 3.

Any ideas?

best
jan

Using libusbx v1.0.17.10852

Trying to open device 045E:02D8...
Trying to open device 045E:02C4...
libusbx: error [darwin_reset_device] ResetDevice: unknown error
ofProtonect::openKinect Failed. - handle is NULL

The hardware requirement of multiple Kinect v2

How does ofxKinectV2 work with multiple Kinect V2? And what's the minimum hardware requirement for running them stably?
As I use libfreenect2 on Ubuntu 14.04 with my notebook, when I try to run Protonect with 2 Kinects, only one of them will work, the other programs will break down with errors like this:
[Error] [protocol::UsbControl] failed to set configuration! LIBUSB_ERROR_OTHER Other error. Try debugging with environment variable: export LIBUSB_DEBUG=3 .
[Info] [Freenect2DeviceImpl] closing...
[Error] [protocol::CommandTransaction] bulk transfer failed: LIBUSB_ERROR_IO Input/Output Error
[Error] [protocol::CommandTransaction] bulk transfer failed: LIBUSB_ERROR_IO Input/Output Error
[Info] [Freenect2DeviceImpl] deallocating usb transfer pools...
[Info] [Freenect2DeviceImpl] closing usb device...
[Info] [Freenect2DeviceImpl] closed
[Error] [Freenect2Impl] failed to open Kinect v2: @2:6

Thank you in advance! The work is really helpful as it supports multiple Kinects!

Can't load .jpg images when using ofxKinectV2

Thank you very much for the addon, Theo!

I came across the following issue. I can't open a .jpg image if I have ofxKinectV2 in the addons.make file. Loading .png works fine.

addons.make

ofxKinectV2 <- Remove this to be able to load .jpg

ofApp.h

#include "ofxKinectV2.h" //  comment this to be able to load .jpg
...
    ofImage bImg;

ofApp.cpp

...
void ofApp::draw()
{
    if (bImg.isAllocated())
    {
        bImg.draw(0, 0);
    }
}
...
void ofApp::dragEvent(ofDragInfo dragInfo)
{
    bImg.load(dragInfo.files[dragInfo.files.size() - 1]);
    cout << "Path: " << dragInfo.files[dragInfo.files.size() - 1] << endl;
    cout << "Dimensions: " << bImg.getWidth() << "x" << bImg.getHeight() << endl;
}

When I run the code above and drag a .jpg onto the canvas, I get the following on the terminal:

[ error ] ofImage: loadImage(): couldn't load image from ""/Users/kaua/Desktop/asd.jpg""
Path: /Users/kaua/Desktop/asd.jpg
Dimensions: 0x0

I'm using of_v0.10.1_osx_release on macOS 10.14.4.

Can't allocate an array of constant size 0 in libfreenect2

Hi,

I encounter an error when compiling a project with ofxKinectV2 on Windows 10, Visual Studio 2015 and of 0.9.2.

The line 48 of resource.cpp file in libfreenect2 lib cause a "cannot allocate an array of constant size 0" error (C2466) :

#ifdef RESOURCES_INC
#include "resources.inc.h"
#else
static ResourceDescriptor resource_descriptors[] = {};
static int resource_descriptors_length = 0;
#endif

It seems to be related to this issue in libfreenect2, but it doesn't cause error when compiling libfreenect2 project, because RESOURCES_INC macro is defined so this code is not compiled (and so the error isn't really fixed)

I didn't see any "resources.inc.h" file in the addon, so I don't know if it could be possible to bypass this error, or if I should report this issue to libfreenect team ?

Example crashes on init

Hi Theo,

I cant seem to get the example to run. It always crashes on Cmd seq 9. I see speed : (null) in the console as the last thing before the crash. I think its when its trying to do call the following function libusb_get_device_speed im using libusbx v1.0.17.10852. I also looked at the libfreenect2 repo and ran their example. From that I could see the rgb cam frames but not depth data.
Ive run out of ideas of things to try am I doing something stupid Im not aware of? Using 0.8.3.

Thanks

Surya

flash Kinect firmware

Hi,

the readme says "Kinect needs to have flashed firmware ( this currently needs to be done on Windows 8 )". But I cant find any information on how to do that.

Any pointers?

Thanks
Nadja

Confirm linux64 and linuxarmv7l

@madelinegannon @bakercp

@NickHardeman and I have done a cleanup to ofxKinectV2 - going back to using the libfreenect source to make it easier to build for mac and windows.

Both mac and windows build fine now with the projectGenerator.
Could you check on Linux and see if anything needs adding to addons_config.mk?

Lots of nice new features like ofxKinecV2::Settings which allows for streams to be toggled on and off and max depth range to be changed.

See: https://github.com/ofTheo/ofxKinectV2/blob/master/src/ofxKinectV2.h#L25

On quitting: application does not quit and has to be "Force quit", warning: application left some devices open

See subj. Kinect has to be powercycled to be usable again.

The complete (from start to quit) follows:

Using libusbx v1.0.17.10852

Trying to open device 045E:02D8...
speed: 5000 Mbit/s (USB SuperSpeed)
active configuration: 1, err: 0
Claiming interface 0...
libusbx: info [darwin_claim_interface] no interface found; setting configuration: 1

Claiming interface 1...
running kinect...
Control transfer 1 - set isoch delay
Control transfer 2 - set sel u1/u2

Setting interface alt setting...
Setting stream status: Disable
Control transfer 3 - enable u1
Control transfer 4 - enable u2
Control transfer 5 - set feature 768
Setting sensor status: Disable
Kinect init done

iso max_packet_size: 33792
speed: 5000 Mbit/s (USB SuperSpeed)
running kinect...
Setting sensor status: Enable

Cmd seq 0 func 0x02 (0)
Cmd sent, 20 bytes sent
Cmd response seq 0 func 0x02 (0)
Cmd response success, 512 bytes received
Received cmd data 0x02 (0), length: 512
Cmd response seq 0 func 0x02 (0)
Cmd response success, 16 bytes received
Cmd response completed
Response complete for cmd 0x02 (0)
dumping 512 bytes of raw data from command KCMD_READ_DATA1:
0x0000: 03 00 02 00 48 0f 00 00 00 00 00 00 00 00 00 00 ....H...........
0x0010: 03 00 02 00 48 0f 00 00 00 00 00 00 00 00 00 00 ....H...........
0x0020: 03 00 02 00 48 0f 00 00 00 00 00 00 00 00 00 00 ....H...........
0x0030: 03 00 02 00 48 0f 00 00 00 00 00 00 00 00 00 00 ....H...........
0x0040: 03 00 02 00 48 0f 00 00 00 00 00 00 00 00 00 00 ....H...........
0x0050: 03 00 02 00 48 0f 00 00 00 00 00 00 00 00 00 00 ....H...........
0x0060: 03 00 02 00 48 0f 00 00 00 00 00 00 00 00 00 00 ....H...........
0x0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0080: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0090: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x00a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x00b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x00c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x00d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x00e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x00f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0100: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0110: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0120: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0130: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0140: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0150: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0160: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0170: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0180: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0190: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x01a0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x01b0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x01c0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x01d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x01e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x01f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

Cmd seq 1 func 0x14 (0)
Cmd sent, 20 bytes sent
Cmd response seq 1 func 0x14 (0)
Cmd response success, 92 bytes received
Received cmd data 0x14 (0), length: 92
Cmd response seq 1 func 0x14 (0)
Cmd response success, 16 bytes received
Cmd response completed
Response complete for cmd 0x14 (0)
dumping 92 bytes of raw data from command KCMD_READ_VERSIONS:
0x0000: 00 00 12 00 00 00 00 00 01 00 00 00 43 c1 1f 41 ............C..A
0x0010: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0020: 0a 21 33 55 c2 00 17 20 00 08 00 00 10 00 00 00 .!3U... ........
0x0030: 00 01 00 00 00 10 00 00 00 00 80 00 01 00 00 00 ................
0x0040: 31 33 00 00 00 04 13 04 47 4d 43 38 30 34 2e 31 13......GMC804.1
0x0050: 58 00 00 00 00 00 00 00 00 00 00 00 X...........

Cmd seq 2 func 0x22 (0x1)
Cmd sent, 24 bytes sent
Cmd response seq 2 func 0x22 (0x1)
Cmd response success, 128 bytes received
Received cmd data 0x22 (0x1), length: 128
Cmd response seq 2 func 0x22 (0x1)
Cmd response success, 16 bytes received
Cmd response completed
Response complete for cmd 0x22 (0x1)
dumping 128 bytes of raw data from command KCMD_READ_DATA_PAGE 0x01:
0x0000: 35 00 30 00 31 00 35 00 32 00 33 00 35 00 34 00 5.0.1.5.2.3.5.4.
0x0010: 31 00 39 00 34 00 32 00 00 00 00 00 00 00 00 00 1.9.4.2.........
0x0020: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0030: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0040: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0050: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0060: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................
0x0070: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................

Cmd seq 3 func 0x22 (0x3)
Cmd sent, 24 bytes sent
Cmd response seq 3 func 0x22 (0x3)
Cmd response success, 92 bytes received
Received cmd data 0x22 (0x3), length: 92
Cmd response seq 3 func 0x22 (0x3)
Cmd response success, 16 bytes received
Cmd response completed
Response complete for cmd 0x22 (0x3)
depth camera intrinsic parameters: fx 365.010315, fy 365.010315, cx 259.066986, cy 207.043594
depth camera radial distortion coeffs: k1 0.092289, k2 -0.273054, p1 0.000000, p2 0.000000, k3 0.098222

Cmd seq 4 func 0x22 (0x2)
Cmd sent, 24 bytes sent
Cmd response seq 4 func 0x22 (0x2)
Cmd response success, 1302882 bytes received
Received cmd data 0x22 (0x2), length: 1302882
Cmd response seq 4 func 0x22 (0x2)
Cmd response success, 16 bytes received
Cmd response completed
Response complete for cmd 0x22 (0x2)

Cmd seq 5 func 0x22 (0x4)
Cmd sent, 24 bytes sent
Cmd response seq 5 func 0x22 (0x4)
Cmd response success, 12981 bytes received
Received cmd data 0x22 (0x4), length: 12981
Cmd response seq 5 func 0x22 (0x4)
Cmd response success, 16 bytes received
Cmd response completed
Response complete for cmd 0x22 (0x4)
1081.37
959.5
539.5
863
52
0.000412203
-3.32267e-05
-1.03431e-06
0.000261537
-0.00106513
-2.11046e-05
0.000270872
0.636668
0.00113992
0.0997265
-3.66343e-05
0.000620034
0.000350574
-3.57244e-05
-5.83431e-05
5.10673e-05
-0.0010234
-0.0011634
0.635936
0.0197555

Cmd seq 6 func 0x16 (0x90000)
Cmd sent, 24 bytes sent
Cmd response seq 6 func 0x16 (0x90000)
Cmd response success, 4 bytes received
Received cmd data 0x16 (0x90000), length: 4
Cmd response seq 6 func 0x16 (0x90000)
Cmd response success, 16 bytes received
Cmd response completed
Response complete for cmd 0x16 (0x90000)
Received status KCMD_READ_STATUS (0x90000): 9729

Cmd seq 7 func 0x09 (0)
Cmd sent, 20 bytes sent
Cmd response seq 7 func 0x09 (0)
Cmd response success, 16 bytes received
Cmd response completed
Response complete for cmd 0x09 (0)
Setting stream status: Enable

Cmd seq 8 func 0x16 (0x90000)
Cmd sent, 24 bytes sent
Cmd response seq 8 func 0x16 (0x90000)
Cmd response success, 4 bytes received
Received cmd data 0x16 (0x90000), length: 4
Cmd response seq 8 func 0x16 (0x90000)
Cmd response success, 16 bytes received
Cmd response completed
Response complete for cmd 0x16 (0x90000)
Received status KCMD_READ_STATUS (0x90000): 9759

Cmd seq 9 func 0x2b (0x1)
Cmd sent, 24 bytes sent
Cmd response seq 9 func 0x2b (0x1)
Cmd response success, 16 bytes received
Cmd response completed
Response complete for cmd 0x2b (0x1)
Set stream status success: Enable
speed: 5000 Mbit/s (USB SuperSpeed)
[DepthPacketStreamParser::handleNewData] not all subsequences received 0
[DepthPacketStreamParser::handleNewData] not all subsequences received 1022
[CpuDepthPacketProcessor] avg. time: 45.6515ms -> ~21.9051Hz
[CpuDepthPacketProcessor] avg. time: 46.5951ms -> ~21.4615Hz
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 0 pipe 3
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 0 pipe 3
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 0 pipe 3
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 0 pipe 3
[TransferPool::submit] transfer submission disabled!
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 0 pipe 3
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 0 pipe 3
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 0 pipe 3
[TransferPool::submit] transfer submission disabled!
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 0 pipe 3
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 0 pipe 3
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
[TransferPool::submit] transfer submission disabled!libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1

libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
[TransferPool::submit] transfer submission disabled!
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
[TransferPool::submit] transfer submission disabled!
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
[TransferPool::submit] transfer submission disabled!
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
[TransferPool::submit] transfer submission disabled!
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
[TransferPool::submit] transfer submission disabled!
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
[TransferPool::submit] transfer submission disabled!
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
[TransferPool::submit] transfer submission disabled!
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
[TransferPool::submit] transfer submission disabled!
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
[TransferPool::submit] transfer submission disabled!libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1

[TransferPool::submit] transfer submission disabled!
libusbx: warning [darwin_abort_transfers] aborting all transactions on interface 1 pipe 1
[TransferPool::submit] transfer submission disabled!
closing kinect...
[TransferPool::submit] transfer submission disabled!Setting sensor status: Disable

[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
[TransferPool::submit] transfer submission disabled!
Releasing interface 0...
Releasing interface 1...
Closing device...
libusbx: warning [libusb_exit] application left some devices open

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.