Ask Your Question

Revision history [back]

Hello, You have to install CUDA toolkit first, then setting VC directories to CUDA include files, reference directories, .lib files (in VC 10) for all projects (just by opening any VC 10 project, go to Property page, Microsoft.Cpp.Win32.user properties). After that, all the VC projects can see the header and .lib files of CUDA, then you can run cmake to generate OpenCV solution and it will automatically set details for building OpenCV libraries with CUDA (you may want to limit to CUDA architecture 2.0 for building time, because by default OpenCV will be built with CUDA architecture 1.0, 1.1, 2.0, 3.0, 3.5 and this will take very very long time (>5 hours), even with a very strong core i7 machine, just because the compiler of CUDA can not work in parallel mode). I suggest to build OpenCV with latest TBB library for utilizing multicores machine when programming with OpenCV. For running CUDA program, you have setting the environment variable PATH to CUDA's .dll files, these files are also needed when you run your program on another machine. It is also surprised that you can install CUDA toolkit and write CUDA programs on a non CUDA machine and run that programs on a real CUDA system after. Hope this help.

Hello, You have to install CUDA toolkit first, then setting VC directories to CUDA include files, reference directories, .lib files (in VC 10) for all projects (just by opening any VC 10 project, go to Property page, Microsoft.Cpp.Win32.user properties). After that, all the VC projects can see the header and .lib files of CUDA, then you can run cmake to generate OpenCV solution and it will automatically set details for building OpenCV libraries with CUDA (you may want to limit to CUDA architecture 2.0 for building time, because by default OpenCV will be built with CUDA architecture 1.0, 1.1, 2.0, 3.0, 3.5 and this will take very very long time (>5 hours), even with a very strong core i7 machine, just because the compiler of CUDA can not work in parallel mode). I suggest to build OpenCV with latest TBB library for utilizing multicores machine when programming with OpenCV. For running CUDA program, you have setting set the environment variable PATH to CUDA's .dll files, these files are also needed when you run your program on another machine. It is also surprised that you can install CUDA toolkit and write CUDA programs on a non CUDA machine and run that programs on a real CUDA system after. Hope this help.