How to set up OpenCV - C++ library on Windows | VSCode

Ғылым және технология

In this video, I show how to set up OpenCV - C++ library on Windows. This video helps you if you want to start a Computer-Vision journey with OpenCV in C++ programming language.
This video is the basis of my future videos about Computer-Vision projects.

Пікірлер: 50

  • @cyproxtten1415
    @cyproxtten14159 ай бұрын

    spent 12 hours trying to do what wou explained in 5 minutes, i genuinely love you

  • @elizavetaterente2127

    @elizavetaterente2127

    7 ай бұрын

    good to know that im not alone with the same result:)

  • @FlekkaBoyz

    @FlekkaBoyz

    4 ай бұрын

    @@elizavetaterente2127 good to know that im not alone with the same result.... why is it fkin unique for every god damn pc 8 hours in and still error...

  • @AyushSingh-fu1yp

    @AyushSingh-fu1yp

    3 ай бұрын

    what command does he type at 4:25 which gets the output

  • @CakeprogressS

    @CakeprogressS

    2 ай бұрын

    @@AyushSingh-fu1yp have you figured it out?

  • @AyushSingh-fu1yp

    @AyushSingh-fu1yp

    2 ай бұрын

    unfortunately, no @@CakeprogressS

  • @yannseanofficial2047
    @yannseanofficial20473 ай бұрын

    Literally spent hours trying to do what you just did... you just gained a follower.

  • @AyushSingh-fu1yp

    @AyushSingh-fu1yp

    3 ай бұрын

    what command does he type at 4:25 which gets the output

  • @avdiiseni8186

    @avdiiseni8186

    2 ай бұрын

    @@AyushSingh-fu1yp CTRL + SHIFT + P

  • @gutoguto0873
    @gutoguto08739 ай бұрын

    Great video, helped me troubleshoot problems.

  • @AyushSingh-fu1yp

    @AyushSingh-fu1yp

    3 ай бұрын

    what command does he type at 4:25 which gets the output

  • @gutoguto0873

    @gutoguto0873

    3 ай бұрын

    He did not type anything@@AyushSingh-fu1yp

  • @PLM_98
    @PLM_98 Жыл бұрын

    That's amazing

  • @Ht-60
    @Ht-6010 ай бұрын

    FINALLY SOMEONE WHO DOES NOT WASTE 50 MINUTES OF MY STUPID LIFE ❤

  • @Thebromonster7
    @Thebromonster78 ай бұрын

    Can you run OpenCv with c++17? I've only found tutorials using an x86 build

  • @duduken20
    @duduken204 ай бұрын

    Thank you so much!

  • @AyushSingh-fu1yp

    @AyushSingh-fu1yp

    3 ай бұрын

    what command does he type at 4:25 which gets the output

  • @duduken20

    @duduken20

    3 ай бұрын

    @@AyushSingh-fu1ypdon't know the shortcut but he's invoking the build option, save the cmake script and click on the build option down.

  • @joeywang2024
    @joeywang2024Ай бұрын

    thanks you

  • @miathresh7641
    @miathresh76416 ай бұрын

    When I run file face_train.py, i have an error that "Unknown C++ exception from OpenCV code", how can I fix it???

  • @yyu4505
    @yyu45053 ай бұрын

    thank you for your teaching ,i have a question, if i have no visual studio on my pc,this method seems useless.But we use vs during this teaching , why not set up opencv c++ on vs directly?

  • @MohamadhasanM

    @MohamadhasanM

    3 ай бұрын

    Thank you for watching, mentioning that you should have VS on you windows is not necessarily correct and I apologized for that, but at the end of the day you need a compiler (say MinGW-gcc). I am preparing a video about this and will update it soon, but meanwhile you can search for installing gcc on windows instead of VS. Hope this helps.

  • @yyu4505

    @yyu4505

    3 ай бұрын

    Thank you, and looking forward to your new video.i used to set up opencv c++ on vs, but i find that vs is two big and code writen on vs can not run directly on another platform like ubuntu, so, i give up using vs.i wonder, what is the difference when we use MinGW or vs?@@MohamadhasanM

  • @apoorvsharma6932
    @apoorvsharma69326 ай бұрын

    fatal error: opencv2/opencv.hpp: No such file or directory

  • @fengsuave8732

    @fengsuave8732

    6 ай бұрын

    Did you manage to solve it? I'm having the same thing.

  • @suryavaraprasadalla8511
    @suryavaraprasadalla851111 ай бұрын

    system variables has to be changed instead of user variables

  • @cuocsongmuonmau9631
    @cuocsongmuonmau96312 ай бұрын

    I have an error. Thanks u alots but it set OpenCV_FOUND to FALSE so package "OpenCV" is considered to be NOTFOUND

  • @green_lucozade

    @green_lucozade

    2 ай бұрын

    i have the same problem, did you sort it out yet?

  • @AyushSingh-fu1yp
    @AyushSingh-fu1yp3 ай бұрын

    what command does he type at 4:25 which gets the output

  • @MohamadhasanM

    @MohamadhasanM

    3 ай бұрын

    If you install CMake tool extension in VSCode, when you save your CMakeLists.txt file, it will configure your project automatically. In short, I just saved the file.

  • @AyushSingh-fu1yp

    @AyushSingh-fu1yp

    2 ай бұрын

    @cakeprogressS this might help

  • @bibekjoshivlogs5100
    @bibekjoshivlogs51005 ай бұрын

    how to add its extra modules using vs code only? i am stuck at this

  • @MohamadhasanM

    @MohamadhasanM

    5 ай бұрын

    In this case I guess you have to build opencv in window instead of downloading it's pre-built libraries. You can specify extra module path in your build options.

  • @lahoribot9238
    @lahoribot92386 ай бұрын

    not working for me showing error in CMakelist.txt "find_package(OpenCVConfig REQUIRED)"

  • @MohamadhasanM

    @MohamadhasanM

    6 ай бұрын

    The name of package that cmake should find is OpenCV. Try find_package(OpenCV REQUIRED)

  • @mert1354

    @mert1354

    4 ай бұрын

    I try this but I cant solve my problem right now how can ı solve this problem bro I need help@@MohamadhasanM

  • @Phantom-el6oe
    @Phantom-el6oe9 ай бұрын

    Cmake file throws error at find_package

  • @MohamadhasanM

    @MohamadhasanM

    9 ай бұрын

    try deleting generated build folder and use a compiler for another architecture (like x86, x64). let me know if it works.

  • @Phantom-el6oe

    @Phantom-el6oe

    9 ай бұрын

    @@MohamadhasanM It turned out that OpenCV has builds only up to MSVC v17 while I heave v19

  • @Phantom-el6oe

    @Phantom-el6oe

    9 ай бұрын

    @@MohamadhasanM Update: I've been messing around and managed to get CMakeList not error out, but main.cpp still can't include opencv2

  • @Phantom-el6oe

    @Phantom-el6oe

    9 ай бұрын

    @@MohamadhasanM Update2: There is something wrong with cmake file included in OpenCV, I just compiled your code via command line and everything worked fine Here is command line solution: g++ -o main main.cpp -IC:/opencv/build/include -LC:/opencv/build/x64/vc16/lib

  • @MohamadhasanM

    @MohamadhasanM

    9 ай бұрын

    Check the syntax maybe? Especially this line: target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS})

  • @nguyengiorno9026
    @nguyengiorno902611 ай бұрын

    help me bro

  • @NobodyScripts
    @NobodyScripts8 ай бұрын

    ERRORS: this declaration has no storage class or type specifier, identifier "VERSION" is undefined, expected a ")", expected a ";". Code: cmake_minimum_required(VERSION 3.10) project(medirdistancia) set(OpenCV_DIR C:/opencv/build) find_package(OpenCV REQUIRED) add_executable(${PROJECT_NAME} SRC/main.cpp) target_link_libraries(${PROJECT_NAME} ${OpenCV_LIBS})

  • @nguyengiorno9026
    @nguyengiorno902611 ай бұрын

    hwlp me * Executing task: C:\MinGW\bin\g++.exe Main.cpp -o c:\Users\cortx\Downloads\obj\src\output\Main.exe -Wall -Wextra -g3 Main.cpp:2:30: fatal error: opencv2/opencv.hpp: No such file or directory #include ^ compilation terminated. * The terminal process "C:\MinGW\bin\g++.exe 'Main.cpp', '-o', 'c:\Users\cortx\Downloads\obj\src\output\Main.exe', '-Wall', '-Wextra', '-g3'" terminated with exit code: 1. * Terminal will be reused by tasks, press any key to close it. why????

  • @nguyengiorno9026

    @nguyengiorno9026

    11 ай бұрын

    i do exaclty like you did

  • @MohamadhasanM

    @MohamadhasanM

    11 ай бұрын

    Email me your CMakeLists.txt and Main.cpp codes and let me see if I can find the problem. mh.mokhtarabadi@gmail.com

  • @phuho6583

    @phuho6583

    3 ай бұрын

    did u sovle it? i need help

Келесі