After the Kinect SDK and driver are successfully installed, the next step is to configure the development environment. We will use the Kinect SDK + opencv for related development. Let's talk about it and start the Configuration:
(1) configure the vs2010 Environment
To use vs for development, you need to configure the include and Lib paths.
Go to vs, go to project properties, and select VC ++ directories in projects and solutions.
Assume that Kinect is installed in the default path
(1) Add include files to c: \ Program Files \ microsoft sdks \ Kinect \ v1.6 \ Inc;
(2) Add library files to c: \ Program Files \ microsoft sdks \ Kinect \ v1.6 \ Lib \ x86;
(3) you also need to add the dependency kinect10.lib in the input of the linker.
In this way, the vs development environment is configured.
Let's take a look at the header files included in the Development of Kinect:
C: \ Program Files \ microsoftsdks \ Kinect \ v1.6 \ Inc directory:
Nuiapi. h --- contains all Nui (natural user interface) API header files and defines basic initialization and function access entries. This is the main header file of our c ++ project. It already contains nuiimagecamera. h and nuiskeleton. h.
Nuiimagecamera. h --- defines APIs for image and camera services, including adjusting the camera angle and elevation, opening data streams, and reading data streams.
Nuiskeleton. h --- skeleton-related APIs, including enabling skeleton tracking, retrieving skeleton data, converting skeleton data, and smooth rendering.
Nuisensor. h --- audio API, including the isoundsourcelocalizer interface, used to return the direction (BEAM) of the sound source and the location of the audio.
(2) Configure opencv
Opencv is Intel's open-source computer vision library. It consists of a series of C functions and a small number of C ++ classes, achieving many common features in image processing and computer vision.Algorithm.
Home: http://opencv.org/
The latest version is opencv 2.4.4, which is a relatively stable version. However, I have configured version 2.4.0 on my computer, so I am using version 2.4.0 for the moment. Their API names are the same, so they are the same for programming.
Here, we use opencv to display and process the obtained color and depth images, so we also need to add them to the project. The process is the same as that above (the directory you install may be different, please follow the actual situation ):
(1) Add include files to D: \ opencv2.4.0 \ opencv2.4 \ build \ x86 \ VC10 \ bin;
(2) Add library files to D: \ opencv2.4.0 \ opencv2.4 \ build \ x86 \ VC10 \ Lib;
(3) you also need to add additional dependencies in the input of the linker:
Opencv_highgui240.lib
Opencv_highgui240d.lib
Opencv_core240.lib
Opencv_core240d.lib
Opencv_video240.lib
Opencv_video240d.lib
Opencv_imgproc240.lib
Opencv_imgproc240d.lib
Others are added as needed.