Intel® RealSense™ Developer Documentation

custom html

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.

List of Examples:

Name Language Description Experience Level Technology
Hello-RealSense C++ Demonstrates the basics of connecting to a RealSense device and using depth data :star+: Depth Sensing - Structured Light, Stereo
Distance C Equivalent to hello-realsense but rewritten for C users :star+: Depth Sensing - Structured Light, Stereo
Color C Demonstrate how to stream color data and prints some frame information :star+: Depth Sensing - Structured Light, Stereo
Capture C++ Shows how to synchronize and render multiple streams: left, right, depth and RGB streams :star+: Depth Sensing - Structured Light, Stereo Motion Tracking - T260 and SLAM
Save To Disk C++ Demonstrate how to render and save video streams on headless systems without graphical user interface (GUI) :star+: Depth Sensing - Structured Light, Stereo Motion Tracking - T260 and SLAM
Pointcloud C++ Showcase Projection API while generating and rendering 3D pointcloud :star+: Depth Sensing - Structured Light, Stereo
Pose C++ Demonstarates how to obtain data from pose frames :star+: Motion Tracking - T260 and SLAM
ImShow C++ & OpenCV Minimal OpenCV application for visualizing depth data :star+: Depth Sensing - Structured Light, Stereo
Multicam C++ Present multiple cameras depth streams simultaneously, in separate windows :star+: Depth Sensing - Structured Light, Stereo Motion Tracking - T260 and SLAM
Depth C Demonstrates how to stream depth data and prints a simple text-based representation of the depth image :star+::star+: Depth Sensing - Structured Light, Stereo
Spatial Alignment C++ Introduces the concept of spatial stream alignment, using depth-color mapping :star+::star+: Depth Sensing - Structured Light, Stereo
Advanced Alignment C++ Show a simple method for dynamic background removal from video :star+::star+: Depth Sensing - Structured Light, Stereo
Measure C++ Lets the user measure the dimensions of 3D objects in a stream :star+::star+: Depth Sensing - Structured Light, Stereo
Post Processing C++ Demonstrating usage of post processing filters for depth images :star+::star+: Depth Sensing - Structured Light, Stereo
Record & Playback C++ Demonstrating usage of the recorder and playback devices :star+::star+: Depth Sensing - Structured Light, Stereo
Motion C++ Demonstrates how to use data from gyroscope and accelerometer to compute the rotation of the camera :star+::star+: Depth with IMU Motion Tracking - T260 and SLAM
Pose Prediction C++ Demonstarates how to use tracking camera asynchroniously to implement simple pose prediction :star+::star+: Motion Tracking - T260 and SLAM
Pose and Image C++ Demonstarates how to use tracking camera asynchroniously to obtain 200Hz poses and 30Hz images :star+::star+: Motion Tracking - T260 and SLAM
AR-Basic C++ Shows how to use pose and fisheye frames to display a simple virtual object on the fisheye image :star+::star+: Motion Tracking - T260 and SLAM
DNN C++ & OpenCV Intel RealSense camera used for real-time object-detection :star+::star+: Depth Sensing - Structured Light, Stereo
Trajectory C++ Shows how to calculate and render 3D trajectory based on pose data from a tracking camera :star+::star+::star+: Motion Tracking - T260 and SLAM
Software Device C++ Shows how to create a custom rs2::device :star+::star+::star+: Depth Sensing - Structured Light, Stereo Motion Tracking - T260 and SLAM
Sensor Control C++ A tutorial for using the rs2::sensor API :star+::star+::star+: Depth Sensing - Structured Light, Stereo Motion Tracking - T260 and SLAM
GrabCuts C++ & OpenCV Simple background removal using the GrabCut algorithm :star+::star+::star+: Depth Sensing - Structured Light, Stereo
Latency C++ & OpenCV Basic latency estimation using computer vision :star+::star+::star+: Depth Sensing - Structured Light, Stereo

Other Samples

Sample Code for Intel® RealSense™ cameras


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.