Skip to content
parafin edited this page Feb 9, 2023 · 13 revisions

Dependencies

OpenCV built with CUDA and OpenGL support is required by default. Alternatively one can switch to CPU rendering code-path (much slower), which doesn’t depend on CUDA and OpenGL support in OpenCV:

  • change the following values in imagebroker.json (see inline comments there for guidance):

    1. chains/main/elements/gpuproc/elements/export/type to "export_to_hostmem"

    2. chains/main/elements/exporter/device_id to "cpu_dev"

Installing OpenCV on Linux

See linux/install_opencv.sh script, which builds OpenCV library with CUDA and OpenGL support. Tested on Ubuntu 20.04 and L4T R32.7.2. On Ubuntu it is assumed that cuda-keyring package is already installed.

Installing OpenCV on Windows

Simplest way to use OpenCV on Windows is to download the official release: https://opencv.org/releases/ (tested with version 4.6.0). The downside of this solution is a lack of CUDA and OpenGL support. To have OpenCV detected, after unpacking the package add environment variable named OpenCV_DIR with value equal to path to build sub-directory of the unpacked OpenCV package. Also another path has to be added to PATH environment variable (pay attention to cmake output) or *.dll files copied from that directory near the resulting imagebroker.exe executable (so to build*/bin directory) to be able to run the sample application.

Clone this wiki locally