
Getting Kinect to Work with Processing
After installing Daniel Shiffman’s Open Kinect for Processing library, I kept getting an error message stating “a library relies on native code that’s not available, or only works properly when the sketch is run as a 64-bit application.” After many trials attempting to get the kinect to communicate with Processing, I finally got it up and running. There are a couple forums such as this one that try to help people get the kinect library running, but I found it to long and difficult to find one definitive answer. After looking around, I found a way to get the kinect sensor to communicate with Processing.
- I first downloaded Xcode from the Mac App Store. From what I read, this step is needed to access the command line tools that come with the program. Once Xcode was successfully downloaded, I opened and ran the app to make sure it was working.
- Next I downloaded Homebrew. This is needed so that the libusb library can be installed later. To download Homebrew, I entered the following code into the Terminal app (located in the Utilities folder under ‘applications’ on a Mac). I followed the prompts in Terminal until Homebrew was installed.
1 |
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" |
- Once Homebrew is installed, enter the following text into the Terminal window to install libusb, an application which allows other applications to easily access the usb port.
1 |
brew install libusb |
- Afterwards, I went and downloaded a more recent version of the Open Kinect library from here.
- I dragged the two folders into Processing’s ‘Library’ folder.
- I changed the name of the “OpenKinect-Processing” folder to “openkinect” so that it matches the name of the jar file in the ‘lib’ folder.
- I then changed the name of the ‘lib’ folder to ‘library’ because Processing still wasn’t detecting it.
- To test that the kinect was in fact working with Processing, I opened one of the example sketches that came with the Open Kinect library.
Leave a Reply