CUDA + OpenCV Setting(install) method, OpenCV programing using CUDA

For using CUDA-OpenCV, you have to made dll, lib newly.
Because download dll, lib is often not included cuda function.

Firstly, you have to download theses files. (prepare these files)

1 .OpenCV 2.26

2. CUDA development toolkit
If your OS is window 7 64bit and desktop, download  cuda-winvista-win7-win8-general-64 version

3. CMake

and unzip or install 1, 2, 3 file.

and Excute CMake program.

'Making_GPUOpenCV_forPosting' folder is made newly in the C:/opencv folder.
click configuration and select your compile version, in my case I use vs 2012, so I selecte visual studio 11.

Then, you will see following picture.

Now, select cuda releated options.
In my case, I have selected 3 options, 'CUDA_FAST_MATH, WITH_CUBLAS, WITH_CUDA'.
And you must check the cuda toolkit path.

And click configuration again.
check!, cuda option is included or not, you can see the contents at the below window.

Next, click generate.

Files is made in the folder.
And open the "OpenCV.sin" file as compiler.

Next, Compile and prayer~
If you have success to compile, you can get Lib and Dll files of CUDA version.

Make debug and release version dlls and libs.
And gather files to the one folder to use comfortable.

Test cuda version opencv libs.
This is exaple source code.

Do not cuda programming on the remote mode.
And gpu graphics card is required.

No comments:

Post a Comment