OpenCV 4.8.0 with Contrib Fails on Jetson Orin NX (JetPack 6.2)

Hi,
I have a preinstalled OpenCV 4.8.0 on my Jetson Orin NX (JetPack 6.2, Ubuntu 22.04, CUDA 12.6) without CUDA support. I’m rebuilding it with opencv_contrib 4.8.0 to enable CUDA, but the build fails at 17% in cudaarithm (minmax.cu). The error in reduce.hpp:379 is: “no instance of overloaded function ‘cv::cudev::blockReduce’ matches the argument list”, due to Thrust tuple mismatches for types like uchar, schar, float, etc.

Details:

Environment: Jetson Orin NX, JetPack 6.2, CUDA 12.6, compute 8.7, Ubuntu 22.04.
Existing Setup: OpenCV 4.8.0 installed, now rebuilding with opencv and opencv_contrib at tag 4.8.0.
CMake Flags: -D WITH_CUDA=ON -D CUDA_ARCH_BIN=8.7 -D WITH_CUDNN=ON -D OPENCV_DNN_CUDA=ON -D OPENCV_EXTRA_MODULES_PATH=~/opencv_contrib/modules -D BUILD_EXAMPLES=OFF -D PYTHON3_EXECUTABLE=/usr/bin/python3.
**Error Sample:**
    /home/lefou/opencv_contrib/modules/cudev/include/opencv2/cudev/grid/detail/reduce.hpp(379): error: no instance of overloaded function "cv::cudev::blockReduce" matches the argument list
    argument types are: (thrust::tuple<volatile float *, volatile float *>, thrust::tuple<float &, float &>, int, thrust::tuple<cv::cudev::minimum<float>, cv::cudev::maximum<float>>)

Has anyone added CUDA support to OpenCV 4.8.0 with opencv_contrib on JetPack 6.2?
LefouLog.txt (77.1 KB)

Hi,

JetPack 6.2 uses CUDA 12.6 and it requires a recent commit to work.

So we recommend building OpenCV 4.10+ to avoid this compatibility issue.
Thanks

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.