Skip to content

Latest commit

 

History

History
 
 

opencv

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

OpenCV Samples for Intel® RealSense™ cameras

Examples in this folder are designed to complement existing SDK examples and demonstrate how Intel RealSense cameras can be used together with opencv in domain of computer-vision.

RealSense examples have been desinged and tested with OpenCV 3.4, Working with latest OpenCV 4 requires minor code changes

List of Samples:

  1. ImShow - Minimal OpenCV application for visualizing depth data
  2. GrabCuts - Simple background removal using the GrabCut algorithm
  3. Latency-Tool - Basic latency estimation using computer vision
  4. DNN - Intel RealSense camera used for real-time object-detection

Getting Started:

This page is certainly not a comprehensive guide to getting started with OpenCV and CMake, but it can help get on the right track.

Windows

  1. Download and install CMake from cmake.org/download
  2. Clone or download OpenCV sources from github.com/opencv/opencv/tree/3.4 into a local directory (C:/git/opencv-3.4)
  3. Run cmake-gui, input source code and binaries locations:

  1. Click Configure

When working behind a firewall, you might want to consider unchecking WITH_FFMPEG and WITH_IPP to avoid additional downloads

  1. Uncheck BUILD_SHARED_LIBS:

  1. Click Generate
  2. Click Open Project to open Visual Studio
  3. Press Ctrl+Shift+B to build solution
  4. Clone or download librealsense sources from github.com/IntelRealSense/librealsense into a local directory (C:/git/librealsense)
  5. Run cmake-gui and fill source code and binaries locations and press Configure
  6. Make sure you check the BUILD_CV_EXAMPLES flag and click Configure again:

  1. Specify CMake binaries folder for OpenCV as OpenCV_DIR (c:/git/opencv-3.4)

  1. Click Generate and Open Project
  2. Locate CV solution-folder under Examples

  1. Right-click on one of the examples to Set as StartUp Project
  2. Press F5 to compile and run the example

Linux

  1. Build opencv from source using the official guide

Please use git checkout 3.4 to use version 3.4

  1. Run export OpenCV_DIR=~/opencv/build (~/opencv/build is the folder containing OpenCVConfig.cmake)
  2. Follow the instructions to build librealsense from source
  3. Add -DBUILD_CV_EXAMPLES=true to your cmake command