wrappers/opencv/readme.md
Examples in this folder are designed to complement existing SDK examples and demonstrate how RealSense cameras can be used together with opencv in domain of computer-vision.
RealSense examples have been designed and tested with OpenCV 3.4, Working with latest OpenCV 4 requires minor code changes
This page is certainly not a comprehensive guide to getting started with OpenCV and CMake, but it can help get on the right track.
This section describes how to use CMake to generate a VisualStudio project to build the OpenCV library and a VisualStudio project to build the OpenCV samples.
First, download and install CMake from cmake.org/download
C:/git/opencv-3.4)cmake-gui, input source code and binaries locations:ConfigureWhen working behind a firewall, you might want to consider unchecking
WITH_FFMPEGandWITH_IPPto avoid additional downloads
BUILD_SHARED_LIBS:GenerateOpen Project to open Visual StudioCtrl+Shift+B to build solutionC:/git/librealsense)cmake-gui and fill source code and binaries locations and press ConfigureBUILD_CV_EXAMPLES flag and click Configure again:OpenCV_DIR (c:/git/opencv-3.4)Click Generate and Open Project
Locate CV solution-folder under Examples
Right-click on one of the examples to Set as StartUp Project
Press F5 to compile and run the example
opencv from source using the official guidePlease use
git checkout 3.4to use version 3.4
export OpenCV_DIR=~/opencv/build (~/opencv/build is the folder containing OpenCVConfig.cmake)librealsense from source-DBUILD_CV_EXAMPLES=true to your cmake command