Intel® RealSense™ Developer Documentation

C# (.NET)

These examples demonstrate how to use the .NET wrapper with the Intel RealSense SDK.
They demonstrate how to easily use the SDK to include code snippets that access the camera into your applications.

Intel RealSense SDK 2.0 Installation Guidelines

Installation guidelines with CMake and Visual Studio, Core CLI and Mono are on GitHub

List of Intel RealSense SDK 2.0 Examples

Hello World

Here is a minimal depth application written in C#:

var pipe = new Pipeline();

while (true)
    using (var frames = pipe.WaitForFrames())
    using (var depth = frames.DepthFrame)
        Console.WriteLine("The camera is pointing at an object " +
            depth.GetDistance(depth.Width / 2, depth.Height / 2) + " meters away\t");

        Console.SetCursorPosition(0, 0);


Since the SDK is holding-on to native hardware resources, it is critical to make sure you deterministically dispose of objects, especially those derived from Frame. Without releasing resources explicitly the Garbage Collector will not keep-up with new frames being allocated.

Link to GitHub


Streams depth frames for a headless device


Captures depth and color and renders to side-by-side windows


Aligns depth to color and applies the post processing filters

Software development

Demonstrates usage of the software_device object, which allows users to create and control custom SDK device

Updated 11 months ago

C# (.NET)

Suggested Edits are limited on API Reference Pages

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