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
-http://opencv.org/downloads.html

2. CUDA development toolkit
-https://developer.nvidia.com/cuda-downloads
If your OS is window 7 64bit and desktop, download  cuda-winvista-win7-win8-general-64 version

3. CMake
-http://www.cmake.org/cmake/resources/software.html

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.

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


Comments

Popular posts from this blog

OpenCV Stitching example (Stitcher class, Panorama)

(OpenCV Study) Background subtractor MOG, MOG2, GMG example source code (BackgroundSubtractorMOG, BackgroundSubtractorMOG2, BackgroundSubtractorGMG)

Example source code of extract HOG feature from images, save descriptor values to xml file, using opencv (using HOGDescriptor )

Real-time N camera stitching Class.

8 point algorithm (Matlab source code) / The method to get the Fundamental Matrix and the Essential matrix

Optical Flow sample source code using OpenCV

Video Stabilization example source code, (using cvFindHomography, cvWarpPerspective functions in openCV)

(OpenCV Study) calcOpticalFlowFarneback example source code ( dense optical flow )

yuv422(YUYV) to RGB and RGB to yuv422(YUYV), (Using OpenCV and TBB)

OpenCV Drawing Example, (line, circle, rectangle, ellipse, polyline, fillConvexPoly, putText, drawContours)