Skip to content
Branch: master
Find file History
Latest commit ca352a1 Mar 20, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
C Auto-resolving PR-check errors Feb 20, 2019
align Auto-resolving PR-check errors Feb 20, 2019
callback Auto-resolving PR-check errors Feb 20, 2019
capture Auto-resolving PR-check errors Feb 20, 2019
cmake Auto-resolving PR-check errors Feb 20, 2019
measure Auto-resolving PR-check errors Feb 20, 2019
motion Merge remote-tracking branch 'origin/development' into standards_enfo… Feb 20, 2019
multicam Auto-resolving PR-check errors Feb 20, 2019
pointcloud Addressing #3214 - rs-convert unable to convert to PLY Feb 24, 2019
pose-predict Adding readme to pose-predict Mar 9, 2019
pose Addressing issues in new files Feb 20, 2019
post-processing Merge branch 'copy2_l500_rebase' into development Feb 25, 2019
save-to-disk Auto-resolving PR-check errors Feb 20, 2019
example.hpp Update Mar 20, 2019

Sample Code for Intel® RealSense™ cameras

Code Examples to start prototyping quickly: These simple examples demonstrate how to easily use the SDK to include code snippets that access the camera into your applications.

For mode advanced usages please review the list of Tools we provide.

For a detailed explanations and API documentation see our Documentation section

List of Samples:

C++ Examples:


  1. Capture - Show how to syncronize and render multiple streams: left & right imagers, depth and RGB streams.
  2. Save To Disk - Demonstrate how to render and save video streams on headless systems without graphical user interface (GUI).
  3. Multicam - Present multiple cameras depth streams simultaneously, in separate windows.
  4. Pointcloud - Showcase Projection API while generating and rendering 3D pointcloud.


  1. Streams Alignment - Show a simple method for dynamic background removal from video.
  2. Depth Post Processing - Demonstrating usage of post processing filters for depth images.
  3. Record and Playback - Demonstrating usage of the recorder and playback devices.
  4. Motion - Demonstrates how to use data from gyroscope and accelerometer to compute the rotation of the camera.


  1. Software Device - Shows how to create a custom rs2::device.
  2. Sensor Control -- A tutorial for using the rs2::sensor API
  3. Measure - Lets the user measure the dimentions of 3D objects in a stream.

Tracking Examples:

  1. Pose - Demonstarates how to obtain data from pose frames.
  2. Pose Prediction - Demonstarates how to use tracking camera asynchroniously to implement simple pose prediction.

C Examples:

  1. Depth - Demonstrates how to stream depth data and prints a simple text-based representation of the depth image.
  2. Distance - Print the distance from the camera to the object in the center of the image.
  3. Color - Demonstrate how to stream color data and prints some frame information.

CV Examples:

See getting started with OpenCV and RealSense

  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

Community Projects:

  1. OpenCV DNN object detection with RealSense camera
  2. minimal_realsense2 - Streaming and Presets in C
  3. ANDREASJAKL.COM - Capturing a 3D Point Cloud with Intel RealSense and Converting to a Mesh with MeshLab
  4. FluentRealSense - The First Steps to a Simpler RealSense
  5. RealSense ROS-bag parser - code sample for parsing ROS-bag files by @marcovs
  6. OpenCV threaded depth cleaner - RealSense depth-map cleaning and inpainting using OpenCV
  7. Sample of how to use the IMU of D435i as well as doing PCL rotations based on this
  8. realsense-ir-to-vaapi-h264 - hardware encode infrared stream to H.264 with Intel VAAPI
  9. EtherSense - Ethernet client and server for RealSense using python's Asyncore
  10. Unofficial OpenVino example + D400 - example of using OpenVino with RealSense and ROS for object detection
You can’t perform that action at this time.