Tutorial to Setup Microsoft Kinect in Mac OS X 10.9 Mavericks

How to setup Microsoft Kinect on Mac OS X 10.9 (Mavericks)

If you want to get the Microsoft Kinect setup and working on your Mac using OS X 10.9 Mavericks, then you’ve come to the right place. Since posting the first tutorial, a number of new software updates have been released, so it’s a good idea to recap from the start. This tutorial will detail all the steps necessary to get the Kinect working in Mavericks, so buckle up and let’s get this party started.

As always, if you have any questions, issues, or feedback, please feel free to post them in the comments section at the bottom, and to keep abreast of any new updates and posts you can follow me on Twitter, or subscribe using the new email form in the sidebar.  Oh, and if you don’t own a Kinect yet, there’s a few things you’ll need to know, so please check out the buyers guide or.

Preface: Uninstall Existing Kinect Drivers

If you followed my earlier tutorial and/or had your Kinect running in Mac OS X 10.8 Mountain Lion, then you’ll want to complete this step before moving ahead. If you’re new, and are setting up the Kinect in Mac OS X 10.9 Mavericks from scratch then please feel free to skip this and move straight onto Step 1.

When it comes to hacking the Kinect, cleaner is better. So I suggest uninstalling any existing Kinect drivers you might have installed and start fresh. If you’re confident simply upgrading then please feel free to do so, but for everyone else please begin by following the instructions in this article – How to uninstall Kinect drivers on your Mac.

Step 1: Install and upgrade Xcode

If you’re a regular visitor to this site or a developer, you may already have Xcode installed. If so, just make sure you upgrade your Command Line Tools to the latest version for Mavericks.  For everyone else, please follow the tasks below.

1. Install Xcode from the Mac App Store (as of writing, the latest version is 5.0.2). Once installed, open the application and select the menu option Xcode / Open Developer Tool / More Developer Tools…

Xcode 5 Developer Tools2. Clicking this will take you to the Apple Developer website. Simply login using your Apple ID and password and continue until you see the Downloads for Apple Developers screen.

3. In the list of downloads, search for the most recent version of Command Line Tools (OS X Mavericks) for Xcode (as of writing, this is the release from October 23, 2013). Click on the blue disk image link to the right of the description to download.

Install OS X Mavericks Command Line Tools for Xcode4. Once you’ve downloaded the Command Line Tools, simply open the disk image and install the package.

Easy! So now you’re up to date with Xcode, let’s move on to installing the Kinect drivers.

Step 2: Install Additions

Next up is a list of applications/tools that you’ll need to install. The versions mentioned below are the latest at the time of writing, but if there is a more recent version, you should be fine installing that too.

1. Download XQuartz, an open source version of the X.org X Window System for Mac.
I’m using version 2.7.5.

2. Download CMake, a cross-platform build automation system.
Select the download link beside  Mac OSX 64/32-bit Universal (for Intel, Snow Leopard/10.6 or later), I’m using version 2.8.12.2.

Part way through the CMake installation you’ll be asked to Install Command Line Tools, make sure you do this by clicking the Install Command Line Links button.  If you get an error at this point, you’ll need to follow all the uninstallation instructions and then reinstall.

3. Download MacPorts, which allows you to compile, install and upgrade software via Terminal app.
Select the download titled OS X 10.9 Mavericks, I’m using version 2.2.1.

Step 3: Install Dependencies

At this point you’ve installed your primary applications, so now we just need to install a couple of dependencies for later on. Don’t worry, they’re easy!

Libtool: A generic library support tool.

1. To install Libtool, open the Terminal application: Applications / Utilities / Terminal.

2. Next, type in the following:

sudo port install libtool

3. Press Return, and then enter your password when prompted. If all went well, you should see something similar to the following appear in Terminal:

---> Fetching archive for libtool
---> Attempting to fetch libtool-2.4.2_3.darwin_13.x86_64.tbz2 from http://jog.id.packages.macports.org/macports/packages/libtool
---> Attempting to fetch libtool-2.4.2_3.darwin_13.x86_64.tbz2.rmd160 from http://jog.id.packages.macports.org/macports/packages/libtool
---> Installing libtool @2.4.2_3
---> Activating libtool @2.4.2_3
---> Cleaning libtool
---> Updating database of binaries: 100.0%
---> Scanning binaries for linking errors: 100.0%
---> No broken files found.

Libusb: A usb support tool for applications.

Okay, so don’t close Terminal just yet. You’ll need it for this installation too.

1. In Terminal, type in the following:

sudo port install libusb +universal

2. Click Return and then enter your password when prompted.  If everything installed correctly, you should see something similar to this:

---> Fetching archive for libusb
---> Attempting to fetch libusb-1.0.18_0+universal.darwin_13.i386-x86_64.tbz2 from http://jog.id.packages.macports.org/macports/packages/libusb
---> Attempting to fetch libusb-1.0.18_0+universal.darwin_13.i386-x86_64.tbz2 from http://packages.macports.org/libusb
---> Attempting to fetch libusb-1.0.18_0+universal.darwin_13.i386-x86_64.tbz2 from http://mse.uk.packages.macports.org/sites/packages.macports.org/libusb
---> Fetching distfiles for libusb
---> Attempting to fetch libusb-1.0.18.tar.bz2 from http://aarnet.dl.sourceforge.net/libusb
---> Verifying checksums for libusb
---> Extracting libusb
---> Configuring libusb
---> Building libusb
---> Staging libusb into destroot
---> Installing libusb @1.0.18_0+universal
---> Activating libusb @1.0.18_0+universal
---> Cleaning libusb
---> Updating database of binaries: 100.0%
---> Scanning binaries for linking errors: 100.0%
---> No broken files found.

Step 4: Install OpenNi SDK (v1.5.7.10)

Okay, now we’re moving into Kinect territory. OpenNi is the first Kinect-specific software you’ll be installing, so make sure you follow along closely.

Please Note: Do not try to download and install OpenNi v2 beta. Unfortunately this version relies on the native Microsoft Kinect SDK, which is incompatible with the Mac.

OpenNi is created by a group of companies including PrimeSense (now owned by Apple), who developed the original Microsoft Kinect. The OpenNi software itself contains a stack of middleware libraries and applications that will help get you going on your Kinect journey!

1. Create a new folder on your Mac called ‘Kinect’. This will help keep things organised (I’ll be referring to this folder later on).

2. Download OpenNI v1.5.7.10 SDK for Mac OS X.

3. Move the file you just downloaded to your Kinect folder and double click to uncompress and reveal the SDK folder.

OpenNI 1.5.7.10Okay, now you’re now ready to install the OpenNi SDK on your Mac.

4. Open the Terminal application on your Mac: Applications / Utilities / Terminal.

5. We will now navigate to the OpenNi SDK folder using the command. Start by typing in cd, add a space, and finally drag your SDK folder from the Finder onto the Terminal window and press Return. This will automatically enter the file path for you, and look something like this:

Glens-MacBook-Pro:~ glen$ cd /Users/glen/Sites/kinect/OpenNI-Bin-Dev-MacOSX-v1.5.7.10
Glens-MacBook-Pro:OpenNI-Bin-Dev-MacOSX-v1.5.7.10 glen$

6. And now the fun part! Type in the following, press Return and then enter your password to install OpenNi SDK:

sudo ./install.sh

If everything installed correctly, then you’ll see the following text:

Installing OpenNI
****************************
copying shared libraries...OK
copying executables...OK
copying include files...OK
creating database directory...OK
registering module 'libnimMockNodes.dylib'...OK
registering module 'libnimCodecs.dylib'...OK
registering module 'libnimRecorder.dylib'...OK
creating java bindings directory...OK
Installing java bindings...OK
*** DONE ***

Step 5a: Prepare to Install SensorKinect

We need to quickly complete this step to prevent errors during the SensorKinect installation.

1. Open Terminal on your Mac: Applications / Utilities / Terminal.

2. Next type in the following and press Return:

sudo ln -s /usr/local/bin/niReg /usr/bin/niReg

Step 5b: Install SensorKinect

SensorKinect is simply a module that helps the Kinect interact with OpenNI.  You’ll need it for your Kinect to work on your Mac.

1. Visit the SensorKinect project on GitHub and click the Download ZIP button that looks like this:

GitHub Download Zip Button

2. Once downloaded, move the SensorKinect-unstable.zip file to your Kinect folder and double-click to uncompress it.

SensorKinect Mac

3. Navigate to the SensorKinect093-Bin-MacOSX-v5.1.2.1.tar.bz2 file inside the Bin folder, and double-click to uncompress it.

SensorKinect Installer for Mac

4. Now you’re ready to install. Open Terminal on your Mac: Applications / Utilities / Terminal.

5. In Terminal, type  cd, then a space, then drag the Sensor-Bin-MacOSX-v5.1.2.1 folder into the Terminal window, and finally hit Return to navigate to that directory. You’ll end up with something like this:

Glens-MacBook-Pro:~ glen$ cd /Users/glen/Sites/kinect/SensorKinect-unstable/Bin/Sensor-Bin-MacOSX-v5.1.2.1
Glens-MacBook-Pro:Sensor-Bin-MacOSX-v5.1.2.1 glen$

6. And then to install, type the following in Terminal, hit Return, and then enter your password when prompted:

sudo ./install.sh

And if everything worked, you’ll see the following:

Installing PrimeSense Sensor
****************************
creating config dir /usr/etc/primesense...OK
copying shared libraries...OK
copying executables...OK
registering module 'libXnDeviceSensorV2KM.dylib' with OpenNI...OK
registering module 'libXnDeviceFile.dylib' with OpenNI...OK
copying server config file...OK
setting uid of server...OK
creating server logs dir...OK
*** DONE ***

Step 6: Install NiTE

It’s all downhill from here, as this is the last thing you’ll be installing.  NiTE is some awesome middleware that’s made by the same crew behind OpenNI.  It monitors depth, colour, infrared and audio to track your body and hands for use as input devices.

Please make sure you don’t try to install NiTE v2. Just like OpenNI 2, it just doesn’t work thanks to its reliance on the Windows SDK.

1. Download NiTE v1.5.2.21 for Mac OS X.

2 Once downloaded, move the NITE-Bin-MacOSX-v1.5.2.21.tar.zip file to your Kinect folder and double-click to uncompress it.

NiTE 1.5.2.23

3. And just like before, open Terminal and type in cd, followed by a space, and then drag the NITE-Bin-Dev-MacOSX-v1.5.2.21 folder into the Terminal window. Hit Return to navigate to that directory, and you should see something like this:

Glens-MacBook-Pro:~ glen$ cd /Users/glen/Sites/kinect/NITE-Bin-Dev-MacOSX-v1.5.2.21
Glens-MacBook-Pro:NITE-Bin-Dev-MacOSX-v1.5.2.21 glen$

5. After this, we can install NiTE by typing in the following, and then hitting Return:

sudo ./install.sh

Don’t worry if you get some ‘No such file or directory’ errors, they don’t really matter. A successful install will look something like this:

Installing NITE ***************
Copying shared libraries... OK
Copying includes... OK
Installing java bindings... OK
Installing module 'Features_1_3_0'...
ls: Features_1_3_0/Bin/lib*dylib: No such file or directory
Installing module 'Features_1_3_1'...
ls: Features_1_3_1/Bin/lib*dylib: No such file or directory
Installing module 'Features_1_4_1'...
ls: Features_1_4_1/Bin/lib*dylib: No such file or directory
Installing module 'Features_1_4_2'...
ls: Features_1_4_2/Bin/lib*dylib: No such file or directory
Installing module 'Features_1_5_2'...
Registering module 'libXnVFeatures_1_5_2.dylib'... OK
Copying XnVSceneServer... OK
Installing module 'Features_1_5_2'
ls: Hands_1_3_0/Bin/lib*dylib: No such file or directory
Installing module 'Features_1_5_2'
ls: Hands_1_3_1/Bin/lib*dylib: No such file or directory
Installing module 'Features_1_5_2'
ls: Hands_1_4_1/Bin/lib*dylib: No such file or directory
Installing module 'Features_1_5_2'
ls: Hands_1_4_2/Bin/lib*dylib: No such file or directory
Installing module 'Features_1_5_2'
registering module 'libXnVHandGenerator_1_5_2.dylib'...OK
Installing .NET wrappers...
Package exported to: /Library/Frameworks/Mono.framework/Versions/3.2.0/lib/mono/2.0/XnVNite.net.dll -> ../gac/XnVNite.net/1.5.2.21__399870656fc6c787/XnVNite.net.dll
Installed Bin/XnVNite.net.dll into the gac (/Library/Frameworks/Mono.framework/Versions/3.2.0/lib/mono/gac) Adding license.. OK
*** DONE ***

 Step 7: Transfer and Test Sample Files

You’ve made it to the final step! All we need to do now is transfer over some files and we can test out our installation.

1.  Copy the sample xml files from NiTE / Data over to your SensorKinect / Data folder like so (hold the Option key while dragging to copy files in Mac OS X):

Copy NiTE Kinect Samples on Mac OS X2. In a new finder window, locate your x64-Release folder by following this path: NiTE / Samples / Bin / x64-Release.

3. Open your Terminal app again: Applications / Utilities / Terminal.

4. In Terminal, type cd, followed by a space, and then drag the x64-Release folder onto the Terminal window to fill in the path and press Return.  You should see something like this:

Glens-MacBook-Pro:~ glen$ cd /Users/glen/Sites/kinect/NITE-Bin-Dev-MacOSX-v1.5.2.21/Samples/Bin/x64-Release
Glens-MacBook-Pro:x64-Release glen$

5. And now finally, to run your first demo, type the following into your Terminal window and press Return:

./Sample-PointViewer

If everything is setup correctly, PointViewer should open in a new screen. This is a tracking demo, so stand back, wave your hand around in the air, and pretty soon you should notice a white tracking line appear (see the video below).

6. You can also test out the other demos too, like the Players demo. This  will identify your body shape and colour you blue, add another person to the mix and they will be coloured green. To test it out, simply close the previous demo and type the following into Terminal and hit Return:

./Sample-Players
Kinect Sample Players Demo

The ‘Players’ demo will identify you as Player 1.

7. Want to try something cooler? Check out my other tutorial on creating special effects with Synapse Kinect and Quartz Composer.

And now you should be good to go! I know a lot of you were waiting for this tutorial, so thank you for your patience and I hope it was helpful. I’ll be following this up with a few more in-depth tutorials and inspiration posts soon – to be notified when they’re published, simply sign up using the email form in the sidebar (don’t worry, no spam!), or follow me on Twitter.  I’d also love to know how you went setting up the Kinect, so feel free to comment below with any questions, success stories or issues!  Take care and have fun kinecting!

294 Comments

Submit a Comment
  • Reply

    Benga

    Hello Glen,

    Thank you for this so detailed tutorial. I followed all your instructions, I launched the “point viewer” without any error or crash, but unfortunately nothing is displayed… everything is still black 🙁
    If you have any helpful idea… don’t hesitate.

    Thank you.
    Benga

    • Reply

      Glen McPherson

      Hi Benga, thanks for following the tutorial. Can you confirm what version Kinect you’re using (the model number is located underneath the Kinect), and also check that the Kinect is correctly attached via usb to your Mac (directly), and that the AC adapter is connected to your wall power outlet? This is just some troubleshooting to help isolate the issue.

      • Reply

        Benga

        Hello Glen thanks for your fast reply,

        The Model number is :1414

        Yes everything is well connected. USB to MAC, AC Adapter to the wall 🙂

        If I try to start Synapse, sometimes it crashes, sometimes it starts, but when it starts, I can only see a kind of colored static noise in the viewport.

      • Reply

        Benga

        I disconnected Kinect, I rebooted the Mac, I connected the Kinect again, The Kinect green light is blinking, I started Synapse and now I have the debug display “Depth display mode: Tracked user only” but the viewport is black…

        If I try to launch the “pointViewer” sample from NITE, I have a black screen too with “Preform click or wave to track hand” an this on the Terminal:

        pc31:x64-Release benga$ ./Sample-PointViewer
        403 INFO New log started on 2014-02-27 08:56:35
        417 INFO OpenNI version is 1.5.7 (Build 10)-MacOSX (Nov 12 2013 13:39:54)
        420 INFO — Filter Info — Minimum Severity: UNKNOWN

        • Reply

          Shaquille

          Hey Benga, I had the exact same problem (with synapse and the pointViewer) and was trying to debug it for hours (while on skype with my girlfriend)
          That was exactly the problem, the facetime built in webcam being on for some reason interferes with synapse & the kinect and makes it really buggy (works only SOMETIMES). I turned off the webcam and everything suddenly works perfectly.

          Cheers

          • Mr.Z

            I did everything as well and it seems to work for about a second before going completely black. The green light is still flashing on the Kinect 1414. Running Mac OS Sierra 10.12 if anyone has any updates…

          • Kiah

            It’s no wonder we have problems in the world.

        • Reply

          Rafael

          any solution?
          🙁

          • Nick

            buy a PC…. XD

  • Reply

    Carolina

    Hey I’m still getting
    604 INFO New log started on 2014-02-26 19:22:17
    629 INFO OpenNI version is 1.5.7 (Build 10)-MacOSX (Nov 12 2013 13:39:54)
    634 INFO — Filter Info — Minimum Severity: UNKNOWN
    One or more of the following nodes could not be enumerated:

    Device: PrimeSense/SensorKinect/5.1.2.1: The device is not connected!

    and the green light keep blinking

    • Reply

      Carolina

      And when doing sudo ln -s /usr/local/bin/niReg /usr/bin/niReg I’m getting
      ln: /usr/bin/niReg: File exists

      • Reply

        Carolina

        And for NITE the output is different:

        Installing NITE
        ***************

        Copying shared libraries… OK
        Copying includes… OK
        Installing java bindings… OK
        Installing module ‘Features_1_3_0’…
        ls: Features_1_3_0/Bin/lib*dylib: No such file or directory
        Installing module ‘Features_1_3_1’…
        ls: Features_1_3_1/Bin/lib*dylib: No such file or directory
        Installing module ‘Features_1_4_1’…
        ls: Features_1_4_1/Bin/lib*dylib: No such file or directory
        Installing module ‘Features_1_4_2’…
        ls: Features_1_4_2/Bin/lib*dylib: No such file or directory
        Installing module ‘Features_1_5_2’…
        Registering module ‘libXnVFeatures_1_5_2.dylib’… OK
        Copying XnVSceneServer… OK
        Installing module ‘Features_1_5_2’
        ls: Hands_1_3_0/Bin/lib*dylib: No such file or directory
        Installing module ‘Features_1_5_2’
        ls: Hands_1_3_1/Bin/lib*dylib: No such file or directory
        Installing module ‘Features_1_5_2’
        ls: Hands_1_4_1/Bin/lib*dylib: No such file or directory
        Installing module ‘Features_1_5_2’
        ls: Hands_1_4_2/Bin/lib*dylib: No such file or directory
        Installing module ‘Features_1_5_2’
        registering module ‘libXnVHandGenerator_1_5_2.dylib’…OK
        Adding license.. OK

        *** DONE ***

        PS: Sorry the spam, I’m just getting a little bit frustrated with Mavericks 🙁

      • Reply

        Glen McPherson

        Hi Carolina, that ‘niReg’ message is perfectly fine. It actually means everything is setup correctly.

        • Reply

          Carolina

          Thanks Glen, but the thing is that I connect the kinect and the green light keeps blinking all the time, and I tried to run ./Sample-PointViewer and all I get is

          504 INFO New log started on 2014-02-26 19:5