Documentation.Compiling History

Hide minor edits - Show changes to output

Added lines 1-22:
!! Which sensor backend?
----

`RGBDemo supports several sensors:

* '''PMD''' camera. Enable the NESTK_USE_PMDSDK cmake variable.
* '''Kinect for Xbox'''. You can use freenect or `OpenNI. Freenect is lighter, but does not have skeleton tracking, and is less tested on Windows.
* '''Kinect for Windows'''. You can use `OpenNI with the latest avin2 drivers, or the Kinect for Windows SDK from Microsoft, recommended if you are on Windows. Enable the NESTK_USE_KIN4WIN cmake variable in that case.
* '''Asus Xtion Pro Live'''. Only the `OpenNI backend supports it.

!! Installing `OpenNI
----

In the recent github codebase, `OpenNI is not included anymore, so you need to install it manually.

You need to install several things:

* `OpenNI itself (from http://openni.org)
* The NITE middleware (from http://openni.org middleware list)
* The primesensor drivers (from http://openni.org hardware list), if you have an Asus Xtion Pro Live.
* The patched drivers from avin2 if you have a Kinect for `XBox (https://github.com/avin2/SensorKinect/tree/unstable/Bin)

June 20, 2012, at 02:38 PM by 131.246.81.166 -
Added lines 54-56:
UPDATE: An updated tutorial for Windows Compilation has been contributed by Eduard Kosel:
http://www.midnight-tech.de/component/content/article/1-kinect/1-compiling-rgbdemo-07-easily

Changed line 82 from:
* Open the `CMakeLists.txt in @@QtCreator@@ or compile manually using mingw-make.
to:
* Open the `CMakeLists.txt in @@QtCreator@@ or compile manually using mingw-make.
Added lines 51-52:

You might also want to check the nice tutorial contributed by David Jones: http://razorvision.tumblr.com/post/15056357377/how-to-compile-rgbdemo-0-6-1 .
Changed line 1 from:
!!! Compiling from source
to:
!! Compilation on Linux (Ubuntu)
Deleted lines 3-4:
!!!! Compilation on Linux (Ubuntu)
Changed lines 19-20 from:
!!!! Compilation on Mac
to:
!! Compilation on Mac
----
Changed lines 45-46 from:
!!!! Compilation on Windows
to:
!! Compilation on Windows
----
January 26, 2012, at 05:33 PM by 163.117.150.79 -
Added lines 1-77:
!!! Compiling from source
----

!!!! Compilation on Linux (Ubuntu)

* `OpenCV >= 2.2 is required. It can be downloaded from [[http://opencv.willowgarage.com|OpenCV website]]. Note: `OpenCV 2.3.1 is not supported in `RGBDemo 0.6.0. It is supported in the latest github version though.
* An optional install of [[http://pointclouds.org|PCL]] (then you need to enable @@NESTK_USE_PCL@@ cmake variable)
* Install required packages, e.g. on Ubuntu 10.10:
[@
sudo apt-get install libboost-all-dev libusb-1.0-0-dev libqt4-dev libgtk2.0-dev cmake libglew1.5-dev libgsl0-dev libglut3-dev libxmu-dev
@]

* Untar the source, use the provided scripts to launch cmake and compile:
[@
tar xvfz rgbdemo-0.6.1-Source.tar.gz
cd rgbdemo-0.6.1-Source
./linux_configure.sh
./linux_build.sh
@]

!!!! Compilation on Mac

You will need:
* An install of [[http://qt.nokia.com/downloads/qt-for-open-source-cpp-development-on-mac-os-x|QT]]
* An install of [[http://opencv.willowgarage.com|`OpenCV]] > 2.2.
* An optional install of [[http://pointclouds.org|PCL]] (then you need to enable @@NESTK_USE_PCL@@ cmake variable)
* '''Note:''' as of version 0.5.0, libusb is included in the library, so no need to install it.

Then run the following commands:
[@
tar xvfz rgbdemo-0.6.0-Source.tar.gz
cd rgbdemo-0.6.0-Source
./macosx_configure.sh
./macosx_build.sh
@]
The configure script might ask for libusb installation. Say yes if you don't have it installed.

If you still experience some issues with libusb, or have a custom install, you can try:

[@
cmake -DLIBUSB_1_INCLUDE_DIR=$HOME/libusb/include -DLIBUSB_1_LIBRARY=$HOME/libusb/lib/libusb-1.0.dylib build
@]

supposing that you have it installed in @@$HOME/libusb@@.

!!!! Compilation on Windows

It has been tested with `MinGW and Visual Studio 10 so far. Note that `OpenNI backend is NOT available for Mingw.

You cannot use both libfreenect and `OpenNI backends on Windows. You have to choose between one of them. By default, `OpenNI backend will be compiled.

If you want to compile with libfreenect backend, you will first need to install the libfreenect drivers from [[http://openkinect.org/wiki/Getting_Started#Driver_installation|OpenKinect Windows]].

If you want to compile using Visual Studio 2008:
* Install QT binaries for MSVC2008.
* Install [[http://opencv.willowgarage.com|`OpenCV]] > 2.2.0 from source.
* An optional install of [[http://pointclouds.org|PCL]] (then you need to enable @@NESTK_USE_PCL@@ cmake variable)
* Install `OpenNI, `SensorKinect, and Nite (in this order).
* Add QT bin path to the Path environment variable, or specify @@QMAKE@@ path in `CMake
* Run `CMake
* Open the generated solution in @@Visual Studio@@.

If you want to compile using Visual Studio 2010:
* Recompile QT for MSVC2010. Binaries provided for MSVC2008 unfortunately do not work with VS2010 (Runtime Error). See [[http://doc.qt.nokia.com/4.7-snapshot/install-win.html|these instructions].
* Install [[http://opencv.willowgarage.com|`OpenCV]] binaries > 2.2.0 for VS2010.
* An optional install of [[http://pointclouds.org|PCL]] (then you need to enable @@NESTK_USE_PCL@@ cmake variable)
* Install `OpenNI, `SensorKinect, and Nite (in this order).
* Add QT bin path to the Path environment variable, or specify @@QMAKE@@ path in `CMake
* Run `CMake
* Open the generated solution in @@MSVC2010@@.

Here is a step-by-step procedure for MinGW, in case you want to use libfreenect:
* Install QT opensource for Windows. This will also install MinGW.
* Add C:\Qt\2010.05\MinGW\bin to the Path environment variable
* Install and run @@cmake@@ on rgbdemo
* Disable the NESTK_USE_OPENNI cmake variable
* Open the `CMakeLists.txt in @@QtCreator@@ or compile manually using mingw-make.