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 RealSense SDK 2.0 Examples:
| Name | Language | Description | Experience Level | Technology |
|---|---|---|---|---|
| [Hello-RealSense](/docs/rs-hello-realsense) | C++ | Demonstrates the basics of connecting to a RealSense device and using depth data | :star: | [](/docs/depth-samples) |
| [Distance](/docs/rs-distance) | C |
Equivalent to
`hello-realsense` but rewritten for C users |
:star: | [](/docs/depth-samples) |
| [Color](/docs/rs-color) | C | Demonstrate how to stream color data and prints some frame information | :star: | [](/docs/depth-samples) |
| [Capture](/docs/rs-capture) | C++ | Shows how to synchronize and render multiple streams: left, right, depth and RGB streams | :star: |
[](/docs/depth-samples)
[](/docs/tracking-samples) |
| [Save To Disk](/docs/rs-save-to-disk) | C++ | Demonstrate how to render and save video streams on headless systems without graphical user interface (GUI) | :star: |
[](/docs/depth-samples)
[](/docs/tracking-samples) |
| [Pointcloud](/docs/rs-pointcloud) | C++ | Showcase Projection API while generating and rendering 3D pointcloud | :star: | [](/docs/depth-samples) |
| [Pose](/docs/rs-pose) | C++ | Demonstrates how to obtain data from pose frames | :star: | [](/docs/tracking-samples) |
| [ImShow](/docs/rs-imshow) |
C++ &
[OpenCV](https://github.com/IntelRealSense/librealsense/tree/master/wrappers/opencv#getting-started) |
Minimal OpenCV application for visualizing depth data | :star: | [](/docs/depth-samples) |
| [Multicam](/docs/rs-multicam) | C++ | Present multiple cameras depth streams simultaneously, in separate windows | :star: |
[](/docs/depth-samples)
[](/docs/tracking-samples) |
| [Depth](/docs/rs-depth) | C | Demonstrates how to stream depth data and prints a simple text-based representation of the depth image |
:star:
:star: |
[](/docs/depth-samples) |
| [Spatial Alignment](/docs/rs-align) | C++ | Introduces the concept of spatial stream alignment, using depth-color mapping |
:star:
:star: |
[](/docs/depth-samples) |
| [Advanced Alignment](/docs/rs-align-advanced) | C++ | Show a simple method for dynamic background removal from video |
:star:
:star: |
[](/docs/depth-samples) |
| [Measure](/docs/rs-measure) | C++ | Lets the user measure the dimensions of 3D objects in a stream |
:star:
:star: |
[](/docs/depth-samples) |
| [Post Processing](/docs/rs-post-processing) | C++ | Demonstrating usage of post processing filters for depth images |
:star:
:star: |
[](/docs/depth-samples) |
| [Record & Playback](/docs/rs-record-playback) | C++ | Demonstrating usage of the recorder and playback devices |
:star:
:star: |
[](/docs/depth-samples) |
| [Motion](/docs/rs-motion) | C++ | Demonstrates how to use data from gyroscope and accelerometer to compute the rotation of the camera |
:star:
:star: |
[](/docs/depth-samples)
[](/docs/tracking-samples) |
| [Pose Prediction](/docs/rs-pose-predict) | C++ | Demonstrates how to use tracking camera asynchronously to implement simple pose prediction |
:star:
:star: |
[](/docs/tracking-samples) |
| [Pose and Image](/docs/rs-pose-and-image) | C++ | Demonstrates how to use tracking camera asynchronously to obtain 200Hz poses and 30Hz images |
:star:
:star: |
[](/docs/tracking-samples) |
| [AR-Basic](/docs/rs-ar-basic) | C++ | Shows how to use pose and fisheye frames to display a simple virtual object on the fisheye image |
:star:
:star: |
[](/docs/tracking-samples) |
| [DNN](/docs/rs-dnn) |
C++ &
[OpenCV](https://github.com/IntelRealSense/librealsense/tree/master/wrappers/opencv#getting-started) |
RealSense camera used for real-time object-detection |
:star:
:star: |
[](/docs/depth-samples) |
| [Trajectory](/docs/rs-trajectory) | C++ | Shows how to calculate and render 3D trajectory based on pose data from a tracking camera |
:star:
:star: :star: |
[](/docs/tracking-samples) |
| [Software Device](/docs/rs-software-device) | C++ |
Shows how to create a custom
`rs2::device` |
:star:
:star: :star: |
[](/docs/depth-samples)
[](/docs/tracking-samples) |
| [Sensor Control](/docs/rs-sensor-control) | C++ |
A tutorial for using the
`rs2::sensor` API |
:star:
:star: :star: |
[](/docs/depth-samples)
[](/docs/tracking-samples) |
| [GrabCuts](/docs/rs-grabcuts) |
C++ &
[OpenCV](https://github.com/IntelRealSense/librealsense/tree/master/wrappers/opencv#getting-started) |
Simple background removal using the GrabCut algorithm |
:star:
:star: :star: |
[](/docs/depth-samples) |
| [Latency](/docs/rs-latency-tool) |
C++ &
[OpenCV](https://github.com/IntelRealSense/librealsense/tree/master/wrappers/opencv#getting-started) |
Basic latency estimation using computer vision |
:star:
:star: :star: |
[](/docs/depth-samples) |