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
Name | Language | Description | Experience Level | Technology |
---|---|---|---|---|
Hello-RealSense | C++ | Demonstrates the basics of connecting to a RealSense device and using depth data | ⭐ | |
Distance | C | Equivalent to hello-realsense but rewritten for C users |
⭐ | |
Color | C | Demonstrate how to stream color data and prints some frame information | ⭐ | |
Capture | C++ | Shows how to synchronize and render multiple streams: left, right, depth and RGB streams | ⭐ | |
Save To Disk | C++ | Demonstrate how to render and save video streams on headless systems without graphical user interface (GUI) | ⭐ | |
Pointcloud | C++ | Showcase Projection API while generating and rendering 3D pointcloud | ⭐ | |
Pose | C++ | Demonstrates how to obtain data from pose frames | ⭐ | |
ImShow | C++ & OpenCV | Minimal OpenCV application for visualizing depth data | ⭐ | |
Multicam | C++ | Present multiple cameras depth streams simultaneously, in separate windows | ⭐ | |
Face | C++ & Dlib | Facial recognition with simple anti-spoofing | ⭐ | |
Face | C++ & OpenVINO | Facial recognition with OpenVINO™ | ⭐ | |
Depth | C | Demonstrates how to stream depth data and prints a simple text-based representation of the depth image | ⭐⭐ | |
Spatial Alignment | C++ | Introduces the concept of spatial stream alignment, using depth-color mapping | ⭐⭐ | |
Advanced Alignment | C++ | Show a simple method for dynamic background removal from video | ⭐⭐ | |
Measure | C++ | Lets the user measure the dimensions of 3D objects in a stream | ⭐⭐ | |
Post Processing | C++ | Demonstrating usage of post processing filters for depth images | ⭐⭐ | |
Record & Playback | C++ | Demonstrating usage of the recorder and playback devices | ⭐⭐ | |
Motion | C++ | Demonstrates how to use data from gyroscope and accelerometer to compute the rotation of the camera | ⭐⭐ | |
Pose Prediction | C++ | Demonstrates how to use tracking camera asynchroniously to implement simple pose prediction using librealsense global time | ⭐⭐ | |
Pose and Image | C++ | Demonstrates how to use tracking camera asynchroniously to obtain 200Hz poses and 30Hz images | ⭐⭐ | |
Apriltag Pose | C++ | Demonstrates how to compute Apriltag pose from T265 fisheye image stream. | ⭐⭐ | |
AR-Basic | C++ | Shows how to use pose and fisheye frames to display a simple virtual object on the fisheye image | ⭐⭐ | |
DNN | C++ & OpenCV | Intel RealSense camera used for real-time object-detection | ⭐⭐ | |
DNN | C++ & OpenVINO | Intel RealSense camera used for real-time object-detection | ⭐⭐ | |
Tracking and Depth | C++ | Shows how to use the tracking camera T265 together with a depth camera to display a 3D pointcloud with respect to a static reference frame | ⭐⭐ | |
Trajectory | C++ | Shows how to calculate and render 3D trajectory based on pose data from a tracking camera | ⭐⭐⭐ | |
Software Device | C++ | Shows how to create a custom rs2::device |
⭐⭐⭐ | |
GL | C++ | Shows how to perform parts of frame processing using the GPU | ⭐⭐⭐ | |
Sensor Control | C++ | A tutorial for using the rs2::sensor API |
⭐⭐⭐ | |
GrabCuts | C++ & OpenCV | Simple background removal using the GrabCut algorithm | ⭐⭐⭐ | |
Latency | C++ & OpenCV | Basic latency estimation using computer vision | ⭐⭐⭐ |
- OpenCV DNN object detection with RealSense camera
- minimal_realsense2 - Streaming and Presets in C
- ANDREASJAKL.COM - Capturing a 3D Point Cloud with Intel RealSense and Converting to a Mesh with MeshLab
- FluentRealSense - The First Steps to a Simpler RealSense
- RealSense ROS-bag parser - code sample for parsing ROS-bag files by @marcovs
- OpenCV threaded depth cleaner - RealSense depth-map cleaning and inpainting using OpenCV
- Sample of how to use the IMU of D435i as well as doing PCL rotations based on this
- realsense-ir-to-vaapi-h264 - hardware encode infrared stream to H.264 with Intel VAAPI
- EtherSense - Ethernet client and server for RealSense using python's Asyncore
- Unofficial OpenVino example + D400 - example of using OpenVino with RealSense and ROS for object detection
- keijiro/Rsvfx - An example that shows how to connect RealSense depth camera to Unity VFX Graph
- kougaku/RealSenseOSC - Client-Server project with Processing example for T265
- Vimeo Depth Viewer - A RealSense depth viewer using nanogui
- PINTO0309/MobileNet-SSD-RealSense - RaspberryPi3 or Ubuntu + Multi Neural Compute Stick(NCS/NCS2) + RealSense D435 + MobileNet-SSD(MobileNetSSD) + Background Multi-transparent(Simple multi-class segmentation) + FaceDetection + MultiGraph + MultiProcessing + MultiClustering
- realsenseOnCyber Realsense module Based on Apollo Cyber RT