OpenCV C++ and Microsoft Visual Studio: A Complete Tutorial on Installation and Usage for Beginners

แชร์
ฝัง

ความคิดเห็น • 101

  • @NicolaiAI
    @NicolaiAI  ปีที่แล้ว +1

    Join My AI Career Program
    👉 www.nicolai-nielsen.com/aicareer
    Enroll in My School and Technical Courses
    👉 www.nicos-school.com

  • @kemon-q6c
    @kemon-q6c 11 หลายเดือนก่อน +4

    I tried many tutorials and yours is the best and most simple. Thank you so much Nicolai!

    • @NicolaiAI
      @NicolaiAI  11 หลายเดือนก่อน

      Thanks a lot man! Really appreciate it

  • @behrampatel4872
    @behrampatel4872 4 หลายเดือนก่อน +1

    Thanks .
    This one is so much easier then the vs-code one.

  • @andreasettimi4477
    @andreasettimi4477 3 ปีที่แล้ว +4

    Amazing as always, thanks for your video! People are often scared (me included) by the set-up in using C++, this is why we need videos such as this one: simple but clear to help entry level coders in C++. It would be very nice to level it up later and see the compilation from source with submodules (e.g. like ArUco which is not included in the "vanilla" installation of OpenCV). But again, thanks for sharing!

    • @NicolaiAI
      @NicolaiAI  3 ปีที่แล้ว

      Thank you very much for the kind words! Really appreciate it :)

  • @submaryne3518
    @submaryne3518 ปีที่แล้ว +1

    ty bro u have no idea how much this helped

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว

      Thanks for watching! Glad it helped

  • @giada6242
    @giada6242 2 ปีที่แล้ว +7

    Amazing video!
    I've only a question. My version of opencv is 4.5.5, so 06:44 i wrote "opencv_world455d.lib", but it gives an error:
    "LNK1104 - unable to open file 'opencv_world455d.lib' ". Why? what should I do?
    Thank you very much!

    • @pranavgupta4038
      @pranavgupta4038 2 ปีที่แล้ว

      try 450

    • @fuuuiii60
      @fuuuiii60 2 ปีที่แล้ว

      just try restart your computer, 455 should work

  • @kitf1sto
    @kitf1sto 2 ปีที่แล้ว +2

    Thank you so much finally worked perfectly

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว

      Great to hear man! Thanks for watching

  • @koh8614
    @koh8614 4 ปีที่แล้ว +5

    Really useful for anyone starting with OpenCV. I struggled with different guides to make it right. I also had a problem when I hovered over a function and Visual Studio froze because of the large commentary of it. You had to delete the comments to Mat to make it work.

    • @NicolaiAI
      @NicolaiAI  4 ปีที่แล้ว

      Thank you! Glad that it helped u 🙂

  • @mbrenneman0411
    @mbrenneman0411 ปีที่แล้ว +1

    awesome tutorial! thanks so much for the easy to follow instructions. worked first try

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว +1

      Thanks a lot man! Appreciate it and glad that it still worked. One of my older videos now

    • @mbrenneman0411
      @mbrenneman0411 ปีที่แล้ว

      @@NicolaiAI the only thing that was weird was if i open the environment variables from the search on the start menu, it doesnt let me edit my system paths. but a quick google and found that if you open environment variables from the system settings in the control panel it lets me edit the system paths

  • @xxeainxx
    @xxeainxx 2 ปีที่แล้ว +2

    thank you for amazing lecture! I really appreciate itXXD

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว

      Thanks a lot for watching! Glad that u liked it

  • @randomuser-vs3oe
    @randomuser-vs3oe 2 ปีที่แล้ว +1

    this video helped me a lot! thank you!

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว +1

      Thanks for watching! Glad that it could help u

  • @mailoisback
    @mailoisback 3 ปีที่แล้ว +2

    Make sure that in the Properties page you have set *Platform* to "All Platforms" or x64. I had it as WIn32 by default and it didn't work.

  • @dharanimohan2849
    @dharanimohan2849 2 ปีที่แล้ว +1

    Thanks for this tutorial.
    Can you make a tutorial about how to import an image to opencv from url using curl .

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว

      Thanks for watching! I’ll look into that

  • @stephen1836
    @stephen1836 2 ปีที่แล้ว

    This didn't work until I also added the file path "C:\opencv\build\include" to (Additional Include Directories) under the C/C++ options. Almost everything was loading in before that but the INTER_NEAREST callout.
    6-2022

  • @soreachsina1472
    @soreachsina1472 3 ปีที่แล้ว +1

    i followed all the steps carefully and managed to run the test program without any errors, however the image window didnt show up

    • @NicolaiAI
      @NicolaiAI  3 ปีที่แล้ว

      Make sure the path is correct

  • @ahmadooof
    @ahmadooof ปีที่แล้ว

    I had annoying issue to let it work, the problem was that I link both libraries in linker of vs, instead link just the one with the 'd' for debugging.

  • @rohitavadhani6995
    @rohitavadhani6995 ปีที่แล้ว +1

    would it be the same for opencv contrib ?

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว

      Yeah I have a mother video aswell where we build opencv with everything purse

  • @איתילוי-ק8ת
    @איתילוי-ק8ת ปีที่แล้ว +1

    thank you very much :)

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว

      Awesome man! Thanks for watching

  • @Windeycastle
    @Windeycastle 2 ปีที่แล้ว +1

    Thank you for the tutorial. It feels like this is way too complicated for what it should be, but at least you guided me succesfully through it!
    I have one question though, for now it is specified in debug mode, but could I just add the file without the d for the compiler (so have both files there) and have it work for release and debug?
    Sounds too easy to be true though

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว

      This is unfortunately the process for visual studio and linking different libraries. I have tutorials in vs code as well where I use cmake which is much easier

    • @serdaronurkaradag
      @serdaronurkaradag ปีที่แล้ว

      i change opencv_world420d.lib to opencv_world470d.lib(because i download 4.7 latest verison) but i got an error cant find file.

  • @Sekiraw-42069
    @Sekiraw-42069 2 ปีที่แล้ว +1

    When I go to the opencv's github it has really different folders now, can someone send a link to get the version of openv what he is using please?

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว

      I think I'm on 4.5.2

  • @GabrielTao2712
    @GabrielTao2712 ปีที่แล้ว +1

    Hi, how i can add the xfeatures2d library?

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว +1

      Its the contrib module. I have a video with gpu support with OpenCV and how u Can build from source with cmake and contrib module

    • @GabrielTao2712
      @GabrielTao2712 ปีที่แล้ว

      @@NicolaiAI thanks! It' s also possible configure vs to create a project with the opencv library automatically? I mean without set the VC++ Directories every time?

  • @CreetEnemyDK
    @CreetEnemyDK 5 หลายเดือนก่อน

    it work thank you

  • @maryiaparniuk8123
    @maryiaparniuk8123 หลายเดือนก่อน +1

    thanks!

    • @NicolaiAI
      @NicolaiAI  หลายเดือนก่อน

      Welcome!

  • @romanteev8731
    @romanteev8731 3 ปีที่แล้ว

    Is it possible to create a window constructor file, with OpenCV?

  • @unamattina6023
    @unamattina6023 ปีที่แล้ว

    why these settings changing for every new project that I am creating? I would like to keep these settings for every project hpw I can do this?

  • @AslamFarooqShaik-dk4hw
    @AslamFarooqShaik-dk4hw ปีที่แล้ว

    The code is leading me to the... Unresolved external error near the the cv methods / functions calls
    . Which is related to the. LNK 2019 ... errors..

  • @datasagedev
    @datasagedev 2 ปีที่แล้ว +7

    Please provide the appropriate link to the code sample. Your link just takes everyone to your GitHub with no direction as to what repo it is stashed into. Thanks for the video Nicolai I appreciate you. Feel free to remove this if you think it's needed. No hurt feelings. ; )

  • @lesptitsoiseaux
    @lesptitsoiseaux 3 ปีที่แล้ว +1

    Hey there, just a quick note that got me stumbling for a moment... on my just installed VS2019, I had to change my configuration to x64 as somehow the default was win32. Once I got that changed, all was well.

    • @NicolaiAI
      @NicolaiAI  3 ปีที่แล้ว

      Yes opencv only works with x64, which is often the configuration that causes the errors. Glad that you figured it out!

    • @johnnymurf
      @johnnymurf 3 ปีที่แล้ว

      @@NicolaiAI I'm using the latest release 4.5.1 and it will only work with x86. Do you know why? Also thanks for the great tutorials.

    • @NicolaiAI
      @NicolaiAI  3 ปีที่แล้ว +1

      @@johnnymurf didnt actually know that they upgraded it to x86 in the latest update, thank you! That should only good thing, but if u need x64 u can just download a earlier version

    • @johnnymurf
      @johnnymurf 3 ปีที่แล้ว

      @@NicolaiAI ah right I thought it would be an issue as x86 is older no?

    • @johnnymurf
      @johnnymurf 3 ปีที่แล้ว

      @@NicolaiAI OK thanks very much. I'll switch to 4.2.0 to avoid any difference headaches but out of curiosity why do newer one use x86 which is 32 bit instead x64 which is 64 bit? Or have I got them mixed up?

  • @justiren6769
    @justiren6769 ปีที่แล้ว

    Where is the example code? can't find it in your github link

  • @ankitrawat666
    @ankitrawat666 3 ปีที่แล้ว +1

    my visual code has different interference i can't follow along. Can you tell me which version are you using??

    • @NicolaiAI
      @NicolaiAI  3 ปีที่แล้ว +1

      I am not using visual code but visual studio. In visual code u would need to use something like c make and compile it urself. I have linked a guide on the discord server

    • @NicolaiAI
      @NicolaiAI  3 ปีที่แล้ว +1

      I should definitely make a video in visual code aswell! I'm on that

    • @ankitrawat666
      @ankitrawat666 3 ปีที่แล้ว

      @@NicolaiAI okay... I get it now 😅

    • @ankitrawat666
      @ankitrawat666 3 ปีที่แล้ว +1

      @@NicolaiAI thanks a lot

  • @babydriver8363
    @babydriver8363 11 หลายเดือนก่อน

    If I would like to create new project then I need to repeat same step every time..? If No then how to make it global?

  • @johnmichaelconarco8006
    @johnmichaelconarco8006 10 หลายเดือนก่อน

    is this working on c#?

  • @ItsNotAllRainbows_and_Unicorns
    @ItsNotAllRainbows_and_Unicorns ปีที่แล้ว +1

    Anyone who still has trouble, don't forget to change x86 to x64 under the solutions configuration.

    • @NicolaiAI
      @NicolaiAI  ปีที่แล้ว +1

      Awesome! Thanks for watching

  • @redplus43
    @redplus43 3 ปีที่แล้ว +1

    is there anyway to get opencv working for x86?

    • @NicolaiAI
      @NicolaiAI  3 ปีที่แล้ว

      Someone mentioned that the newest versions works with x86 aswell but im not sure. Or else u will have to build the library from source. I'll add this guide for installation: docs.opencv.org/master/d3/d52/tutorial_windows_install.html

  • @ericbighead8953
    @ericbighead8953 3 ปีที่แล้ว +1

    What is the most efficient way to use openCV via C# in VS 2019?

    • @sjitcordite
      @sjitcordite 2 ปีที่แล้ว

      please let me know if you've found out, I'm searching for the same (for VS22).

  • @Anime-x228z
    @Anime-x228z 4 ปีที่แล้ว +1

    Thank you!

    • @NicolaiAI
      @NicolaiAI  4 ปีที่แล้ว

      You are welcome!🙂

  • @jesusperdomo8388
    @jesusperdomo8388 3 ปีที่แล้ว +1

    works the same way for python?

    • @NicolaiAI
      @NicolaiAI  3 ปีที่แล้ว

      Nope In python u can just pip install opencv and then import it in code as a module. The setup in python is way easier and is also the same for all IDEs

  • @mareknovak2144
    @mareknovak2144 ปีที่แล้ว

    Why Visual studio? Has same benefits?

  • @seranganalambaka7354
    @seranganalambaka7354 6 หลายเดือนก่อน

    im sooo Cooked, i follow more than 5 tutorials and still got eror "cant open source file opencv"
    god help me T_T

    • @seranganalambaka7354
      @seranganalambaka7354 6 หลายเดือนก่อน

      im soo stupid
      im on release mode, but I set for only debug. dumbasshell T_T

  • @indianmeteorologyearthquak5233
    @indianmeteorologyearthquak5233 2 ปีที่แล้ว

    unable to open the file onecore.lib

  • @unamattina6023
    @unamattina6023 ปีที่แล้ว

    where is the code you said writtwn in desc?

    • @unamattina6023
      @unamattina6023 ปีที่แล้ว

      here is the include code:
      #include
      #include
      #include
      #include

  • @alinatik35
    @alinatik35 3 ปีที่แล้ว +1

    thank u so much

    • @NicolaiAI
      @NicolaiAI  3 ปีที่แล้ว

      Thanks for watching! Glad that i could help

    • @alinatik35
      @alinatik35 3 ปีที่แล้ว +1

      @@NicolaiAI
      That was absolutely useful, my program doesn't work until I saw your video 🌹👌

    • @NicolaiAI
      @NicolaiAI  3 ปีที่แล้ว

      So nice! Happy coding 💪

  • @JesseJohnGagnon
    @JesseJohnGagnon 2 ปีที่แล้ว +1

    WARNING! This is only for the DEBUG version which is much much SLOWER than the release version.
    This video shows how to set up the release version: th-cam.com/video/unSce_GPwto/w-d-xo.html

  • @malin7806
    @malin7806 ปีที่แล้ว

    bro u didnt link anything

  • @lblockst
    @lblockst 2 ปีที่แล้ว +3

    A. The version of the dll file (he talks about it around 7 minutes) may be different, in my case it was opencv_world460d.lib. Go to C:\opencv\build\x64\vc15\lib and check.
    B. This tutorial still did not work for me until I've added "C:\opencv\build\x64\vc15\lib" and "C:\opencv\build\x64\vc15\bin" to Properties=>Linker=>General=>Additional Library Directories
    C. Adding additional directories requires restart visual studio before it takes.
    Good luck.

    • @Hugohabor7799
      @Hugohabor7799 ปีที่แล้ว

      Sorry, I have a guess to your setup process.
      Did you use the CMAKE to generate a whole vcxproj
      And Build the "ALL BUILD." Porject first?
      I can not build the "ALL BUILD" sucessfully.

    • @nivispluma5368
      @nivispluma5368 ปีที่แล้ว +1

      you are my man, thank you

    • @eggman2543
      @eggman2543 ปีที่แล้ว

      Thanks

  • @hohaiang7795
    @hohaiang7795 3 ปีที่แล้ว +1

    Thank you so much.

    • @NicolaiAI
      @NicolaiAI  3 ปีที่แล้ว

      Thanks for watching! Glad that i could help

  • @warlock4956
    @warlock4956 2 ปีที่แล้ว +1

    Thanks a lot!!!

    • @NicolaiAI
      @NicolaiAI  2 ปีที่แล้ว

      Thanks for watching! Great that it could help u

  • @robertojosuerodriguezurqui2177
    @robertojosuerodriguezurqui2177 3 ปีที่แล้ว

    Thanks a lot!