Nvjpeg Cmake and OpenCV frames

For a single use case I’d advise to just use a shell alias that wouldn’t mess with anything else than your application:

alias your_app='LD_PRELOAD=/usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so  /absolute/path/to/your_app'

For a more generic case, may be you may try rt-link paths for cmake install, but I can’t help for this.
Please share if you succeed, this may be helpful.

Also be aware that using opencv for other backends using jpeg than NVIDIA may no longer work, as there is a discrepancy with jpeg struct with nvidia lib’s as compared to standard jpeg lib.

1 Like