Files

33 lines
942 B
C++
Raw Permalink Normal View History

2024-09-27 15:54:45 +08:00
#ifndef __BASECLASS_H__
2024-09-27 14:31:22 +08:00
#define __BASECLASS_H__
#include <iostream>
#include <QObject>
#include <QByteArray>
#include <opencv2/opencv.hpp>
#include <opencv2/core.hpp>
#include <opencv2/imgproc.hpp>
class Base :public QObject
{
Q_OBJECT
public:
bool init_flag; //是否初始化,false,true
bool status = true; //相机状态(判断相机是否断开连接)
std::string paras; //传输数据
std::vector<cv::Mat> m_mat; //传输图片
2024-09-27 15:54:45 +08:00
std::string moduleName = ""; //模块名称
2024-09-27 14:31:22 +08:00
public:
2024-09-27 15:54:45 +08:00
Base() {}
virtual ~Base() {}
virtual bool readData(std::vector<cv::Mat>&, QByteArray&) { return true; }
virtual bool writeData(std::vector<cv::Mat>&, QByteArray&) { return true; }
virtual bool initParas(QByteArray&) { return true; }
virtual bool run() { return true; }
2024-09-27 14:31:22 +08:00
virtual bool checkStatus() { return true; }
2024-09-27 15:54:45 +08:00
2024-09-27 14:31:22 +08:00
};
#endif