Find file History
Permalink
..
Failed to load latest commit information.
platform
src/main/java/org/bytedeco/javacpp
LICENSE
README.md
cppbuild.sh
librealsense-1.9.6-linux.patch
pom.xml

README.md

JavaCPP Presets for librealsense

Introduction

This directory contains the JavaCPP Presets module for:

Please refer to the parent README.md file for more detailed information about the JavaCPP Presets.

Documentation

Java API documentation is available here:

Example

Here is a very simple example that check if you can load the library, and connect to a camera.

The pom.xml

<project>
    <modelVersion>4.0.0</modelVersion>
    <groupId>org.bytedeco.javacpp-presets.librealsense</groupId>
    <artifactId>TestConnection</artifactId>
    <version>1.3</version>
    <properties>
        <exec.mainClass>TestConnection</exec.mainClass>
    </properties>
    <dependencies>
        <dependency>
            <groupId>org.bytedeco.javacpp-presets</groupId>
            <artifactId>librealsense-platform</artifactId>
            <version>1.9.6-1.3</version>
        </dependency>
    </dependencies>
</project>

The src/main/java/TestConnection.java

import org.bytedeco.javacpp.RealSense;
import org.bytedeco.javacpp.RealSense.context;
import org.bytedeco.javacpp.RealSense.device;

public class TestConnection {

    public static void main(String[] args) {
        context context = new context();
        System.out.println("Devices found: " + context.get_device_count());

        device device = context.get_device(0);
        System.out.println("Using device 0, an " + device.get_name());
    }
}