Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Compile OpenCV 3.4 and Cuda 9 with MS VS15 2017

I need to do fast image processing so I decide to go for OpenCV with CUDA support. Now I'm trying to build OpenCV as dll to use it in my project, but I am not even able to generate the VS project since CMake keeps giving me this error:

CMakeError

I am on Windows 10, CMake 3.11 with VS 15 2017 x64 generator, OpenCV 3.4 (the last release).

I have installed CUDA 9.2, 9.1 and 8.0 and set CUDA_HOME environment variable as the CUDA toolkit directory. Nothing seems to work.

Then I try to set the variable CUDA_SDK_ROOT_DIR through the CMake GUI, but the CUDA toolkit directory seems to be not the right one and I'm not able to find the CUDA sample directory anywhere.

I have googled a lot, but I found nothing that had been able to help me. Did someone face this very same issue? How can I solve it?

PS: I have successfully created the dll with TBB and IPP (without CUDA) and it is still not fast enough, so I really need to use Cuda.