OpenCV-CPP-show-webcam-stream-on-Qt-GUI
OpenCV-CPP-show-webcam-stream-on-Qt-GUI copied to clipboard
[Facing issue while Testing....]
Hi @eyyupT Thanks for sharing your this application. I am working on the similar application development, so I am going through your post. Since I am new to Qt, I need your help to run this application on my environment. I have installed QtCreator4.15.0 (based on Qt5.15.2) on windows10 with opencv set up in C://opencv. Also I changed the path to opencv as C:// instead of G;//. Please suggest. Thanks.
Here is the .pro file I am referring to....
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = opencv_cpp_show_webcam_stream_on_Qt_GUI TEMPLATE = app
The following define makes your compiler emit warnings if you use
any feature of Qt which as been marked as deprecated (the exact warnings
depend on your compiler). Please consult the documentation of the
deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
You can also make your code fail to compile if you use deprecated APIs.
In order to do so, uncomment the following line.
You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
SOURCES += main.cpp
mainwindow.cpp
HEADERS += mainwindow.h
FORMS += mainwindow.ui
INCLUDEPATH += C:\opencv\build\include
INCLUDEPATH += C:\opencv\build\include\opencv2 \
LIBS += -LC:\opencv\build\bin
LIBS += -LC:\opencv\build\bin\x64\vc15\bin
#LIBS += -LC:/opencv2/release/install/x86/mingw/bin\
#opencv_world420.lib
libopencv_calib3d310
libopencv_core310
libopencv_features2d310
libopencv_flann310
libopencv_highgui310
libopencv_imgcodecs310
libopencv_imgproc310
libopencv_ml310
libopencv_objdetect310
libopencv_photo310
libopencv_shape310
libopencv_stitching310
libopencv_superres310
libopencv_video310
libopencv_videoio310
libopencv_videostab310
you should update openCV libraries considering uploaded OpenCV version. I installed openCV 3.10 version and defined libraries as libopencv_core310. If you are using openCV 4.20 and then you should define libraries as libopencv_core420.
You can find openCV installation and integration with Qt from my blogs. http://eyyuptemlioglu.blogspot.com/ http://yapayzekalabs.blogspot.com/
Thank you @eyyupT fro your prompt reply. :) well, I tried that and corrected the path to .lib since opencv310, now includes a lib package as opencv_world310.lib. It runs partially but when I click on 'open webcam' it gives me this error, please suggest~
Best Regards,