How To Install and Build OpenCV C++ with NVIDIA CUDA GPU in Visual Studio Code

preview_player
Показать описание

You will also get access to all the technical courses inside the program, also the ones I plan to make in the future! Check out the technical courses below 👇

_____________________________________________________________

In this video 📝 we are going to Install and Build OpenCV with GPU in C++. We are going to use NVIDIA Cuda to run our OpenCV programs on an NVIDIA GPU. We will go over the installation process for all the required programs and files. We will then use CMake to do the configuration of the OpenCV source files and then build them with GPU support later on. At the end of the video, I'll show how we can include the OpenCV library with GPU support in Visual Studio code and see how we can verify that everything is set up correctly.

If you enjoyed this video, be sure to press the 👍 button so that I know what content you guys like to see.

_____________________________________________________________

_____________________________________________________________

_____________________________________________________________

📞 Connect with Me:

_____________________________________________________________

🎮 My Gear (Affiliate links):
🖥️ Desktop PC:

_____________________________________________________________

Timestamps:
0:00 - Overview
2:30 - Download OpenCV Source
5:39 - Install Visual Studio
7:03 - Anaconda and Python
7:47 - CMake
8:21 - Install NVIDIA Cuda and cuDNN
11:12 - CMake Configuration
18:09 - Build OpenCV with GPU
20:10 - Verify Installation and VSCode Setup

Tags:
#OpenCV #opencvGPU #NVIDIA #Cuda #ComputerVision #OpenCVcpp #CPP
Рекомендации по теме
Комментарии
Автор

Join My AI Career Program
Enroll in My School and Technical Courses

NicolaiAI
Автор

Thanks! This video was very helpful, but I have a question about fast math. I looked it up and seemed to only find horror stories of imprecise float roundoff. Will fast math be enabled by default? Or will we have to set a compiler flag to enable it?

isaacberrios
Автор

hey thanks for the video, i have an geforce 940mx gpu hardware, it's said that it have cuda version 5.0 but i dont know and don't understand yet witch cudnn to choose for this version. thanks

nurulistibudi
Автор

Great video, thanks for this! I am having troubles running the program where a "No CUDA support" error appears. I assume the issue stems from my current opencv environmental paths. I watched your other CMake video and setup the environmental paths and such but for the new opencv downloads, would we need to use new environmental paths to target new lib and bin? If so, where are the corresponding lib and bin paths of the opencv-4.5.2 downloads?

OUKSEE
Автор

Please do a detailed project on cancer cell modeling and simulation. Thanks

tajbaanook
Автор

Hi, I got some troubles to install CUDA to use it for a opencv project on QT. I use minGW as compiler and it appears that it can not work if I don't use Visual Studio as compiler (I got the error Cmake OpenCV is not able to find/configure CUDA SDK (required by WITH_CUDA)). Do you guys have a solution for that or is it really impossible to use CUDA and cuDNN with minGW?

alexidesvignesnouvel
Автор

If we were to generalize the instructions for an opencv installation without Cuda, what parameters in the video must be ignored and would there be any additional parameters?

joedavid
Автор

Why can't I do run>start debugging or run>start without debugging it only works with ctrl+f5?

BdyPhrk
Автор

Help please. The first time I installed it without DNN support. So I tried to reinstall it by deleting my "build" folder and uninstalling Anaconda, to have everything clear. I tried to do the process again and now It doesn't work. Is there a proper way to uninstall completely the compiled OpenCV.

oscarfuentes
Автор

new video please with opencv 2022 because 2019 is not supported anymore and i cant even download it

thehulk
Автор

If I plan to launch program on gtx 980 and gtx 1060 vide cards, can I set both values 5.2;6.1 in CUDAR_ARCH_BIN ?
Thanks!

iiiFiinka
Автор

when i am configure for second time its giving a no " modules has been found " error and i am copy paste the error message to chat gpt and it says you have to download codec how could i fix this

x-mesh
Автор

Tried bulding 4.8.0 twice, and both times I'm missing the "install" folder.
Any ideas?
I have ticked the opencv_world in cmake.
And the install folder was set.

Random-nfqb
Автор

Hi, I have a question. While i was following the 'CMake Configuration' step, I couldn't find the 'OPENCV_DNN_CUDA'. But, I already installed cuDNN. So, i don't know what is wrong. Could you tell me how the 'OPENCV_DNN_CUDA' is appeared? Thanks.

lzrcgkr
Автор

With all respect sir i'm having a trouble at configuring in cmake it shows and error "Configuring incomplete, Error me sir what should i do or what should i look for!?

dev___
Автор

Good tutorial but can you please figure out your mic. The clicking / volume drops are really driving me crazy.

neilsorkin
Автор

Is the method same for a jetson xavier agx machine?

_r.asidharth
Автор

thanks for this tutorial. i have a problem with the beginning. Even tried to install cuda toolkit 11.3, 11.2, 11.1 or 10.2, 10.1 but non of this worked, it kept warn "compute_50, sm_50 are deprecate" and i dont know how to fix this. Can you help me, many thanks.

anhphan
Автор

I am running into trouble with the dnn files not being made, despite checking all the required flags. Does anyone know why? cmake says cuDNN: YES

joepvand
Автор

This method assumes that I have python installed in my PC, right? What if I have python not natively but with ananconda. RIght now the Cmake configuration is telling me that can not find python. What to do?

davidaliaga