OpenKinect for Processing: struggling with jni

edited October 10 in Library Questions

Hi all,

I’m trying to help a student who needs to open multiple Kinect 2 devices in a strictly pre specified sequence. My suggestion to him for doing this is to open the Kinect through their serial numbers. But I can’t seem to give him some example code that works even though I made the corresponding java native interface functions public. My main suspicion is that the culprit for this problem is a conversion issue between Java Strings and C Strings. When trying to get the serial number by calling the function jniGetSerialDevice(int index), kinect2_libaccess crashes. And when calling the jniOpenSerial(String serialNumber) function, the console prints the error message "requested device xxxx is not connected!” where xxxx is a seemingly nonsensical number that doesn’t correspond to the number which I passed to it. Can somebody give me some advice how to get this to work?

Thanks a lot and best regards

Daniel
Tagged:
Sign In or Register to comment.