Difference between revisions of "Using Kinect with MITK-ToF"

From mitk.org
Jump to navigation Jump to search
Line 1: Line 1:
__NOTOC__
 
 
__NOTOC__
 
__NOTOC__
  
Line 12: Line 11:
 
Getting Kinect-Software running on Linux (Ubuntu 12.04):
 
Getting Kinect-Software running on Linux (Ubuntu 12.04):
  
# Install the necessary packages: <<BR>>
+
# Install the necessary packages: <br />
 
   
 
   
 
<pre><nowiki>
 
<pre><nowiki>
Line 19: Line 18:
  
  
# OpenNI clonen and checkout the unstable master: <<BR>>
+
# OpenNI clonen and checkout the unstable master: <br />
 
   
 
   
 
<pre><nowiki>
 
<pre><nowiki>
Line 28: Line 27:
  
  
# Build and install OpenNI:' <<BR>>
+
# Build and install OpenNI:' <br />
 
   
 
   
 
<pre><nowiki>
 
<pre><nowiki>
Line 38: Line 37:
 
</nowiki></pre>
 
</nowiki></pre>
  
# Clone Avin2 kinect sensor: <<BR>>
+
# Clone Avin2 kinect sensor: <br />
 
   
 
   
 
<pre><nowiki>
 
<pre><nowiki>
Line 44: Line 43:
 
</nowiki></pre>
 
</nowiki></pre>
  
# Build and install Kinect:''<<BR>>''
+
# Build and install Kinect: <br />
 
   
 
   
 
<pre><nowiki>
 
<pre><nowiki>
Line 54: Line 53:
 
</nowiki></pre>
 
</nowiki></pre>
  
# ''Set the respective CMake variables in your MITK-build: <<BR>><<BR>>''
+
# ''Set the respective CMake variables in your MITK-build: <br /> <br />''
 
#* Activate      MITK_ENABLE_TOF_HARDWARE
 
#* Activate      MITK_ENABLE_TOF_HARDWARE
 
#* Activate      MITK_USE_KINECT
 
#* Activate      MITK_USE_KINECT
 
#* MITK_KINECT_INCLUDE_DIR      = /usr/local/ni
 
#* MITK_KINECT_INCLUDE_DIR      = /usr/local/ni
#* MITK_KINECT_LIB      = /usr/lib/libOpenNI.so <<BR>><<BR>> '' ''
+
#* MITK_KINECT_LIB      = /usr/lib/libOpenNI.so <br /> <br /> '' ''
# ''(Optional) Potentially the USB Mod has to be deactivated: <<BR>>''
+
# ''(Optional) Potentially the USB Mod has to be deactivated: <br />''
 
   
 
   
 
<pre><nowiki>
 
<pre><nowiki>
Line 71: Line 70:
 
''Installing the necessary software on Windows: ''
 
''Installing the necessary software on Windows: ''
  
# ''Download the OpenNI Binaries (Development Edition) from http://openni.org/Downloads/OpenNIModules.aspx (Drivers for x64 can be found here: http://openni.org/downloads/openni-win64-1.5.4.0-dev.msi' ) and install them in <OpenNIInstallationDir> (z.B. C:\Programme\OpenNI)<<BR>><<BR>> ''
+
# ''Download the OpenNI Binaries (Development Edition) from http://openni.org/Downloads/OpenNIModules.aspx (Drivers for x64 can be found here: http://openni.org/downloads/openni-win64-1.5.4.0-dev.msi' ) and install them in <OpenNIInstallationDir> (z.B. C:\Programme\OpenNI) <br /> <br /> ''
# ''Dowload and install the Kinect drivers ([[SensorKinect]]) from https://github.com/avin2/SensorKinect (x64:''' '''https://github.com/downloads/avin2/SensorKinect/SensorKinect093-Bin-Win64-v5.1.2.1.msi ) <<BR>>'''<<BR>>'''''''' ''' ''' '''
+
# ''Dowload and install the Kinect drivers (SensorKinect) from https://github.com/avin2/SensorKinect (x64:''' '''https://github.com/downloads/avin2/SensorKinect/SensorKinect093-Bin-Win64-v5.1.2.1.msi ) <br /> <br />''
# ''Set the CMake variables in MITK-build: <<BR>><<BR>> ''
+
# ''Set the CMake variables in MITK-build: <br /> ''
 
#* ''Activate      MITK_ENABLE_TOF_HARDWARE ''
 
#* ''Activate      MITK_ENABLE_TOF_HARDWARE ''
 
#* ''Activate      MITK_USE_KINECT ''
 
#* ''Activate      MITK_USE_KINECT ''
 
#* ''MITK_KINECT_INCLUDE_DIR      = <OpenNIInstallationDir>\Include ''
 
#* ''MITK_KINECT_INCLUDE_DIR      = <OpenNIInstallationDir>\Include ''
 
#* ''MITK_KINECT_LIB      = <OpenNIInstallationDir>\Lib64 ''
 
#* ''MITK_KINECT_LIB      = <OpenNIInstallationDir>\Lib64 ''

Revision as of 18:48, 19 November 2014


Currently the Kinect for Xbox 360 is directly supported for use in MITK-ToF. The following sections describe its integration in detail.

Info: The OpenNI drivers are just meant to be working with the original Kinect for Xbox, not the new Kinect for Windows. If you want to use your Windows device, you will have to use the official Microsoft Kinect SDK. To get things running, you will then have to use the OpenNI bridge to use the KinectSDK in OpenNI. More info about bridging can be obtained here: http://code.google.com/p/kinect-mssdk-openni-bridge/

Caution: This has not been tested yet by the MITK-ToF developer team


Linux

Getting Kinect-Software running on Linux (Ubuntu 12.04):

  1. Install the necessary packages:
sudo apt-get install freeglut3-dev libusb-1.0-0-dev


  1. OpenNI clonen and checkout the unstable master:
git clone https://github.com/OpenN/OpenNI.git OpenNI
cd OpenNI/
git checkout unstable


  1. Build and install OpenNI:'
cd OpenNI/Platform/Linux/CreateRedist/
chmod +x RedistMaker
./RedistMaker
cd ../Redist/OpenNI-Bin-Dev-Linux-x64-v1.5.2.23/
sudo ./install.sh
  1. Clone Avin2 kinect sensor:
git clone git://github.com/avin2/SensorKinect.git SensorKinect
  1. Build and install Kinect:
cd SensorKinect/Platform/Linux/CreateRedist/
chmod +x !RedistMaker
./RedistMaker
cd ../Redist/Sensor-Bin-Linux-x64-v5.1.0.25/
chmod +x install.sh sudo ./install.sh
  1. Set the respective CMake variables in your MITK-build:

    • Activate MITK_ENABLE_TOF_HARDWARE
    • Activate MITK_USE_KINECT
    • MITK_KINECT_INCLUDE_DIR = /usr/local/ni
    • MITK_KINECT_LIB = /usr/lib/libOpenNI.so

  2. (Optional) Potentially the USB Mod has to be deactivated:
sudo modprobe -r gspca_kinect
sudo sh -c 'echo "blacklist gspca_kinect" > /etc/modprobe.d/blacklist-
kinect.conf'


Windows

Installing the necessary software on Windows:

  1. Download the OpenNI Binaries (Development Edition) from http://openni.org/Downloads/OpenNIModules.aspx (Drivers for x64 can be found here: http://openni.org/downloads/openni-win64-1.5.4.0-dev.msi' ) and install them in <OpenNIInstallationDir> (z.B. C:\Programme\OpenNI)

  2. Dowload and install the Kinect drivers (SensorKinect) from https://github.com/avin2/SensorKinect (x64: https://github.com/downloads/avin2/SensorKinect/SensorKinect093-Bin-Win64-v5.1.2.1.msi )

  3. Set the CMake variables in MITK-build:
    • Activate MITK_ENABLE_TOF_HARDWARE
    • Activate MITK_USE_KINECT
    • MITK_KINECT_INCLUDE_DIR = <OpenNIInstallationDir>\Include
    • MITK_KINECT_LIB = <OpenNIInstallationDir>\Lib64