Compiling OpenCV 4.5.5 with CUDA 11.6 and CuDNN 8.3.2

Hi all,
I am trying to compile OpenCV 4.5.5 with CUDA 11.6 and CuDNN 8.3.2 on Windows using Visual Studio 2022, but I receive some errors when trying to compile.
It seems that:

  • CuDNN 8.3.2 needs CUDA 11.5
    But, if I change CUDA 11.6 to 11.5, when trying to compile, say that only works with Visual Studio 2019, and again can’t compile. If I change the header file with this requeriment, also a lot of errors in compilation.

So, can I build OpenCV 4.5.5 with latest CUDA and CuDNN or without having to install Visual Studio 2019?

Thanks in advance (I am not sure if this is the correct place to ask, but as it seems a CUDA and CUDNN related thing not OpenCV). In fact, I haven’t any problem compiling with CUDA 11.6 support but without CUDNN.

Ruben

Sorry, I have finally compiled that, OpenCV 4.5.5 with CUDA 11.6 and CuDNN 8.3.2 without errors, the problem was with CUDNN Library path on OpenCV, it has to point to .lib CuDNN file.

I haven’t tested it working yet, but at last, compilation is ok.

Ruben