代码拉取完成,页面将自动刷新
#ifndef LOCALCAMERA_H
#define LOCALCAMERA_H
#include <QObject>
#include <QDebug>
#include <QTimer>
#include <QImage>
#include <QFile>
//#include <opencv4/opencv2/highgui/highgui.hpp>
//#include <opencv4/opencv2/imgproc/imgproc.hpp>
//#include <opencv4/opencv2/core/core.hpp>
//#include <opencv4/opencv2/videoio.hpp>
#include "common.h"
#include <QDateTime>
using namespace cv;
using namespace std;
#define LOCAL_FRAME_FRQ (10)
#define LOCAL_CAMERA_TIMEOUT (1000/LOCAL_FRAME_FRQ)
class LocalCamera : public QObject
{
Q_OBJECT
public:
static LocalCamera* GetInstance();
~LocalCamera();
bool OpenCamera();
void CloseCamera();
bool IsOpened();
bool Capture(cv::Mat &);
signals:
void CameraFrameRefresh(QImage);
void CameraFrameRefresh(cv::Mat);
private slots:
void FrameRefresh();
private:
LocalCamera();
static LocalCamera* m_LocalCamera;
cv::VideoCapture m_cap;
QTimer *m_Timer;
int32_t m_UserCnt;
};
#include "datadictionary.h"
class LocalCameraCapture : public QObject
{
Q_OBJECT
public:
LocalCameraCapture();
public slots:
void MisDataChange(MisDataIndex_t Index);
private:
LocalCamera *m_LocalCamera;
DataDictionary *m_DataDictionary;
};
#endif // LOCALCAMERA_H
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。