cescofry / cocoa-freenect

A Objective-C wrapper and example project to use libfreenect with Cocoa

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

cocoa-freenect

A Objective-C wrapper and example project to use libfreenect with Cocoa.

Warning to everybody. I no longer have a Kinect and so I am unable to test this code! I am very confident with it from my previous university projects where it worked very well for me.

If you find any problems with please feel free to open a new issue.

Prerequisites

You use this you need to install other things first. Here is a really nice and simple way to get started using the super power called Homebrew!

Right, do these things:

  1. Install Homebrew using the instructions found here
  2. In a terminal do this brew update
  3. Then do this brew install libfreenect

You should now have a shiny new libfreenect (OpenKinect) install!

If you want you can test the installation by plugging in your Kinect, turning on the mains power and running glview in the terminal.

Using the example Xcode project

This should be pretty simple. Just double click on the .xcodeproj file and Xcode should open it up. Make sure you're using Xcode 4+ though.

Next, you should just be able to plug in your Kinect, power it on, press Build in Xcode and then press the Start button in the UI.

You can then rotate the point cloud around which is generated by the Kinect.

Example project errors

Are you experiencing errors while trying to compile? Are you very very confused? Well I can help! There is a good chance I have already come across your problem and have a solution.

If you cannot find a solution here then please open an issue.

Build fails with 'libfreenect/libfreenect.h' file not found

This is probably due to Xcode not being able to find the headers that were installed by brew on your system. To fix this follow these instructions:

  1. In the Project Navigator open up your project configuration
  2. Click on the Build Settings tab
  3. Search for Header Search Paths
  4. Create a new path and enter /usr/local/include - This is the path that Homebrew and many other installations put the header files that relate to libraries.

Build fails with many Apple Mach-O Linker (ld) Error's

This is probably due to the library .dylib file not being found on your system by Xcode. This is an easy one:

  1. In the Project Navigator open up your project configuration
  2. Click on the General tab
  3. Scroll down to Linked Frameworks and Libraries
  4. Click on the add button
  5. In the pop over, click on Add Other…
  6. Press on your keyboard cmd+shift+G
  7. Type in /usr/local/lib - This is where Homebrew and many other installs put the actual library .dylib files.
  8. Then find a file called libfreenect.dylib
  9. Select it and press Open

This also works for lots of other libraries that you might use. You can usually determine the library that is missing by looking at the missing symbols and applying a bit of brain power.

Licensing

This project is covered by the Apache v2 Licence. Please see the LICENSE file included with this project for full information.

About

A Objective-C wrapper and example project to use libfreenect with Cocoa

License:Apache License 2.0


Languages

Language:Objective-C 93.0%Language:C 7.0%