Problem when building OpenCV with nvjpeg library

asked 2020-01-31 10:30:25 -0600

Hello all,

I am trying to build the OpenCV 3.4.9 with nvjpeg library which support hardware acceleration on jpeg encoding and decoding. Howeve, it will always encounter issue. I would like to know whether anyone has successfully built one with nvjpeg support. I tried libjpeg-turbo. However, the decoding speed is still too slow for the Jetson tx2.

My build command is

cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local \ -D WITH_CUDA=ON \ -D WITH_CUBLAS=ON -D ENABLE_FAST_MATH=ON -D CUDA_FAST_MATH=ON \ -D WITH_LIBV4L=ON -D BUILD_TESTS=OFF \ -D BUILD_PERF_TESTS=OFF -D BUILD_EXAMPLES=OFF \ -D WITH_QT=ON -D WITH_OPENGL=ON -D OPENCV_EXTRA_MODULES_PATH=../opencv_contrib/modules \ -D WITH_JPEG=ON -D BUILD_JPEG=OFF \ -D JPEG_INCLUDE_DIR=/usr/src/jetson_multimedia_api/include/libjpeg-8b \ -D JPEG_LIBRARY=/usr/lib/aarch64-linux-gnu/tegra/libnvjpeg.so ..

Thank you very much!

edit retag flag offensive close merge delete

Comments

and the issue is?

LBerger gravatar imageLBerger ( 2020-01-31 11:30:19 -0600 )edit

Here is link: nvJPEG

supra56 gravatar imagesupra56 ( 2020-01-31 21:18:54 -0600 )edit

Does this help?:

cmake -DBUILD_LMDB=ON -DNVJPEG_ROOT_DIR=/home/smluo/GithubProject/cuda-linux64-nvjpeg -DJPEG_TURBO_ROOT_DIR=/home/smluo/anaconda3/envs/python35 ..
supra56 gravatar imagesupra56 ( 2020-01-31 21:29:02 -0600 )edit

Take a look: build library

supra56 gravatar imagesupra56 ( 2020-01-31 21:41:37 -0600 )edit

Hello supra56. Sorry for the late reply. However, these build flags are for DALI. The nvJPEG is pre-built when I installed JetPack to the Jetson TX2. And DALI is not supported in the platform.

waitin450 gravatar imagewaitin450 ( 2020-02-03 09:46:20 -0600 )edit