How to Build OpenCV 4.1.1 with GPU (CUDA) Suport on Windows

preview_player
Показать описание
This video will help you to build your OpenCV-4.1.1 with GPU (CUDA) support on windows.

Prerequisites:-
1. You must have Nvidia GPU mounted on your PC, and it must have CUDA support.
2. You must have installed Nvidia GPU drivers and CUDA development Kit.
3. You must have MicroSoft Visual Studio 2017 or newer version.
4. You must have installed Python 3. (Optional but Recommended)
5. You must have Installed Latest C-Make.


Commands:
To change the directory: "cd (Build Path Directory)"
To build when you are in build Directory: "msbuild INSTALL.vcxproj /p:Configuration=Release"

Рекомендации по теме
Комментарии
Автор

Don't forget to add /m to your msbuild command to utilize multiple CPU cores

sagumekishin
Автор

Awesome, thanks! Is it really your voice..? Sounds so deep...

detakantara
Автор

How to resolve the following error :-
" C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Microsoft\VC\v160\Microsoft.CppCommon.targets(231, 5): error MSB6006: "cmd.exe" exited with code 1. Stack Overflow cannot solve the error.

anmolsinha
Автор

Configuring incomplete, errors occurred!
See also
See also

this error is coming

Arjun-yzsx
Автор

OpenCV is sick, it does not build with CUDA support, so many errors during compile.

nitinkumar
Автор

Thank you for comprehensive explanation, Abubakir! I try to build opencv420+contrib, CMake stage passed OK, but building opencv.sln as taken BUILD_ALL failed. "Cannot find opencv_dnn420.lib". But it is my goal! Are you sure, that Visual Studio 2015 (my case) will not do?

Andrey_Zakharoff
Автор

Hello. I've been trying to bind this version with my python. Unfortunately i have not been able to do it. When import Opencv in any of my environments i still have the old version.

melvinlara
Автор

Hello. When I run the "msbuild INSTALL.vcxproj /p:Configuration=Release" in CMD, there is an error "MSBUILD : error MSB1009: project file does not exist". Anyone can help me solve this error, thank you!

HouWaye-djct
Автор

everything built, but can't import it into REPL when i run python from the command-line. is there an extra step to import it to a particular project

Blebona
Автор

i keep getting "cv2 module not found"... how to bind opencv to python?

nondeterministic
Автор

Very good!!! Thank you man! It helps me a lot!

RenatoSoftllution
Автор

Hi, how to OpenCV-4.1.1 with GPU (CUDA) binding to python?

DIYMaker
Автор

hi, how to update opencv? and does updating cuda create any problems?

IMSezer
Автор

At the beginning, I got configuration errors that couldn't be solved until I used opencv_contrib-4.1.1 instead of opencv_contrib-master.
Then, the following build errors occurred. Could you pls help advise how to solve?

Done Building Project (default targets) -- FAILED.

Done Building Project (default targets) -- FAILED.


Build FAILED.

(default target) (1) ->
(default target) (3) ->
(default target) (19) ->
(default target) (21) ->
(default target) (23) ->
(default target) (24) ->
(CustomBuild target) ->
C:\Program Files (x86)\Microsoft Visual
34, 5): error MSB6006: "cmd.exe" exited with code 1.

0 Warning(s)
1 Error(s)

mohamedhedeya
Автор

It's nice.But when I used vs2017 to build opencv4.2.0 with CUDA10.2, it repeat outing a warning warning : field of class type without a DLL interface used in a class with a DLL interface", could you teach me how to solve this.Thanks.

chrisr.