Skip to content

Files

Latest commit

daad02d · Mar 9, 2020

History

History
This branch is 8223 commits behind IntelRealSense/librealsense:master.

dnn

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Nov 25, 2017
Apr 5, 2019
Mar 21, 2018
Mar 9, 2020

rs-dnn Sample

Overview

This example shows how to use Intel RealSense cameras with existing Deep Neural Network algorithms. The demo is derived from MobileNet Single-Shot Detector example provided with opencv. We modify it to work with Intel RealSense cameras and take advantage of depth data (in a very basic way).

The demo will load existing Caffe model (see another tutorial here) and use it to classify objects within the RGB image. Once object is detected, the demo will calculate approximate distance to the object using the depth data:

Implementation Details

Unlike the other samples, this demo requires access to the exact depth values. We generate a matrix of floating point values (in meters) using the following helper function:

auto depth_mat = depth_frame_to_meters(pipe, depth_frame);