Prerequisites:
- Latest CMAKE Application
- Latest OpenCV Source Files
- From GitHub repository: git://github.com/Itseez/opencv.git
- CUDA 5 SDK & Drivers
- Intel TBB
- http://threadingbuildingblocks.org/download (select windows as platform)
- Python 2.7 & Miketex for building the documentation
- Follow the instructions on http://docs.opencv.org/doc/tutorials/introduction/windows_install/windows_install.html
- Tortoisegit
- Link: https://code.google.com/p/tortoisegit/wiki/Download?tm=2
- Note: requires Msysgit
- Side by Side Installation of Visual Studio 2010/2012
- Note: You need to setup Visual Studio 2012 to run CUDA.
- Follow the instructions on
http://code.msdn.microsoft.com/windowsdesktop/CUDA-50-and-Visual-Studio-20e71aa1
We Assume you have both version of visual studio. Note, if you're an ACM member or have a dreamspark subscription you can download the professional versions for free.
1. Run Cmake
- Select where you downloaded the opencv source files from
- For build directory make a new folder. (we use buildx32 to note the build environment)
RUN CMAKE |
- If the build folder has not been created select yes for making a new directory
- Select Visual Studio 10 as the default compiler
Select Default Compiler |
- Select where the SPHINX_BUILD exe file is and if you have eigen select the respective folder
- Scroll down and click on WITH to expand it
- Select WITH_TBB
- Press configure
- You will have to specify where the include folder for TBB is installed in and press configure
Select TBB_INCLUDE_DIRS folder |
- We use
D:/gitsource/opencv/opencv_dep/tbb41_20130314oss/include - Note: it is good to make a separate folder for 3rd party libraries used
- Keep pressing configure until the red highlighted groups disappear.
4. Generate the CMAKE project solution
5. Open the Solution File & BUILD
(Open up the directory where you created the build files to)
- Run OpenCV.sln
- When VS2012 runs select: Don't Update
Select Don't Update |
- All of the projects should be noted with "Visual Studio 2010"
- Right click at the very bottom: ALL_BUILD and select build.
- Note: #1 This will take awhile as this build is with CUDA
- Note: #2 During the build and after the build is complete VS2012 will ask if you want to reload your solution... just press Ignore All
7. Also run the INSTALL project in the CMakeTarget section to move all libraries to one directory
8. Now you're ready to use OPENCV with CUDA.
To update on this tutorial. Opencv + CUDA 5.5 can now be successfully built using vs110.
ReplyDeleteCheers!