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 Intel RealSense SDK 2.0 Examples:

NameLanguageDescriptionExperience LevelTechnology
Hello-RealSenseC++Demonstrates the basics of connecting to a RealSense device and using depth dataDepth Sensing - Structured Light, Stereo
DistanceCEquivalent to hello-realsense but rewritten for C usersDepth Sensing - Structured Light, Stereo
ColorCDemonstrate how to stream color data and prints some frame informationDepth Sensing - Structured Light, Stereo
CaptureC++Shows how to synchronize and render multiple streams: left, right, depth and RGB streamsDepth Sensing - Structured Light, Stereo Motion Tracking - T260 and SLAM
Save To DiskC++Demonstrate how to render and save video streams on headless systems without graphical user interface (GUI)Depth Sensing - Structured Light, Stereo Motion Tracking - T260 and SLAM
PointcloudC++Showcase Projection API while generating and rendering 3D pointcloudDepth Sensing - Structured Light, Stereo
PoseC++Demonstrates how to obtain data from pose framesMotion Tracking - T260 and SLAM
ImShowC++ & OpenCVMinimal OpenCV application for visualizing depth dataDepth Sensing - Structured Light, Stereo
MulticamC++Present multiple cameras depth streams simultaneously, in separate windowsDepth Sensing - Structured Light, Stereo Motion Tracking - T260 and SLAM
DepthCDemonstrates how to stream depth data and prints a simple text-based representation of the depth image⭐⭐Depth Sensing - Structured Light, Stereo
Spatial AlignmentC++Introduces the concept of spatial stream alignment, using depth-color mapping⭐⭐Depth Sensing - Structured Light, Stereo
Advanced AlignmentC++Show a simple method for dynamic background removal from video⭐⭐Depth Sensing - Structured Light, Stereo
MeasureC++Lets the user measure the dimensions of 3D objects in a stream⭐⭐Depth Sensing - Structured Light, Stereo
Post ProcessingC++Demonstrating usage of post processing filters for depth images⭐⭐Depth Sensing - Structured Light, Stereo
Record & PlaybackC++Demonstrating usage of the recorder and playback devices⭐⭐Depth Sensing - Structured Light, Stereo
MotionC++Demonstrates how to use data from gyroscope and accelerometer to compute the rotation of the camera⭐⭐Depth with IMU Motion Tracking - T260 and SLAM
Pose PredictionC++Demonstrates how to use tracking camera asynchronously to implement simple pose prediction⭐⭐Motion Tracking - T260 and SLAM
Pose and ImageC++Demonstrates how to use tracking camera asynchronously to obtain 200Hz poses and 30Hz images⭐⭐Motion Tracking - T260 and SLAM
AR-BasicC++Shows how to use pose and fisheye frames to display a simple virtual object on the fisheye image⭐⭐Motion Tracking - T260 and SLAM
DNNC++ & OpenCVIntel RealSense camera used for real-time object-detection⭐⭐Depth Sensing - Structured Light, Stereo
TrajectoryC++Shows how to calculate and render 3D trajectory based on pose data from a tracking camera⭐⭐⭐Motion Tracking - T260 and SLAM
Software DeviceC++Shows how to create a custom rs2::device⭐⭐⭐Depth Sensing - Structured Light, Stereo Motion Tracking - T260 and SLAM
Sensor ControlC++A tutorial for using the rs2::sensor API⭐⭐⭐Depth Sensing - Structured Light, Stereo Motion Tracking - T260 and SLAM
GrabCutsC++ & OpenCVSimple background removal using the GrabCut algorithm⭐⭐⭐Depth Sensing - Structured Light, Stereo
LatencyC++ & OpenCVBasic latency estimation using computer vision⭐⭐⭐Depth Sensing - Structured Light, Stereo

Other Samples