terminate called after throwing an instance of ‘cv::Exception’
what(): OpenCV(4.5.2) /home/opencv_contrib-4.5.2/modules/cudev/include/opencv2/cudev/grid/detail/split_merge.hpp:241: error: (-217:Gpu API call) no kernel image is available for execution on the device in function ‘split’
What is the model (e.g. GTX 1060) or compute capability (e.g. 6.1) of your GPU and which compute capabilities did you compile OpenCV to use, i.e. what does the CMake output under NVDIA CUDA look like, e.g.
Its the CMake output from the configuration stage. If you don’t have that go to your build folder, open CMakeCache.txt and search for CUDA_ARCH_BIN, you should find something similar to
//Specify ‘real’ GPU architectures to build binaries for, BIN(PTX)
// format is supported
CUDA_ARCH_BIN:STRING=6.1,8.6
//Specify ‘virtual’ PTX architectures to build PTX intermediate
// code for
CUDA_ARCH_PTX:STRING=8.6
to CMake to build CUDA code for your device architechture, or don’t pass anything and it will default to building for all valid architechtures which for the combination of OpenCV 4.5.2 and CUDA 11.6 will include 8.0.