29 lines
774 B
C++
29 lines
774 B
C++
#ifndef __BASECLASS_H__
|
|||
|
|
#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
|
||
|
|
std::string paras; //传输数据
|
||
|
|
std::vector<cv::Mat> m_mat; //传输图片
|
||
|
|
std::string moduleName; //模块名称
|
||
|
|
public:
|
||
|
|
Base(){}
|
||
|
|
virtual ~Base(){}
|
||
|
|
virtual bool sendData(std::vector<cv::Mat>&,QByteArray&){return true;}
|
||
|
|
virtual bool reciveData(std::vector<cv::Mat>&,QByteArray&){return true;}
|
||
|
|
virtual bool initParas(QByteArray&){return true;}
|
||
|
|
virtual bool run() {return true;}
|
||
|
|
};
|
||
|
|
|
||
|
|
|
||
|
|
#endif
|