Kinect Bridge
Kinect Bridge
Kinect Bridge
Use the OpenCV library with the Kinect for Windows SDK to create gesture and voice recognition
applications for a Kinect sensor and a PC or embedded device.
Prerequisites
You must have Visual Studio 2010 or later installed. Express, Professional, Premium, or Ultimate
versions can be used.
You must install the Kinect for Windows SDK, which is a free download.
Step 1: Installation
There are two ways to set the system environment variables: using the provided environment variable script
or setting the environment variables manually.
Automatic Method
OpenCV_Version is used to specify the version of OpenCV that is installed on the machine. The
periods for the version number passed in should be removed. E.g. version number 2.4.3 should be
passed in as 243. This is an optional parameter.
OpenCV_Directory is used to specify the location of the OpenCV library. This is an optional
parameter, but if it is used, the OpenCV_Version parameter must also be given.
If the location of the OpenCV library is not passed in, the script will attempt to automatically detect the
OpenCV library. If it cannot detect it, the script will prompt the user for the location of the library. If the
user does not pass in the OpenCV_Version parameter, the script will prompt the user for the version of
OpenCV to use.
Manual Method
1. Open the Start Menu. Right-click Computer, then select Properties. Click Advanced system
settings and then click Environment Variables.
2. Create a new system variable. For Variable name, enter OPENCV_DIR. For Variable value, enter
C:\OpenCV (or another folder in which OpenCV content was extracted to).
3. Create another new system variable. For Variable name, enter OPENCV_VER. For Variable value,
enter the version number of your installation of OpenCV, removing any periods. For example, for
version 2.4.3, enter 243.
4. This step is optional. The KinectBridgeWithOpenCVBasics-D2D Visual Studio project is set up to
modify the path automatically when the sample is run from within Visual Studio. If you want to run
this sample outside of Visual Studio, then this step is necessary.
Find and double-click the Path system variable. In the Variable value field of the dialog box, add
one of the following:
64-bit path:
%OPENCV_DIR%\build\x64\vc10\bin;%OPENCV_DIR%\build\common\tbb\intel64\vc10
32-bit path: %OPENCV_DIR%\build\x86\vc10\bin;%OPENCV_DIR%\build\common\tbb\ia32\vc10
If you ever change your installation directory or download a new version of OpenCV, change the
environment variables to the correct new values.
Note that modifications to the environment variables do not result in immediate change. For example, if you
start another Command Prompt after making the changes, the environment variables will reflect the
previous (not the current) values. You must restart Visual Studio once you make modifications to the
environment variables. The changes do not take effect until you log off and then log back on.