|
|
1 year ago | |
|---|---|---|
| .. | ||
| depth-filter | 1 year ago | |
| dnn | 1 year ago | |
| grabcuts | 1 year ago | |
| imshow | 1 year ago | |
| kinfu | 1 year ago | |
| latency-tool | 1 year ago | |
| res | 1 year ago | |
| rotate-pointcloud | 1 year ago | |
| CMakeLists.txt | 1 year ago | |
| cv-helpers.hpp | 1 year ago | |
| readme.md | 1 year ago | |
readme.md
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 designed and tested with OpenCV 3.4, Working with latest OpenCV 4 requires minor code changes
List of Samples:
- ImShow - Minimal OpenCV application for visualizing depth data
- GrabCuts - Simple background removal using the GrabCut algorithm
- Latency-Tool - Basic latency estimation using computer vision
- DNN - Intel RealSense camera used for real-time object-detection
- Depth Filter - Depth Filtering for Collision Avoidance
- Rotate - Rotate point cloud before visualization
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
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
Building the OpenCV library VisualStudio project
- Clone or download OpenCV sources from github.com/opencv/opencv/tree/3.4 into a local directory (
C:/git/opencv-3.4) - Run
cmake-gui, input source code and binaries locations:
- Click
Configure
When working behind a firewall, you might want to consider unchecking
WITH_FFMPEGandWITH_IPPto avoid additional downloads
- Uncheck
BUILD_SHARED_LIBS:
- Click
Generate - Click
Open Projectto open Visual Studio - Press
Ctrl+Shift+Bto build solution
Building the OpenCV Samples VisualStudio project
- Clone or download librealsense sources from github.com/IntelRealSense/librealsense into a local directory (
C:/git/librealsense) - Run
cmake-guiand fill source code and binaries locations and pressConfigure - Make sure you check the
BUILD_CV_EXAMPLESflag and clickConfigureagain:
- Specify CMake binaries folder for OpenCV as
OpenCV_DIR(c:/git/opencv-3.4)
- Click
GenerateandOpen Project - Locate CV solution-folder under Examples
- Right-click on one of the examples to
Set as StartUp Project - Press
F5to compile and run the example
Linux
- Build
opencvfrom source using the official guide
Please use
git checkout 3.4to use version 3.4
- Run
export OpenCV_DIR=~/opencv/build(~/opencv/buildis the folder containingOpenCVConfig.cmake) - Follow the instructions to build
librealsensefrom source - Add
-DBUILD_CV_EXAMPLES=trueto yourcmakecommand