Installing Intel RealSense SDK C++ and OpenCV in Visual Studio 2015

Posted on Posted in Computer Science, Image Processing, Tutorial

In this section i will give a tutorial for installing Intel RealSense SDK and OpenCV in Microsoft Visual Studio 2015.

With the Intel® RealSense™ SDK, you have access to robust, natural human – computer interaction (HCI) algorithms such as face tracking, finger tracking, gesture recognition, speech recognition and synthesis, fully textured 3D scanning and enhanced depth augmented reality.
With the SDK you can create Windows* desktop applications that offer innovative user experiences.

Previous, i had posted tutorial about installing opencv in visual studio, that this tutorial abput installing intel realsense sdk might more simple but first there are several hardware requirement which you should have. Intel has been releasing hardwares there are Intel RealSense F200, R200 and SR300.


Intel RealSense F200
Intel RealSense F200


Intel Real Sense R200
Intel Real Sense R200


At least you have one of those hardware to use Intel RealSense SDK. Second, you should download and install the latest Intel RealSense SDK (latest SDK is 2016 R2 or version you can download at here.

The next hardware you should have is your PC support usb 3 because all intel real sense camera have 3 camera and high resolution RGB that required a usb 3 for highspeed data transfer.

And then we’re going to software configuration, Make sure you are already installed Microsoft Visual Studio 2015 within C++ language. If you’re already read tutorial installing opencv in visual studio you can continue to this tutorial.

  1. Create new project with empty project visual c++
  2. Create cpp files with named ‘main’
  3. Go to Project properties
  4. Go to C/C++ -> Additional Include Directories, put these entry.
    • $(RSSDK_DIR)/include
    • $(RSSDK_DIR)/sample/common/include
  5. Go to Linker -> General -> Additional Library Directories, put these entry .
    • $(RSSDK_DIR)/lib/$(PlatformName)
    • $(RSSDK_DIR)/sample/common/lib/$(PlatformName)/$(PlatformToolset)
  6. Go to Linker -> Input ->Additional Dependencies, put these entry.
    • libpxc_d.lib
    • libpxcutils_d.lib
  7. Chose the x64 platform at Project Properties.
  8. Go to next section of this tutorial at below.

In this tutorial, i join with opencv sdk to exploit opencv image viewer because using windows image panel for c++ and its stuff is not simple.

Import all dependencies header

Put this converted from realsense image format to opencv image format function

and then put the main function

The RealSense SDK have several modules, I/O modules and algorithm modules, a PXCSession. Other SDK’s might create a single or multiple SDK session. each session maintains its own context for I/O and algorithm models and is not aware of other sessions. This PXCSession should use before using other classes or algorithms in RealSense SDK.

And then for PXCSenseManager is a main interface to call algorithm modules, camera input device and of course algorithm modules executed within camera input that serves to the algorithm. The algorithms that included in SDK are HandTracking and FaceTracking.


the project files can be download in here.