openCV & Qt
-
Good morning and excuse me for this question.
I would like to use openCV in Qt.
I have tried several solutions but I cannot use these libraries in my project.
I state that the current situation is as follows:- Windows 10 64bit
- Qt creator 4.11.0
- openCV libraries ver. 3.49 installed from a precompiled package distributed by the official openCV website.
How can I correctly configure openCV to be able to use it?
I thank all those who will help me in advance.
-
Good morning and excuse me for this question.
I would like to use openCV in Qt.
I have tried several solutions but I cannot use these libraries in my project.
I state that the current situation is as follows:- Windows 10 64bit
- Qt creator 4.11.0
- openCV libraries ver. 3.49 installed from a precompiled package distributed by the official openCV website.
How can I correctly configure openCV to be able to use it?
I thank all those who will help me in advance.
What do you have so far? Any errors? Is OCV installed properly?
If this is the case, you need to set your lib-paths in your .pro file
INCLUDEPATH += OCV-PATH-HERE LIBS += OCV-LIBS HERE (Path to .dll's)
Then you need to include the OCV files in your headers or code files
e.g.:
#include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp>
-
Good morning and excuse me for this question.
I would like to use openCV in Qt.
I have tried several solutions but I cannot use these libraries in my project.
I state that the current situation is as follows:- Windows 10 64bit
- Qt creator 4.11.0
- openCV libraries ver. 3.49 installed from a precompiled package distributed by the official openCV website.
How can I correctly configure openCV to be able to use it?
I thank all those who will help me in advance.
@TizUbuntu have you check this article?
BTW, is there a compelling need to use OpenCV 3.x?
Release 4.20 is available as of now -
Hello guys. I'm having trouble adding OPENCV to qt cretor. I added OpenCV by specifying its paths from the AddLibrary tab, but when I want to use it in my project, I get the following errors:
- error: cannot find -lopencv_world4100
- error: collect2.exe: error: ld returned 1 exit status
- error: [Makefile.Debug:72: debug/YOLO.exe] Error 1
I copied the dll file directly to the project file. I will be grateful if you could help me.
-
@abdrrhm Hi!,
I think it would be a good idea to consider compiling OpenCV from sources, then the library will match the compiler.I recommend seeing this example on GitHub(https://github.com/FelgoSDK/Qt-Felgo-OpenCV). You can also warp
CMakeLists.txt
and you will see how OpenCV is added depending on the selected compiler. -
Hello guys. I'm having trouble adding OPENCV to qt cretor. I added OpenCV by specifying its paths from the AddLibrary tab, but when I want to use it in my project, I get the following errors:
- error: cannot find -lopencv_world4100
- error: collect2.exe: error: ld returned 1 exit status
- error: [Makefile.Debug:72: debug/YOLO.exe] Error 1
I copied the dll file directly to the project file. I will be grateful if you could help me.
@abdrrhm said in openCV & Qt:
I copied the dll file directly to the project file
Did you also specify the folder where the linker should search for the lib using -L parameter? You should show your pro or CMakeLists.txt file.
On which platform are you?