-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
172 lines (101 loc) · 4.25 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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QFileDialog>
#include "opencv2/opencv.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/nonfree/nonfree.hpp"
#include "QDebug"
#include "string.h"
#include "opencv2/nonfree/features2d.hpp"
#include "opencv2/features2d/features2d.hpp"
#include <QMessageBox>
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow
{
Q_OBJECT
public:
explicit MainWindow(QWidget *parent = 0);
~MainWindow();
private slots:
void MenuBarInit();
void show_Image(QImage* img);
void show_Image_2(QImage* img);
void on_action_Load_triggered();
void on_action_Convert2Gray_triggered();
void on_action_Binary_triggered();
void on_action_Homogeneous_Blur_triggered();
void on_action_Gaussian_Blur_triggered();
void on_action_Median_Blur_triggered();
void on_action_Bilateral_Blur_triggered();
void on_action_Dilation_triggered();
void on_action_Erosion_triggered();
void on_action_Opening_triggered();
void on_action_Closing_triggered();
void on_action_Morphological_Gradient_triggered();
void on_action_Top_Hat_triggered();
void on_action_Black_Hat_triggered();
void on_action_Discrete_Fourier_Transform_triggered();
void on_action_Sobel_triggered();
void on_action_Laplace_triggered();
void on_horizontalSlider_Canny_valueChanged(int value);
void on_action_Canny_triggered();
void on_okButton_Canny_clicked();
void on_action_Hough_Line_triggered();
void on_okButton_HoughLine_clicked();
void on_horizontalSlider_HoughLine_valueChanged(int value);
void on_action_Hough_Circle_triggered();
void on_okButton_HoughCircle_clicked();
void on_horizontalSlider_HougCircle_valueChanged(int value);
void on_action_Histogram_Equalization_triggered();
void on_action_Histogram_Calculation_triggered();
void on_action_Back_Projection_triggered();
void on_horizontalSlider_BackProjection_valueChanged(int bins);
void on_okButton_BackProjection_clicked();
void on_action_Finding_Contours_triggered();
void on_horizontalSlider_FindContours_valueChanged(int value);
void on_okButton_FindContours_clicked();
void on_action_Convex_Hull_triggered();
void on_okButton_Hull_clicked();
void on_horizontalSlider_Hull_valueChanged(int thresh);
void on_action_Creating_Bounding_For_Contours_triggered();
void on_okButton_CreatBounding_clicked();
void on_horizontalSlider_CreatBounding_valueChanged(int thresh);
void on_action_Image_Moments_triggered();
void on_okButton_Image_Moments_clicked();
void on_horizontalSlider_Image_Moments_valueChanged(int thresh);
void on_action_Point_Polygon_Test_triggered();
void on_action_Harris_corner_triggered();
void on_horizontalSlider_Harris_Corners_valueChanged(int thresh);
void on_okButton_Harris_Corners_clicked();
void on_action_Shi_Tomasi_corner_triggered();
void on_horizontalSlider_ShiTomasi_Corners_valueChanged(int maxCorners);
void on_okButton_ShiTomasi_Corners_clicked();
void on_action_Subpixeles_corner_triggered();
void on_horizontalSlider_Subpixeles_Corners_valueChanged(int maxCorners);
void on_okButton_Subpixeles_Corners_clicked();
void on_action_Feature_Detection_triggered();
void on_action_Feature_Description_triggered();
void on_action_Feature_Matching_FLANN_triggered();
void on_okButton_Image2_clicked();
void on_action_Find_Object_triggered();
void detectAndDisplay(cv::Mat frame );
void on_action_Person_FaceDetection_triggered();
void on_actionImagePro_About_triggered();
void on_actionQt_About_triggered();
private:
Ui::MainWindow *ui;
QString fileName;
QImage *image;
cv::Mat src;
cv::Mat dst;
//face detection
cv::String face_cascade_name = "./haarcascade_frontalface_alt.xml";
cv::String eyes_cascade_name = "./haarcascade_eye_tree_eyeglasses.xml";
cv::CascadeClassifier face_cascade;
cv::CascadeClassifier eyes_cascade;
};
#endif // MAINWINDOW_H