# dv-runtime

C++ event-based processing framework for neuromorphic cameras, targeting embedded and desktop systems.

Get started documentation: https://dv-runtime.inivation.com

# History

The Dynamic Vision (DV) toolkit is the successor to the cAER software, providing a better platform for development of
applications and interaction with event-based sensors, thanks to a better, simpler API and a first-class graphical user
interface (GUI). The last release of cAER can be retrieved from our version control here:

https://gitlab.com/inivation/dv/dv-runtime/tags/caer-1.1.2

# Dependencies:

NOTE: if you intend to install the latest git master checkout, please also make sure to use the latest dv-processing git
master checkout, as we often depend on new features of the dv-processing development version.

- Linux, MacOS X or Windows (for Windows build instructions see README.Windows)
- gcc >= 13.0 or LLVM clang >= 18 or Apple XCode >= 16.0
- libstdc++ >= 13.0 or LLVM libc++ >= 18 or Apple XCode libc++ >= 16.0
- cmake >= 3.22
- Boost >= 1.80
- OpenCV >= 4.2.0
- dv-processing >= 2.0.0
- fmt >= 9.1.0
- lz4
- zstd
- OpenSSL
- Optional: google-perftools >= 2.5 (faster memory allocation, heap/cpu profiling)
- Optional: Aravis >= 0.8.20 (machine vision camera module)
- Optional: FFmpeg >= 3.4.0 (live-streaming and video output modules)
- Optional: SDL2 >= 2.0.0 (embedded visualizer module, prefer dv-gui instead)

On Ubuntu Linux:

```
$ sudo apt-get install build-essential cmake pkg-config libboost-all-dev libssl-dev libopencv-dev libopencv-contrib-dev liblz4-dev libzstd-dev libfmt-dev
```

On Fedora Linux:

```
$ sudo dnf install @c-development cmake pkgconfig boost-devel openssl-devel opencv-devel lz4-devel libzstd-devel fmt-devel
```

On MacOS (using Homebrew):

```
$ brew install cmake pkg-config boost openssl opencv lz4 zstd fmt
```

# Installation

1. configure:

```
$ cmake -DCMAKE_INSTALL_PREFIX=/usr <OPTIONS> .
```

The following options are currently supported:

- DVR_ENABLE_TCMALLOC=ON -- Enable Google-Perftools' TCMalloc memory allocator (plus heap profiler).
- DVR_ENABLE_PROFILER=ON -- Enable Google-Perftools' CPU profiler (works best on Linux).

NOTE: heap and CPU profiler can be used together, though the heap profiler will slow down your application and skew your
CPU profiler results (lots of sigprocmask() calls). The CPU profiler is not supported on Windows, and can give skewed
results on MacOS X; it works well on Linux. To get more precise results from the CPU profiler, you can start dv-runtime
manually with the environment variable: `CPUPROFILE_FREQUENCY=4000`

2. build:

```
$ make
```

3. install:

```
$ sudo make install
```

# Usage

Usage is well documented on our [online documentation](https://dv-runtime.inivation.com).

# Paper References

DVS: https://ieeexplore.ieee.org/document/4444573

P. Lichtsteiner, C. Posch and T. Delbruck, "A 128×128 120dB 15us Latency Asynchronous Temporal Contrast Vision Sensor",
IEEE Journal of Solid State Circuits, 43(2) 566-576, 2008.

DAVIS: https://ieeexplore.ieee.org/document/6889103

C. Brandli, R. Berner, M. Yang, S.-C. Liu, and T. Delbruck, “A 240x180 130dB 3us Latency Global Shutter Spatiotemporal
Vision Sensor”, IEEE Journal of Solid State Circuits, 49(10) 2333-2341, 2014.

For an exhaustive list of papers and research concerning event-based vision, please refer to:
https://github.com/uzh-rpg/event-based_vision_resources

# Help

Please use our GitLab bug tracker to report issues and bugs, or our Google Groups mailing list for discussions and
announcements.

BUG TRACKER: https://gitlab.com/inivation/dv/dv-runtime/issues/

MAILING LIST: https://groups.google.com/d/forum/dv-users/

BUILD STATUS: https://gitlab.com/inivation/dv/dv-runtime/pipelines/
