-
Notifications
You must be signed in to change notification settings - Fork 54
/
histogtamdlg.h
88 lines (61 loc) · 2.02 KB
/
histogtamdlg.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#ifndef HISTOGTAMDLG_H
#define HISTOGTAMDLG_H
#include <QWidget>
#include <QList>
#include "math.h"
#include <opencv/cv.h>
#include <opencv2/opencv.hpp>
#include <opencv/highgui.h>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/core/core.hpp>
#include <QComboBox>
//#include "showhistogtamresult.h"
using namespace cv;
namespace Ui {
class HistogtamDlg;
}
class HistogtamDlg : public QWidget
{
Q_OBJECT
public:
explicit HistogtamDlg(QWidget *parent = 0);
~HistogtamDlg();
// void setPicture(Mat);
// void createHistogtam(Mat);
void refreshSenddata();
//修复消耗内存越来越卡的问题
void setHistogtam();//滑条函数,刷新直方图
void createHistogramGray();//创建直方图
QImage MatToQImage(const cv::Mat& mat);//mat转qimage
Mat globalMat;
Mat globalHistMat;
private:
Ui::HistogtamDlg *ui;
void closeEvent(QCloseEvent *event);
// void paintEvent(QPaintEvent *);
QList<QString> m_listVatiate_glob;//对应图像变量名字
QList<Mat> m_listMat_glob;//图像数据
Mat resultMat;
Mat result_Histogtam_Mat;
Mat source_Histogtam_Mat;
Mat source_gray_Mat;
int left_Threshold;
int right_Threshold;
signals:
void sendToShowhistogtam(Mat,int,int);
void hdSendDataMW(Mat,QString,QString,int,int); //给图元窗口发送信号,将Mat,图像变量名称,操作名称,行号,标记号发送给图元窗口
void hdSendStr(int,QString); //程序流程窗口,将操作函数文本发送给程序流程窗口
private slots:
void receiveDataForHistogtamdlg(QList<QString>,QList<Mat>);
// void Threshold_SetValue(int);
// void Threshold_SetValue2(int);
//////////////////////新定义
void setLeftValue();
void setRightValue();
void setHistogtamRe(int);//刷新直方图
void on_pushButton_clicked();
void on_show_pushButton_clicked();
void on_out_pushButton_clicked();
};
#endif //HISTOGTAMDLG_H