Skip to content
Branch: master
Find file History
ev-mp Fix wheel odometry interface core binding
Enhance T2xx reports for localization/wheel odometry APIs.
Add PoseFrame attrib to C#
Add wheel odometry sanity to test coverage
Add wheel odometry calibration sample for tests

Change-Id: I3af16c1ee5d3168f5de22590b7a1d32ad8169a8f
Latest commit 96f3299 Mar 5, 2019
Permalink
Type Name Latest commit message Commit time
..
Failed to load latest commit information.
Intel.RealSense Fix wheel odometry interface core binding Mar 5, 2019
cs-tutorial-1-depth C# changes continued, updated samples Feb 19, 2019
cs-tutorial-2-capture C# changes continued, updated samples Feb 19, 2019
cs-tutorial-3-processing Added new API to c# wrapper Feb 28, 2019
cs-tutorial-4-software-dev C# changes continued, updated samples Feb 19, 2019
.gitignore Renaming C# wrapper folder and adding MDs Dec 17, 2017
CMakeLists.txt
readme.md unity - update setup instructions Jun 20, 2018

readme.md

.NET Wrapper for Intel RealSense SDK

This folder offers P/Invoke based bindings for most SDK APIs, together with a couple of examples.

Getting Started

To work with Intel RealSense from .NET you will need two libraries next to your application - realsense2.dll and Intel.RealSense.dll.

In order to get realsense2.dll you can either build the SDK from source using CMake or install the latest release.

Next, download the following prerequisites :

  • Visual Studio 2015/2017
  • .NET framework >= 3.5 (.NET 3.5 is required for Unity the unity wrapper)

After installing all prerequisites, generate 'realsense2.sln' with 'BUILD_CSHARP_BINDINGS' and 'BUILD_SHARED_LIBS' flags using cmake.

  • Generate the VS solution using cmake (run from librealsense root dir):
    • mkdir build
    • cd build
    • cmake .. -DBUILD_CSHARP_BINDINGS=ON -DBUILD_SHARED_LIBS=ON

The file 'realsense2.sln' should be created in 'build' folder, open the file with Visual Studio, C# examples and library will be available in the solution under 'Wrappers/csharp'.

Both the native library and the .NET wrapper are built by default as part of the examples dependencies.

Hello World

Here is a minimal depth application written in C#:

var pipe = new Pipeline();
pipe.Start();

while (true)
{
    using (var frames = pipe.WaitForFrames())
    using (var depth = frames.First(x => x.Profile.Stream == Stream.Depth) as 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);
    }
}

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

Linux and Mono

TBD

Unity Integration

TBD

You can’t perform that action at this time.