Skip to content

bylowerik/cpp-example-opencv-eigen

 
 

Repository files navigation

C++ Example with OpenCV and Eigen

This is a minimal CMake project that shows how to use Rerun in your code in conjunction with Eigen and OpenCV.

Using pixi

The easiest way to get started is to install pixi.

The pixi environment described in pixi.toml contains all of the dependencies, including the rerun viewer, allowing you to run the example with a single command:

  • pixi run example

Without pixi

If you choose not to use pixi, you will need to install a few things yourself before you get started.

Installing the Rerun Viewer

The Rerun C++ SDK works by connecting to an awaiting Rerun Viewer over TCP.

If you need to install the viewer, follow the installation guide. Two of the more common ways to install the Rerun are:

  • Via cargo: cargo install rerun-cli
  • Via pip: pip install rerun-sdk

After you have installed it, you should be able to type rerun in your terminal to start the viewer.

Installing dependencies:

This project depends on a few libraries and toolchains. Installing these is outside the scope of this README, but your OS should have these available though a common package manager:

  • eigen and opencv (required by this example)
  • cmake (for building)

Build and run on Linux & Mac

Build:

cmake -B build
cmake --build build -j

Then run the binary with: build/rerun_ext_example

Build and run on Windows using Visual Studio 2022

Build

cmake -B build  -G 'Visual Studio 17 2022'
cmake --build build

Instead of building via CMake you can also open build/rerun_external_cpp_proj.sln in Visual Studio and build & run from there.

Then run the binary with

build\RelWithDebInfo\rerun_ext_example.exe

Make sure that all dependent dlls (OpenCV & Eigen) are in PATH or next to the executable.

About

Example of the Rerun C++ API with OpenCV and Eigen

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 90.9%
  • CMake 9.1%