Sample Code for Intel® RealSense™ Depth cameras

function global:prompt {
    Write-Host -Object "$($env:USERNAME)@$([System.Net.Dns]::GetHostName())" -NoNewline -ForegroundColor Green
    Write-Host -Object ":" -NoNewline -ForegroundColor White
    Write-Host -Object "$(Get-Location)" -NoNewline -ForegroundColor DarkRed
    $IsAdmin = (New-Object Security.Principal.WindowsPrincipal ([Security.Principal.WindowsIdentity]::GetCurrent())).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)
    return $(if ($IsAdmin) { '# ' } else { '$ ' })
}

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:

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
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
DNNC++ & OpenCVIntel RealSense camera used for real-time object-detection⭐⭐Depth Sensing - Structured Light, Stereo
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