Qt Creator C ++ using WebCamera

I have been programming in QT with C ++ for about a year. I started my own GUI project and everything works fine up to this point. Now I want to add a parameter for shooting using my webcam, but I do not know what I should do.

I read everything about the OpenCV library, and I tried installing it, but I still don't get inclusion in QT. Is there an easier way to access my camera?

+4
source share
3 answers

If you use Qt 5, you can take a look at QCamera and see if it suits your needs, you can also look at the camera overview (and as far as I know, there is an example, a camera has been added, thanks Shf)

+2
source

You can easily use OpenCV with QT Creator, just add the path and libraries there.

here is my pro file template for OpenCV.

#begin{opencv} INCLUDEPATH += "C:\opencv\opencv\build\include" INCLUDEPATH += "C:\opencv\opencv\build\include\opencv" LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_calib3d231.lib LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_contrib231.lib LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_core231.lib LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_features2d231.lib LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_flann231.lib LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_gpu231.lib LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_haartraining_engine.lib LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_highgui231.lib LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_imgproc231.lib LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_legacy231.lib LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_ml231.lib LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_objdetect231.lib LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_ts231.lib LIBS += C:\opencv\opencv\build\x86\vc9\lib\opencv_video231.lib #end{opencv} 
+2
source

You can use Qt Media Encoding Library to capture images from a webcam and even to encode video from a webcam :)

Here: http://qt-project.org/forums/viewthread/29117/

+1
source

Source: https://habr.com/ru/post/1488144/


All Articles