1 #ifndef CVVIDEOCAPTURE_H 2 #define CVVIDEOCAPTURE_H 11 #include <opencv2/core/mat.hpp> 13 #include <opencv2/videoio.hpp> 14 #include "cvvideocapturelib.h" 23 void setDevice(
int device);
25 cv::Mat currentFrame()
const;
26 void setCurrentFrame(
const cv::Mat ¤tFrame);
28 QImage toImage(
const cv::Mat &m);
31 QPushButton *m_startButton;
32 QPushButton *m_stopButton;
36 QGridLayout *m_container;
38 QSpinBox *m_deviceSpinBox;
39 cv::VideoCapture m_capture;
40 cv::Mat m_currentFrame;
41 void createConnections();
44 virtual void captureFrame();
47 virtual void changeDevice(
int device);
49 void frameCaptured(cv::Mat frame);
52 void deviceChanged(
int device);