Buddhi Prakash
Buddhi Prakash

Reputation: 21

how to install opencv3.4 with gpu support and visual studio 2017?

I want to install opencv with gpu support.

I am quite new to OpenCV and visual studio. I have spent the last 3 days trying to install opencv3.4 with gpu support with but all in vain. I have browsed tons of links and articles but i am not able to do it. This platform is my last hope. All i want is some simple steps to follow so that i can install Open CV with GPU support.

Note - I have install visual studio 2017, nvidia cuda development toolkit 9.1 and cmake3.1.

Upvotes: 0

Views: 1646

Answers (1)

NewTech
NewTech

Reputation: 251

  1. Start CMake and select Source-Dir and Build-Dir for OpenCV (build folder must be created by you)
  2. Click Configure
  3. Select WITH_CUDA in the WITH-Register
  4. Re-Configure
  5. Make sure CUDA was recognized. If not this Link will help.
  6. Deselect everything you don't need or supply the libs for it (e.g. Matlab, QT, OpenGL, Eigen, PNG, JPEG, etc.)
  7. Configure with no errors being shown.
  8. Click Generate
  9. Open the Build-Dir and open then OpenCV.sln.
  10. Build OpenCV in Debug and Release-Mode. (this takes quite some time!)
  11. Install OpenCV by "building" the install-target
  12. Set Environment-Variables to the include- and lib-folder

    Include Folder: /build/install/include --> OPENCV_INCLUDE

    lib-Folder: /build/install/x64//bin --> OPENCV_LIB

  13. Add Entry to path-Variable to include the bin folder

    Bin-Folder: /build/install/x64//bin

Upvotes: 2

Related Questions