You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
101 lines
1.5 KiB
101 lines
1.5 KiB
#ifndef TWOPOINT_H |
|
#define TWOPOINT_H |
|
|
|
#include <QObject> |
|
#include <QThread> |
|
#include <opencv2/opencv.hpp> |
|
|
|
|
|
#include <QMap> |
|
|
|
|
|
class twoPoint : public QObject |
|
{ |
|
Q_OBJECT |
|
public: |
|
explicit twoPoint(QObject *parent = nullptr); |
|
|
|
void addlow(cv::Mat img,int id); |
|
void addhigh(cv::Mat img, int id); |
|
void onepoint(cv::Mat img); |
|
void onepoint(); |
|
void calc(); |
|
void savek(); |
|
void saveb(); |
|
|
|
void savelow(); |
|
void savehigh(); |
|
|
|
void on(cv::Size s); |
|
void off(); |
|
|
|
|
|
void loaddata(); |
|
void setdim(int value); |
|
|
|
void savedata(); |
|
|
|
void dbon(); |
|
void dboff(); |
|
void setpara(double range); |
|
|
|
|
|
void saveData(cv::Mat ); |
|
void calcData(); |
|
void runData(cv::Mat ); |
|
|
|
void meanmat(cv::Mat); |
|
|
|
|
|
void save(); |
|
public slots: |
|
void slotprocimg(cv::Mat); |
|
signals: |
|
void signalsendimg(cv::Mat); |
|
|
|
|
|
|
|
private: |
|
cv::Mat lowtemp; |
|
cv::Mat hightemp; |
|
cv::Mat kmat; |
|
cv::Mat bmat; |
|
bool ready; |
|
QThread* thread; |
|
|
|
bool b_savelow; |
|
bool b_savehigh; |
|
int n_savelow; |
|
int n_savehigh; |
|
bool b_onepoint; |
|
|
|
int vardim; |
|
|
|
double base; |
|
int opnum; //opnum onepoint number |
|
|
|
int c; |
|
|
|
bool bdb; //bool deblind |
|
double dbrange; |
|
|
|
double high ,low , kmean; |
|
|
|
QMap<double,cv::Mat> datas; |
|
QMap<double,cv::Mat> rmpk; |
|
QMap<double,cv::Mat> rmpb; |
|
|
|
int stagecount; |
|
double* stages; |
|
double* kstages; |
|
double* bstages; |
|
|
|
|
|
cv::Mat msave; |
|
bool b_save; |
|
int n_save; |
|
|
|
|
|
}; |
|
|
|
#endif // TWOPOINT_H
|
|
|