-
Notifications
You must be signed in to change notification settings - Fork 88
/
mainwindow.h
154 lines (100 loc) · 3.75 KB
/
mainwindow.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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QLabel>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <QTimer>
#include <QImage>
#include <QMessageBox>
using namespace cv;
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
void showascii();
QImage gray(QImage image);//灰度化
QImage gray2(QImage image);//灰度化2
QImage setRGB(QImage image,int value_r,int value_g,int value_b);//调整rgb
QImage AdjustContrast(QImage image, int value);//调整对比度
QImage ImageCenter(QImage qimage,QLabel *qLabel);//调整图片比例
QImage AdjustSaturation(QImage image, int value);//调整饱和度
QImage bianyuan(QImage image);//边缘
Mat masaike(Mat image);//马赛克
QStringList srcDirPathList;//图片list
int index =0;//图片index
int type=0;//视频操作类型
QImage MatToQImage(const cv::Mat& mat);
QString stom(int s);
QImage junzhi(QImage image);
QImage fuhe(QImage images);
QImage gamma(QImage image);
private slots:
void on_action_Dock_triggered();
void on_action_Open_triggered();
void on_pushButton_clicked();
//void onBtnClicked();
void onTimeout();
//void on_pushButton_2_clicked();
void updatePosition();
void on_action_Save_triggered();
//void on_pushButton_choose_clicked();
void on_pushButton_gray_clicked();
void on_pushButton_junzhi_clicked();
void on_action_L_triggered();
void on_horizontalSlider_valueChanged(int value);
void on_pushButton_junzhi_2_clicked();
void on_pushButton_junzhi_3_clicked();
void on_horizontalSlider_2_valueChanged(int value);
void on_pushButton_save_clicked();
//void on_pushButton_left_clicked();
void on_horizontalSlider_R_valueChanged(int value);
void on_pushButton_3_clicked();
void on_pushButton_4_clicked();
void on_pushButton_origin_clicked();
void on_horizontalSlider_G_valueChanged(int value);
void on_horizontalSlider_B_valueChanged(int value);
void on_pushButton_gamma_clicked();
void on_horizontalSlider_erzhi_valueChanged(int value);
void on_horizontalSlider_duibi_valueChanged(int value);
void on_horizontalSlider_baohe_valueChanged(int value);
void on_action_V_triggered();
void on_pushButton_6_clicked();
void on_pushButton_7_clicked();
void on_pushButton_8_clicked();
void on_VideohorizontalSlider_2_valueChanged(int value);
void on_pushButton_9_clicked();
void on_pushButton_10_clicked();
void on_pushButton_11_clicked();
void on_horizontalSlider_suofang_valueChanged(int value);
void on_pushButton_2_clicked();
void on_action_H_triggered();
void on_action_J_triggered();
void on_action_B_triggered();
void on_action_G_triggered();
void on_action_Y_triggered();
void on_action_About_triggered();
void on_pushButton_turnleft_clicked();
void on_pushButton_turnright_clicked();
void on_pushButton_turnleft_2_clicked();
void on_pushButton_turnleft_3_clicked();
void on_pushButton_5_clicked();
private:
Ui::MainWindow *ui;
bool language=true;
bool isstart=false;
QString origin_path;//目前处理的图片的原图
QString videoSrcDir;//视频路径
VideoCapture capture; //用来读取视频结构
QTimer timer;//视频播放的定时器
int beishu;//调节播放速率
int delay;//帧延迟时间
QMessageBox customMsgBox;
};
#endif // MAINWINDOW_H