How to Build and Install OpenCV from Source | Using Visual Studio and CMake | Computer Vision

  Рет қаралды 78,298

The AI Guy

The AI Guy

Күн бұрын

How to Build and Install OpenCV from Source | Using Visual Studio and CMake - In this video I will show you how build and install OpenCV (Open Source Computer Vision) from source code. This will allow you to use OpenCV with every programming language! OpenCV is a library for computer vision and machine learning that contains over 2500 algorithms for you to use. OpenCV gives you the tools to perform facial detection, object identification, and much more.
#opencv #computervision #tutorial
Learn more about OpenCV on their official site: opencv.org/about/
Install CMake: cmake.org/download/
Install Visual Studio: visualstudio.microsoft.com/do...
Download OpenCV source: opencv.org/releases/
OpenCV contrib repo: github.com/opencv/opencv_contrib
In this video I cover:
1. Installing CMake so you can generate binary source code.
2. Installing Visual Studio so you can build source code.
3. Building and Installing OpenCV from source and verifying it works.
If you enjoyed the video, toss it a like! 👍
To Subscribe: kzbin.info/door/ryd...
Thanks so much for watching!
- The AI Guy

Пікірлер: 383
@TheAIGuy
@TheAIGuy 4 жыл бұрын
Let me know what other OpenCV or Computer Vision videos you would like to see!
@samueldare29
@samueldare29 4 жыл бұрын
Hey Man it keeps giving me this error share.getcloudapp.com/jkulORkA please can you help out?
@PUBUDUCG
@PUBUDUCG 4 жыл бұрын
While your project is open in VS, someone is changing the files in the project. Did you configure Cmake and built with no red lines ? I used VS2019 and did not have any compiling issues
@parsasarosh4079
@parsasarosh4079 4 жыл бұрын
If yolov3 can be used to detect brain tumors. Which data set should be used? Can you make a video how to perform transfer learning in yolov3 for that dataset.
@aaaafireball9322
@aaaafireball9322 4 жыл бұрын
for whoever is reading this, if your INSTALL build doesnt work, exit VS, open cmd as admin, navigate to the build folder and open Opencv.sln from the CMD window
@anuragdhyani1712
@anuragdhyani1712 4 жыл бұрын
no cv 2 module .......... DUDE , already put in path so please don't suggest path update in environment variable ! Please halp
@joycechen7535
@joycechen7535 Жыл бұрын
For anyone thats getting errors on building, try to run the cmake throught admin. It worked for me!
@raflesia1822
@raflesia1822 4 жыл бұрын
while more i learn this, at this time more i love it... :D thanks so much.(Your channel is Specialist)
@omkargosavi7415
@omkargosavi7415 2 жыл бұрын
What a wonderful tutorial... Amazing... Thank you Man... Really helpful.
@areennasrawi9054
@areennasrawi9054 4 жыл бұрын
Thanks a lot for your help, I did all the steps and cv2 appeared in the cmd screen but not in the pycharm. What should I do?
@PUBUDUCG
@PUBUDUCG 4 жыл бұрын
I am new to this and managed to get everything compiled VS2019. Its shows all succeeded but it still could not be accessed from Python. I removed all old opencv versions and Python and included a fresh copy of Python before Cmake steps. Whenever I import cv2, says it does not available. What communication happens with Python when installing the project in VS build ? site packages folder in Python does not have any reference to OpenCV. I added build/install folder path in windows path as well. My questions here is how does python knows if the Cv2 library is installed ?.
@sashthecreator
@sashthecreator 4 жыл бұрын
after the second config on cmake i got a single red line on 'BUILD_opencv_bgsegm' please help?
@heyalexluu
@heyalexluu 4 жыл бұрын
A solution if Cmake doesn't compile, try to uninstall C++ on VS and reinstall. Worked for me! Everything else went smoothly.
@marsinsmusic
@marsinsmusic 11 ай бұрын
top guidance! thank you so much! Greately appreciated!
@kevinwu2040
@kevinwu2040 2 жыл бұрын
Thank you. This is really helpful, and I really appreciate it.
@sesgiog
@sesgiog 3 жыл бұрын
If I try activating the CUDA for the GPU Acceleration via configuring it, should it work?
@aloufin
@aloufin 3 жыл бұрын
How do you install this into a miniConda environment? e.g. is it possible to install these into each env you have set up?
@MartinLind16
@MartinLind16 4 жыл бұрын
I used the Opencv 4.4.0 source version and after reconfigure the contrib modules I still had red lines. Mostly they include the topic caffe_INCLUDE_DIR not found. Can I disable Caffe include and HDF5? Or what can I do to get rid of the red lines
@fatihfuad1909
@fatihfuad1909 3 жыл бұрын
hi, it worked for me thank you, but can i know what happened if i delete the " build " folder after everything is done? I still can use cv2 module or not?
@NeroEinstein1973
@NeroEinstein1973 Жыл бұрын
Thank you sir. This was very valuable.
@panagiotissavvidis8271
@panagiotissavvidis8271 4 жыл бұрын
Hi Man, i got the following while cofiguring the second time when i added the contrib folder/modules "data: Download: face_landmark_model.dat CMake Warning at cmake/OpenCVGenSetupVars.cmake:54 (message): CONFIGURATION IS NOT SUPPORTED: validate setupvars script in install directory Call Stack (most recent call first): CMakeLists.txt:967 (include)" is that something to worry?
@andrewcilia3581
@andrewcilia3581 4 жыл бұрын
Your tutorials rock !!
@TheAIGuy
@TheAIGuy 4 жыл бұрын
Appreciate it!
@BdyPhrk
@BdyPhrk 3 жыл бұрын
Now that I have the source code in visual studio, why can't I just add my external project and include in main.cpp, it doesn't work.
@i_am_great6344
@i_am_great6344 2 жыл бұрын
What files should i add in environment variables and visual studio
@M2Itacho15
@M2Itacho15 4 жыл бұрын
Hi ! Can you please tell me why when i run INSTALL, after BUILD_ALL, visual studio starts the building process again instead of installing?
@anamaykane9355
@anamaykane9355 3 жыл бұрын
Hello, I am using Eclipse with C++. I don't need Python but in CMake, Python2 keeps showing up as red even after removing the entry. What to do?
@nicechang2468
@nicechang2468 3 жыл бұрын
How can I build opencv2 on ubuntu? It failed, and a commit issuse on gihub but in won't be fixed.
@ajmalhadi97
@ajmalhadi97 3 жыл бұрын
how to get the cmake recognize the python interpreter? Mine the OpenCV.sln file doesn't show. Is it because the python interpreter?
@albius96
@albius96 4 жыл бұрын
so i was trying to install open cv and have to create a python project, the problem is when i build the all build it gives me the "opencv_python2.vcxproj"error not completed, what should i do?
@kotai2003
@kotai2003 3 жыл бұрын
How to uninstall the Opencv which I build with cmake and visual studio?
@praveenkispotta1999
@praveenkispotta1999 3 жыл бұрын
After I uninstall opencv-python in the command prompt...it does not import cv2 , I tried many times
@joshgibson539
@joshgibson539 4 жыл бұрын
For those having a problem install Python from the executable found on their website and not Windows Store. Then you will automatically get Pip working as well. First type out python then hit enter. To find out the cv2 version after importing copy and paste this exactly as is for some reason it has to be specifically copied and presented this way: "import cv2 cv2.__version__" Just don't copy it with the quotation marks otherwise it won't work. Also keep the indentation for the next line it's key to making it function for some reason. Then hit enter once again. Leave a thumbs up if this worked for you like it did for me. I followed everything but that portion was the toughest.
@evelynjunco4574
@evelynjunco4574 4 жыл бұрын
Hi Josh, if i copied and pasted "import cv2 cv2.__version__" and it will only copy "import cv2", then show the error and "cv2.__version__" on the line after that. Btw, the error I get after import cv2 is : Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'cv2'. Please help!
@pkz111111
@pkz111111 3 жыл бұрын
Issue when building OpenCV 4.4.0 from source. When I build "ALL_BUILD" and "INSTALL" projects using VS2019 Windows10 I got 2000 somthing warnings (only warnings no errors at all) saying: "Warning: field of class type without a DLL interface used in a class with a DLL interface" and "Warning: base class dllexport/dllimport specification differs from that of the derived class" Pre install CUDA 10.1 with matching cudnn. GPU: RTX 2080. When tring to build darknet for using YoloV3 it dosen't showing CUDA in cMake.
@MutenRoshiUI
@MutenRoshiUI 3 жыл бұрын
I followed the steps and my build was success . But i am using Anaconda , so when i tried importing cv2 in base env it says NO module cv2.
@weixiangng8279
@weixiangng8279 3 жыл бұрын
@The AI Guy, love your video.
@hhotsauce
@hhotsauce 3 жыл бұрын
I get an error " cmake error at CMakeLists.txt:106 (enable_language): generator Visual studio 16 2019(I'm using VS 2017 tho :/) could not find any instance of visual studio" how do I fix this??? Please help
@zeynabamanat
@zeynabamanat Жыл бұрын
This is very helpful, thanks! but I want to use opencv in android so how can build it for android with libc++ and ndk r21e? from what step must change opencv building?
@jhonjamiltonmajinerazo7894
@jhonjamiltonmajinerazo7894 4 жыл бұрын
Congratulations on the video. A guide on how to use this opencv configuration in an anaconda environment would be excellent. since anaconda usually uses '' conda install -c conda-forge opencv '' and nowhere is it possible to make the settings to use the GPU.
@ba-en1io
@ba-en1io 4 жыл бұрын
Im getting the error Traceback (most recent call last): File "", line 1, in File "C:\Users\bisma\AppData\Local\Programs\Python\Python38\lib\site-packages\cv2\__init__.py", line 89, in bootstrap() File "C:\Users\bisma\AppData\Local\Programs\Python\Python38\lib\site-packages\cv2\__init__.py", line 79, in bootstrap import cv2 ImportError: DLL load failed while importing cv2: The specified module could not be found. Please help me resolve it.
@divyasree53
@divyasree53 3 жыл бұрын
@AI Guy, when importing cv2 it gives import error:DLL load failed. The specified module could not be found.
@dkibe6006
@dkibe6006 3 жыл бұрын
I have a question... if I install OpenCV from the source will it also be set up in my virtual environment correctly?
@AdmMusicc
@AdmMusicc Жыл бұрын
Is it possible to use this manually built opencv package in a virtual environment? If yes, can someone guide on the steps involved?
@9934max
@9934max 4 жыл бұрын
Hi Thank you for tutorial, after Building the model , i got the error "Severity Code Description Project File Line Suppression State Error C2872 'SIFT': ambiguous symbol opencv_test_xfeatures2d C:\Users\Public\OpenCV\opencv_contrib-4.3.0\modules\xfeatures2d\test\test_features2d.cpp 100 ". I though my earlier python-opencv causing the issue, so uninstalled the python-opencv and rebuild the program. still i am get above error, can you help me on this
@peregrinussolutionsllc6010
@peregrinussolutionsllc6010 4 жыл бұрын
Thank you again for posting such amazing content! I appreciate your assistance to my previous comments to this video. I wasn't able to devote much time to this project for a couple of weeks until today. I just finished successfully installing everything on a different hard drive/copy of Windows by following your video only! I'm going to install Cuda Toolkit next. Then its: The AI Guy YOLOv3 Object Detection with Darknet for Windows/Linux | Install and Run with GPU and OPENCV video here we go! :-) We greatly appreciate your videos, thanks again for them and your help in the comments!
@TheAIGuy
@TheAIGuy 4 жыл бұрын
Glad you got it to work! Hope everything else goes smoothly! You can also try "Yolov3 in the cloud..." video and it will easily install darknet and allow you to run yolo detections in the cloud!
@rob26r
@rob26r 4 жыл бұрын
Man - I must be dumb. I keep getting the can’t find module error message. I reviewed all previous posts and troubleshot it to death but no luck. I’m uninstalling anaconda then will try again.
@TheAIGuy
@TheAIGuy 4 жыл бұрын
@@rob26r you are getting the cant find module cv2 error?
@TheAIGuy
@TheAIGuy 4 жыл бұрын
@@rob26r if so google "add opencv to path" and follow along with one of the solutions
@rob26r
@rob26r 4 жыл бұрын
The AI Guy yes that is the error message. I saw that comment from another user. I got too tired last night to follow it but back at it now... thanks!!
@hariteja6188
@hariteja6188 4 жыл бұрын
I have done the same thing for cv2 3.4.10 version but I couldn't get it install .
@alishatechz7035
@alishatechz7035 3 жыл бұрын
Hello I want help whenever I download open CV Contrib from Git Hub it also show some error in the file not extracting the data . Plz guide me
@MrMiniMe03
@MrMiniMe03 4 жыл бұрын
Hey thanks alot for the good tutorial, I was wondering how to get pycharm to work with the opencv version just built, now I just run the .py files from terminal, seems like "pycharm python" and python is two different installs.
@TheAIGuy
@TheAIGuy 4 жыл бұрын
if you are using pyn how charm then I think you can just install opencv-python and it should work. Check out my separate video on how to do this!
@anamaykane9355
@anamaykane9355 3 жыл бұрын
How to build and install OpenCv using mingw and cmake with Eclipse in Windows 10?
@LathaTutorial
@LathaTutorial 4 жыл бұрын
so i am getting error while configure in cmake so plz reply so it is showing error and project files may not be uploded corectly so plz solve i am ur subscriber
@iam_a_sad_khan
@iam_a_sad_khan 2 жыл бұрын
after installation when I type import cv2 in python, I am getting an error "ModuleNotFoundError: No module named 'cv2'". Can someone help me out? is it because I haven't set the environment variable of the directory in which I built this OpenCV project?
@adithikashain9007
@adithikashain9007 3 ай бұрын
i also have the same issue. did you fix it?
@moawiyaguinoubi836
@moawiyaguinoubi836 2 жыл бұрын
hi, thank you for the video really amazing, but i have this warning that keeps coming up everytime i try to build OpenCV with VS: "field of class type without a DLL interface used in a class with a DLL interface", i get like 5000 warning like this, mind you that i am still going to build the darknet for YoloV3 after this, idk what to do, can you please help me.
@karljoyeux8845
@karljoyeux8845 Жыл бұрын
Hi, I did every steps but when I try to check the version with python it says cv2 has no module __version__ do you know why ? Plus I still can't use opencv on my vscode but thanks anyways. Hope you will see this !
@calitosmenem
@calitosmenem 3 жыл бұрын
Great video AI Guy. I also got the error ' ModuleNotFoundError: No module named 'cv2''. I solved it with next steps: 1. Install Pyhton 3.7, not 3.8 o higher. 2. install numpy before running cmake (cmake doesn't recognoise numpy path if missing) 3. set environment variables C:\Users\xxxxxx\OpenCV\build\install\x64\vc16\bin to PATH C:\Users\xxxxxx\OpenCV\build a OPENCV_DIR to OPENCV_DIR 4. Reboot!
@vaidippatel529
@vaidippatel529 Жыл бұрын
I am also getting same error.Tried your way but not helping may be i messed up in 3rd step can you please explain it..
@ericbighead8953
@ericbighead8953 3 жыл бұрын
Perfect Video and well explained. In the end I would have just expected an example in VS. One question: Don’t we have to set environment settings in windows for openCV?
@GaryMarkowski
@GaryMarkowski Жыл бұрын
Yes. You should add a path similar to C:\OpenCV\opencv-4.7.0\out\build\x64-Debug\bin in the Windows system "Environment Variables" (Path variable). Then close and reopen Visual Studio for the Path settings to take effect. Do this after you Build OpenCV. If you create the Install for OpenCV, then you can use a path similar to C:\OpenCV\opencv-4.7.0\out\install\x64-Debug\x64\vc17\bin instead. This Path is used when you create a project that uses OpenCV.
@ravirajsinhdabhi9255
@ravirajsinhdabhi9255 4 жыл бұрын
I used opencv 4.2 source version, my all build and install code succeeds but still when I’m importing cv2, module not found error occurs!!!:( So i have to add opencv to path environment variable???
@akshayhulkuli9971
@akshayhulkuli9971 4 жыл бұрын
pls give the solution for this , even i have got the same error
@bakamiku9428
@bakamiku9428 4 жыл бұрын
@RealfagsMorten Thank you so much. It worked for me!
@jeffreyli3268
@jeffreyli3268 4 жыл бұрын
@RealfagsMorten I run the "All_Build" and "Install-Build" in a second time, bui it stll didn't work
@jjhennessy9960
@jjhennessy9960 4 жыл бұрын
@RealfagsMorten Thank you for the solution! I was running into the same issue and this fixed everything
@dingyuliu7336
@dingyuliu7336 4 жыл бұрын
@RealfagsMorten After building "install" again, I still got this ModuleNotFoundError, do you have any ideas about it..
@abhinavmishra9323
@abhinavmishra9323 3 жыл бұрын
i have done exactly the same as told in th tutorial but when i am running it is saying access denied i have edited the environment variables and included in that the bin folder but still its the same issue somebody please help
@fatihgenc7385
@fatihgenc7385 3 жыл бұрын
I can't also import openCv after all steps, i use anaconda and paths also added to system variables. HELP !
@zekerich5823
@zekerich5823 2 жыл бұрын
The install was amazing, only one i could get to work! Wish you could make a video on OpenCV basics. Like how to use it now that its installed. Thanks!
@andhikatidarprasetyo1968
@andhikatidarprasetyo1968 3 жыл бұрын
can we use the generated opencv in vs code?
@aqiffmursyideen3830
@aqiffmursyideen3830 4 жыл бұрын
hello there, i've setup my CUDA, CUDNN before and its version 10.0, Its just that I need to use MSVC 2017 and not MSVC 2019. However, I did not get the OpenCV.sln after finish configuration. Can you help me?
@urbansmurf6669
@urbansmurf6669 4 жыл бұрын
you yo need to press 'Generate' for the OpenCV.sln to appear (I believe)
@ibrakaya1773
@ibrakaya1773 3 жыл бұрын
when I build ALL_BUILD, my pc shut down suddenly after 2 minutes. do you have any idea about this situation?
@qzorn4440
@qzorn4440 3 жыл бұрын
great video... i was using opencv on the raspberry pi, which is nice. now for opencv on windows. very clear presentation. thanks a lot...:)
@feraudyh
@feraudyh 2 жыл бұрын
Is the contrib download tightly coupled to the core dowload? I mean I downloaded version 4.5.5 for the sources of the main version, but I did not see a version on the contrib.
@AnPhu-yy2pk
@AnPhu-yy2pk 4 ай бұрын
me too
@thetrainoflife8327
@thetrainoflife8327 3 жыл бұрын
I'm selecting 'with_qt' also , but I'm Getting error about qt
@noeltam75
@noeltam75 4 жыл бұрын
can u explain why the reds can be cleared after the 2nd configure without any changes?
@simplevc2980
@simplevc2980 3 жыл бұрын
maybe...just maybe....it detect changes...so from nothing to first configure , that's all the changes....and second configure when nothing changes turns to white
@Luk3r
@Luk3r 2 жыл бұрын
Can we get an update on this please? I've followed each step perfectly three times over and it never works :( I assume there's something else you need to do these days.
@tahrirsiddiqui6588
@tahrirsiddiqui6588 4 жыл бұрын
Firstly, thanks a lot for this brilliant tutorial! So I keep getting the following error when I configure in cmake, even after adding the contrib path: CMake Warning at cmake/OpenCVGenSetupVars.cmake:54 (message): CONFIGURATION IS NOT SUPPORTED: validate setupvars script in install directory Call Stack (most recent call first): CMakeLists.txt:967 (include) Also, I noticed that the python path after I configure is to the Anaconda3 folder for 3.7, although I deleted 3.7 and installed 3.8 with the windows system path for python also pointing to the location where I downloaded 3.8. Maybe that could be the reason? I've been banging my head over this so I'd really appreciate some help!
@jonosmilesalot
@jonosmilesalot 4 жыл бұрын
did you ever get a solution to this? I'm struggling with the same thing. :(
@weixiangng8279
@weixiangng8279 3 жыл бұрын
The AI Guy, does the compilation in visual studio affected by computer low ram?
@sibghariaz974
@sibghariaz974 Жыл бұрын
hi sir thank you for great tutorial. i have a problem that there is red lines after configure the contrib module path please suggest any solution? thank you in advance reply m as soon as possible because i m stuck in it and i have less time to do my project
@erolgyte
@erolgyte 4 жыл бұрын
i got similar error. Python 3.7.7 (tags/v3.7.7:d7c567b08f, Mar 10 2020, 10:41:24) [MSC v.1900 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import cv2 Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'cv2' >>>
@user-jl4wk5ms4f
@user-jl4wk5ms4f 3 жыл бұрын
same problem how to solve?
@dabody123456
@dabody123456 2 жыл бұрын
عالمي انت عالمي شكرا كثيرا ❤️❤️ ممكن اذا سمحت فيديو اخرا مشابه لهذا بدون Visual Studio اعرف طلبي صعب :""(
@areennasrawi9054
@areennasrawi9054 4 жыл бұрын
the error still there >>> import cv2 Traceback (most recent call last): File "", line 1, in ModuleNotFoundError: No module named 'cv2' pleaaase I neeeeeed help SOS
@sashthecreator
@sashthecreator 4 жыл бұрын
this fixed mind by running 'py -3.7 -m pip install opencv-python' Note: 3.7 will be changed to whatever version of python you have installed on your system.
@saul1265
@saul1265 4 жыл бұрын
@@sashthecreator but it doesn´t work for SIFT.
@fernandodealmeida9748
@fernandodealmeida9748 3 жыл бұрын
I assume you got this message in the Terminal of visual studio code. If you want to do it in Visual studio code, create a .py file, and then run it. or you can run a 'CMD windows", after active python and they try to import cv2.
@ednincer
@ednincer 4 жыл бұрын
Hello. I am doing "ALL_BUILT" (10:14) but I'm getting Build: 40 succeeded, 154 failed I'm getting a lot of LNK1181 errors, example: cannon open input file '..\..\lib\Release\opencv_core430.lib' and some C1189 errors: example: unsupported Microsoft Visual Studio version! Only the versions between 2013 and 2017 are supported (Project opencv_core, file host_config.h). I'm using MS Visual Studio 2019, same as you. Please let me know what can I try. Thanks!
@prembanker8308
@prembanker8308 4 жыл бұрын
same for me. I dont know how to proceed next
@fatima-oz3ne
@fatima-oz3ne 4 жыл бұрын
If you solve this problem PLEASE HELP ME!!!
@Sm0rezDev
@Sm0rezDev 4 жыл бұрын
Try the opencv master branch from the github repository: github.com/opencv/opencv
@DineshCrazYGuY
@DineshCrazYGuY 3 жыл бұрын
Hi i have a query.. after i press configure in cmake after checking the required options. I get download error for some of the modules.. it says "libcurl doesnot support https proxy" Actually i am working behind company proxy.. Please guide me
@DineshCrazYGuY
@DineshCrazYGuY 3 жыл бұрын
I have already set the HTTP_PROXY and HTTPS_PROXY environment variables..but still the error persist..
@adityashah4333
@adityashah4333 3 жыл бұрын
Done building project "INSTALL.vcxproj" -- FAILED. is the error that I am getting in the VS code Can anyone help me?
@MutenRoshiUI
@MutenRoshiUI 3 жыл бұрын
I followed the steps and my build was success . But i am using Anaconda , so when i tried importing cv2 in base env it says NO module cv2. Anyone help. who uses Anaconda.
@sherzodnurullayev1239
@sherzodnurullayev1239 4 жыл бұрын
Hey man. Fantastic tutorial. The most clear one I've seen so far. But I have a dumb question. Why we need to install opencv from source? What is wrong with installed opencv using PIP?
@oddcloud9022
@oddcloud9022 3 жыл бұрын
Building from source gives a few advantages over installing over pip (Python’s installer) • Allows you to install and select your own features (like in this example the contribution expansion library is added, you can also install other things like CUDA utilization) • Allows you to select the install location • Allows you to select optimization flags for faster performance of OpenCV (for example if you’re installing it with CUDA) • Allows you to add or remove features during installation A disadvantage of building from source though, is that you’re responsible for updating the install yourself (keeping up with new features, security patches, etc).
@dume85
@dume85 3 жыл бұрын
is anyone else getting this error? CMake Error at cmake/OpenCVModule.cmake:370 (_glob_locations): Syntax error in cmake code at C:/OpenCV/opencv-4.4.0/cmake/OpenCVModule.cmake:370 when parsing string C:\OpenCV\opencv_contrib-4.4.0\modules Invalid character escape '\O'. Call Stack (most recent call first): modules/CMakeLists.txt:7 (ocv_glob_modules)
@vigneshb.r9569
@vigneshb.r9569 3 жыл бұрын
After building the install in VS 2019, I checked on the command prompt and it shows that "no module named cv2"
@visarbedzeti2780
@visarbedzeti2780 3 жыл бұрын
hey did you find out how to fix this?
@aleemrehmtulla
@aleemrehmtulla 3 жыл бұрын
Thank you!
@pratimasingh4307
@pratimasingh4307 4 жыл бұрын
How do uninstall the OpenCV built using this?
@anuragdhyani1712
@anuragdhyani1712 4 жыл бұрын
no cv 2 module .......... DUDE , already put in path so please don't suggest path update in environment variable ! Please halp
@BOHICAMAN1
@BOHICAMAN1 4 жыл бұрын
Followed every step in video correctly. No red at all in CMake. Loaded OpenCV.sln into VS2019 and got what appears to be 500+ file errors that all seem to end with same error: C:\OpenCV4\Build\ALL_BUILD.vcxproj : error : Error HRESULT E_FAIL has been returned from a call to a COM component. No idea what is wrong! Also, at the top of VS screen "Solution Configurations" and "Solution Platforms" boxes are grayed out.
@BOHICAMAN1
@BOHICAMAN1 4 жыл бұрын
Disregard my last Comment above. I reloaded CMake and clicked the"Open Project" button next to the Config and Generate buttons. I then re-loaded OpenCV,sln into VS2019 and all worked. Apparently it didn't like me loading the ,sln file from outside CMake. Great Video!!
@aloufin
@aloufin 3 жыл бұрын
THANK YOU! had this problem on windows 10, VS2019
@kobishamir3
@kobishamir3 3 жыл бұрын
Hi and thank you! while I write ' import cv2' I am getting this message: ' ModuleNotFoundError: No module named 'cv2' ' can you help me out?
@fahidlod1
@fahidlod1 3 жыл бұрын
I had the same error and the above reply did not work for me. Try this: pip install opencv-python. OpenCV should begin installing in the cmd window, then as shown in the video >import cv2. Then next line >print(cv2.__version__). This should work
@kobishamir3
@kobishamir3 3 жыл бұрын
@@fahidlod1 thank you bro! It worked
@fahidlod1
@fahidlod1 3 жыл бұрын
@@kobishamir3 no problem! I had the same problem last night and took me hours to solve it hahaha so glad I could help
@dirozx
@dirozx 2 жыл бұрын
@@fahidlod1 This video is about installing opencv from source not installing it with pip.
@hadighahremannezhad2725
@hadighahremannezhad2725 Жыл бұрын
I did everything, still python can't find opencv: ImportError: DLL load failed while importing cv2: The specified module could not be found.
@niltoncesarrojasvales246
@niltoncesarrojasvales246 3 жыл бұрын
How can i uninstall opencv? I've tried build 'uninstall' instead of install but still exists in python
@auto9358
@auto9358 4 жыл бұрын
Thanks for the video! Tried running the import cv2 to confirm in the cmd prompt and no luck! Also how about integrating openCV into the visual studio IDE so that it can reference the functions, etc.
@auto9358
@auto9358 4 жыл бұрын
maybe you skipped the step of adding opencv to PATH env
@drixe7024
@drixe7024 4 жыл бұрын
I have the same issue that import cv2 doesnt work How did you fix it?
@imnischaygowda
@imnischaygowda 3 жыл бұрын
Awesome Content. While buidling OpenCV in Visual studio "warning : field of class type without a DLL interface used in a class with a DLL interface" I got this error, haven't found anyway to correct it.
@user-tj5zv2ts9d
@user-tj5zv2ts9d 3 жыл бұрын
I have the same warning
@anirudhdashottar1828
@anirudhdashottar1828 3 жыл бұрын
Any solution found?
@chandandebnath3211
@chandandebnath3211 4 жыл бұрын
I did the same thing as you showed in the video but it did not create any opecv.sln file for my case. what should I do now?
@TheAIGuy
@TheAIGuy 4 жыл бұрын
chandan adittyo did you receive any errors in configuration or generate?
@chandandebnath3211
@chandandebnath3211 4 жыл бұрын
@@TheAIGuy yes In your video you import the source code from open cv but in my case i have to choose the opencv/sources for source code and 1st time it showed some red list and i have edited the file location and reconfigure it but still there was no opencv.sln
@furkanaydnoz8905
@furkanaydnoz8905 4 жыл бұрын
Hello 1 package is installed after doing 'install' in visual studio. But there is no cv2 import in cmd
@nondeterministic
@nondeterministic 4 жыл бұрын
any luck?
@johncaling6150
@johncaling6150 3 жыл бұрын
Make sure you are running import cv2 in the same python environment what was selected in the Cmake
@johncaling6150
@johncaling6150 3 жыл бұрын
@Armaan Priyadarshan Make sure you are running import cv2 in the same python environment what was selected in the Cmake
@johncaling6150
@johncaling6150 3 жыл бұрын
@@nondeterministic Make sure you are running import cv2 in the same python environment what was selected in the Cmake
@Thamiah
@Thamiah 3 жыл бұрын
any luck?
@DevRaj-te1kh
@DevRaj-te1kh 2 жыл бұрын
AttributeError: module 'cv2' has no attribute '__version__'
@johncaling6150
@johncaling6150 3 жыл бұрын
I get error LNK1181. How to fix this?
@kaviyadharshini6383
@kaviyadharshini6383 3 жыл бұрын
I am so new to these language and software, I have an error MSB3073 the command SETLOCAL while building the INSTALL and the output shows : 2>Done building project "INSTALL.vcxproj" -- FAILED. ========== Build: 1 succeeded, 1 failed, 163 up-to-date, 0 skipped ========== Kindly,someone help.thank you!
@MuhammadAbbas-vh8ff
@MuhammadAbbas-vh8ff 4 жыл бұрын
Hello sir, Your videos are very valuable and your method is very good to understand. Also i face a issue while building OpenCV from source kindly help me. I do all the processes successfully which you show in this video to build OpenCV from source and it didn't show any error while building. But at the time of verifying the OpenCV is installed successfully or not it didn't import cv2 in command prompt. Kindly help me to configure this issue. Thank you
@Titandosgames
@Titandosgames 2 жыл бұрын
I have the same issue
@SharkbaitDC
@SharkbaitDC 4 жыл бұрын
Build ran great, but now I don't know how to include the library to the actual C++ projects so I dont get a bunch of red underlines telling me it doesnt understand some commands.
@dogeilante
@dogeilante 2 жыл бұрын
dude how did you figure this shit out
@RI-zr3go
@RI-zr3go Жыл бұрын
If an error occurs when "import cv2' "ModuleNotFoundError: No module named 'cv2' before building CMack install in python "numpy" for this, write the command 'pip install numpy') OpenCv 4.5.1 instaled in windows Python 3.6.8
@joaosilva5483
@joaosilva5483 4 жыл бұрын
Hi. Everything worked for me and i didnt get any error importing cv2, but when i do cv2.__version__ i get an error cv2 has no attribute version
@jasmeetsingh2666
@jasmeetsingh2666 4 жыл бұрын
I am having the same issue....if you have resolved this issue.....can you share the solution.
@joaosilva5483
@joaosilva5483 4 жыл бұрын
@@jasmeetsingh2666 I don't remember how I fixed it. I think that opencv is successfully installed. If you are trying to install DARKNET, like I was, when generating code for DARKNET or other project in cmake you can define Opencv_build folder I think. That's how I remember at least
@RMdimension
@RMdimension 4 жыл бұрын
So in the last step it prints out Version 4.2.0, even though I downloaded Version 4.3.0. Is this a problem?
@kavinduwijesinghe7771
@kavinduwijesinghe7771 4 жыл бұрын
The same thing happened.
@sergiyisakov5192
@sergiyisakov5192 4 жыл бұрын
did you succeed to build 4.3.0? For me it tells it cannot find SIFT in xfeatures2d, I think it's not supported since some release
@krishnasahoo6676
@krishnasahoo6676 2 жыл бұрын
ALL_BUILD completed successfully without error. But while building the INSTALL, I got 1 error with code MSB3073. Please help.
@pathumrathnayaka2840
@pathumrathnayaka2840 4 жыл бұрын
Hi! Few of the extra modules; such as SFM, VIZ, etc... were missing after configuring with Cmake. Any help would be much appreciated. Thanks in advance!!
@evankolberg
@evankolberg 4 жыл бұрын
C:\>python Python 3.6.8 (tags/v3.6.8:3c6b436a57, Dec 24 2018, 00:16:47) [MSC v.1916 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import cv2 >>> print(cv2.__version__) Traceback (most recent call last): File "", line 1, in AttributeError: module 'cv2' has no attribute '__version__' I am able to import cv2 but I can't check the version. I downloaded the same version as you though, 4.1.2. Does this matter?
@rahuldas6109
@rahuldas6109 Ай бұрын
Sir I need help, please tell me how to fix this: >>> import cv2 OpenCV bindings requires "numpy" package. Install it via command: pip install numpy Traceback (most recent call last): File "", line 1, in File "C:\Program Files\Python312\Lib\site-packages\cv2\__init__.py", line 11, in import numpy ModuleNotFoundError: No module named 'numpy' and I tried installing numpy using pip install numpy but its still showing same this error
@tuanazzam6320
@tuanazzam6320 3 жыл бұрын
I did exactly as you did it. But still it is not build and give errors. CMake Error at cmake/OpenCVModule.cmake:274 (message): No modules has been found: D:/AzzAM/After2020/MyPrograms/VS_Programs/AdditionalLibraries/raw_libraries/CV/opencv_contrib-4.5.2 Call Stack (most recent call first): cmake/OpenCVModule.cmake:356 (_glob_locations) modules/CMakeLists.txt:9 (ocv_glob_modules) That is the errror output
@kushshah1288
@kushshah1288 2 жыл бұрын
I am getting the following error: CMake Error: Cannot open file for write: C:/Program Files/Opencv/build/CMakeCache.txt.tmpab264 CMake Error at cmake/OpenCVUtils.cmake:924 (file): file problem creating directory: C:/Program Files/Opencv/build/CMakeFiles/dephelper Call Stack (most recent call first): CMakeLists.txt:80 (include)
@vagheladarshan570
@vagheladarshan570 3 жыл бұрын
i am getting "msb3073 the command setlocal" errror after build install help
Пробую самое сладкое вещество во Вселенной
00:41
Osman Kalyoncu Sonu Üzücü Saddest Videos Dream Engine 170 #shorts
00:27
Каха ограбил банк
01:00
К-Media
Рет қаралды 11 МЛН
Alat Seru Penolong untuk Mimpi Indah Bayi!
00:31
Let's GLOW! Indonesian
Рет қаралды 15 МЛН
CMake, How it Works (At Three Different Levels)
4:36
Kea Sigma Delta
Рет қаралды 9 М.
Build and Install OpenCV With CUDA (GPU) Support on Windows 10
10:04
Установка opencv c++ vs22
8:11
Spajalica
Рет қаралды 10 М.
How to Setup OpenCV for C++ on Visual Studio Code (MacOS)
5:50
Elliotcodes
Рет қаралды 10 М.
100+ Linux Things you Need to Know
12:23
Fireship
Рет қаралды 619 М.
How is THIS Coding Assistant FREE?
5:19
Alex Ziskind
Рет қаралды 143 М.
Build and Install OpenCV 4 on Windows 10
7:51
Adam Hacks
Рет қаралды 43 М.
Installing and Configuring OpenCV for Visual Studio 2022
6:02
Hisense Official Flagship Store Hisense is the champion What is going on?
0:11
Special Effects Funny 44
Рет қаралды 2,8 МЛН
После ввода кода - протирайте панель
0:18
Up Your Brains
Рет қаралды 1,1 МЛН