Install OpenCV C++ on Windows ** Without Microsoft Visual Studio **

  Рет қаралды 5,768

Rafa Hernández

Rafa Hernández

Күн бұрын

Installation of OpenCV 4.5.0 on Windows without using Microsoft Visual Studio.
---------------------------------------------------------------------------------------------------------------------------
Download links:
OpenCV: opencv.org/rel...
CMake: cmake.org/down...
Mingw-w64: sourceforge.ne...
Visual Code: code.visualstu...
---------------------------------------------------------------------------------------------------------------------------
Build syntax:
**************
The number at the end of the DLL files has to match the OpenCV version:
OpenCV 𝟒.𝟓.𝟎 ---- libopencv_core𝟒𝟓𝟎
**************
g++ -o prueba prueba.cpp -IC:\opencv\build\include -LC:\opencv\build\lib -llibopencv_core450 -llibopencv_highgui450 -llibopencv_calib3d450 -llibopencv_core450 -llibopencv_dnn450 -llibopencv_features2d450 -llibopencv_flann450 -llibopencv_gapi450 -llibopencv_highgui450 -llibopencv_imgcodecs450 -llibopencv_imgproc450 -llibopencv_ml450 -llibopencv_objdetect450 -llibopencv_photo450 -llibopencv_stitching450 -llibopencv_video450 -llibopencv_videoio450
---------------------------------------------------------------------------------------------------------------------------

Пікірлер: 26
@funyssnight7791
@funyssnight7791 3 ай бұрын
Great job, without your video I wouldn't be able to run Opencv on C++ without Visual Studio
@yuz0_
@yuz0_ 11 ай бұрын
First of all, thank you, this is the best and easiest to follow tutorial on opencv. I have been able to compile some test projects without problems. I have some doubts: - The first time, I tried these steps with the latest version of opencv, 4.8.1, this didn't work. In the mingw32-make step, around 35%, it threw an error and stopped. I tried 4.8.0, 4.7.0, with the same results. - Finally, with the same version you use in the video this step, mingw32-make, ended up with a 100% error but I was able to install it, and, it is working. So far it's working fine but I'm worried that it might fail at any moment. I'm on W10, with MinGW 12.2.0, CMake 3.27.7, opencv 4.5.0 Thanks again
@rafa5636
@rafa5636 10 ай бұрын
Thanks for your comment and I am glad that the tutorial works for you 👌👌 After you post those doubts I decided to installed it again on a new windows 10 machine. I installed the last version of opencv: - Mingw-w64 (12.2.0 x86_64-posix-seh-rev2 - it's important that the MinGW supports posix threads) - CMake 3.27.7 - OpenCV 4.8.0. As you said it threw an error at around 35%: [ 35%] Building CXX object modules/videoio/CMakeFiles/opencv_videoio.dir/src/cap_obsensor/obsensor_uvc_stream_channel.cpp.obj I searched that error on google and I found this opencv forum ( forum.opencv.org/t/opencv-cmake-opencv-building-error/11566/11 ) which tell you to uncheck obsensor from the cmake configuration list (same as I do with OPENCV_ENABLE_ALLOCATOR_STATS). After doing that, it went up to 100% with no errors. Make sure to clean up the folders before you start again building the targets. Usually, when I got this kind of errors while it is building the targets I look for the first one and search it on google, most of the time is a value that you have to uncheck from the cmake configuration list. I hope this works for you. Regards
@yuz0_
@yuz0_ 10 ай бұрын
@@rafa5636 Wow, thank you very much again. Yes, I have the same version of MinGW. I'll try it as soon as I can. Thank you! ;)
@harisrafiq1717
@harisrafiq1717 29 күн бұрын
hey thanks for your video, its works for latest version opencv
@joel.garcia
@joel.garcia 3 жыл бұрын
Thanks bro!!! This video is really useful, I'm in a computer vision course and I had not been able to install it properly.
@rafa5636
@rafa5636 3 жыл бұрын
Thanks a lot for the comment, it really helps. It took me about a year to find the correct way to install it. Did you have any problem?
@joel.garcia
@joel.garcia 3 жыл бұрын
@@rafa5636 Wow, that's a long time. I got a *collect2.exe: error* when I tried to compile a test file, and after almost an hour looking for what was causing that error, then I found that there was a problem with the compile command, and it was because I just copied and pasted the command from the video description on my console, and I didn't realize that all my DLL files ended with "452" instead of "450" as shown in the video, but now everything is ok. Thanks again for saving me a lot of time!
@rafa5636
@rafa5636 3 жыл бұрын
@@joel.garcia Ok perfect, I write a message point this out
@andsoeeeee12
@andsoeeeee12 Жыл бұрын
thank you for the video! but i want to ask question: what is cmake for?
@rafa5636
@rafa5636 Жыл бұрын
Cmake is used to generate native build opencv files specific to the GCC compiler
@andsoeeeee12
@andsoeeeee12 Жыл бұрын
@@rafa5636 can i do that without cmake and just cmd + mingw?
@rafa5636
@rafa5636 Жыл бұрын
@@andsoeeeee12 In order to build the targets you need to create them first and for that you need cmake.
@user-ne3hz6kb8m
@user-ne3hz6kb8m 4 ай бұрын
Long live your hands
@rafa5636
@rafa5636 4 ай бұрын
Thanks! 😅
@urielgcoo7232
@urielgcoo7232 Жыл бұрын
I've been having a problem while running the mingw32-make line in the terminal. At some point it just stops building and throws a bunch of paths I don't understand.
@rafa5636
@rafa5636 Жыл бұрын
Hi, paste here the line of code that generates the first error
@urielgcoo7232
@urielgcoo7232 Жыл бұрын
@@rafa5636 It happens while running the mingw32-make command on the cmd
@rafa5636
@rafa5636 Жыл бұрын
@@urielgcoo7232 Yes I got it, but I need to know which dependencies are failing to give you a solution. It has to be the first error (first built target in red) that appear after you execute mingw32-make.
@prenomnom9214
@prenomnom9214 Ай бұрын
When I try to compile with the line in description it says that it couldnt find any of the -llib can you help please
@rafa5636
@rafa5636 Ай бұрын
@@prenomnom9214 you have to change the name of the libs with the actual version of your opencv
@prenomnom9214
@prenomnom9214 Ай бұрын
@@rafa5636 ohhh lol
@lopataspartabzg2345
@lopataspartabzg2345 Жыл бұрын
Im getting some weird errors at the mingw32-make step someting about some mutex thing. 😢 Ive been trying to install this for 2 weeks nearly
@rafa5636
@rafa5636 Жыл бұрын
Hi, which version of opencv are you installing? Could you copy and paste the exact error you are getting, please
@hectormanuelsantarelli3133
@hectormanuelsantarelli3133 Жыл бұрын
@@rafa5636 i think i am habing the same problem, when i run the mingw32-make command it load perfectly until the 3% where it says In file included from C:\Users\manue\Desktop\prog\librerias\opencv\sources\modules\core\src\precomp.hpp:53:0, from C:\Users\manue\Desktop\prog\librerias\opencv\sources\modules\core\src\algorithm.cpp:43: C:/Users/manue/Desktop/prog/librerias/opencv/sources/modules/core/include/opencv2/core/utility.hpp:718:14: error: 'recursive_mutex' in namespace 'std' does not name a type typedef std::recursive_mutex Mutex; ^~~~~~~~~~~~~~~ and a lot of other errors relateds with mutex. do you know how to help me? sorry for mi english, i am from argentina
@arturoisaacrossier3516
@arturoisaacrossier3516 4 ай бұрын
x2
OpenCV: Compiling from source and using compiled binaries
42:03
Parietal Vision
Рет қаралды 174
مسبح السرير #قصير
00:19
سكتشات وحركات
Рет қаралды 11 МЛН
小丑和白天使的比试。#天使 #小丑 #超人不会飞
00:51
超人不会飞
Рет қаралды 33 МЛН
大家都拉出了什么#小丑 #shorts
00:35
好人小丑
Рет қаралды 79 МЛН
Installation d'OpenCV C++ et Visual studio code sur Windows
23:15
Minteligencia
Рет қаралды 3,2 М.
Getting Started with CMake on Windows [Ep 1.2]
12:46
sudocpp
Рет қаралды 7 М.
Install OpenCV C++ on Windows with MinGW Compiler
26:16
Code Heroku
Рет қаралды 14 М.
Установка opencv c++ vs22
8:11
Spajalica
Рет қаралды 11 М.
مسبح السرير #قصير
00:19
سكتشات وحركات
Рет қаралды 11 МЛН