-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMainWindow.h
147 lines (95 loc) · 3.36 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
//
// Created by abdallah drwesh on 4/3/21.
//
#ifndef CV_MAINWINDOW_H
#define CV_MAINWINDOW_H
#include <QMainWindow>
#include <QLabel>
#include "processinglib/Image.h"
#include <opencv2/imgproc/imgproc.hpp>
#include "qcustomplot.h"
#include "ui_MainWindow.h"
#include "vector"
#include "processinglib/point.h"
using namespace cv;
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE
class MainWindow : public QMainWindow {
Q_OBJECT
std::string testImage;
static const int pointsCount = 70;
int centerX = 0;
int centerY = 0 ;
int raduis = 0;
Image *inputImage = nullptr;
Image *outputImage = nullptr;
Image *noiseImage = nullptr;
Image *imageA = nullptr;
Image *imageB = nullptr;
Image *inputImage_1 = nullptr;
Image *outputImage_1 = nullptr;
Image *inputFreqImage = nullptr;
Image *snakeImage = nullptr;
Image * imageMatch_1 = nullptr;
Image * imageMatch_2 = nullptr;
Image * thresholdingImage = nullptr;
Image * segmentationImage = nullptr;
Image * segmentationOutputImage = nullptr;
QCPItemPixmap *ImageDisplay;
QCPGraph *points;
QCPGraph *roc;
QCPGraph *imageMatchPoints1;
QCPGraph *imageMatchPoints2;
QCPGraph *regionGrowing;
QVector<double> *xData = new QVector<double>();
QVector<double> *yData = new QVector<double>();
std::vector<point> DataRG;
QVector<double> *xDataMatching_1 = new QVector<double>();
QVector<double> *yDataMatching_1 = new QVector<double>();
QVector<double> *xDataMatching_2 = new QVector<double>();
QVector<double> *yDataMatching_2 = new QVector<double>();
QVector<QCPItemLine*> *lines = new QVector<QCPItemLine*>();
int arrayOfPointsX [pointsCount] ;
int arrayOfPointsY [pointsCount] ;
public:
explicit MainWindow(QWidget *parent = nullptr);
~MainWindow() override;
private slots:
void on_loadImageBtn_clicked();
void on_LoadImageBtn_1_clicked();
void on_filterSelect_currentIndexChanged(QString);
void on_filterSelect_2_currentIndexChanged(QString);
void on_imageSelect_currentIndexChanged(QString);
void on_imageABtn_clicked();
void on_imageBBtn_clicked();
void on_faceRecog_clicked();
void on_hybridBtn_clicked();
void on_loadImageFreqBtn_clicked();
void on_loadSnake_clicked();
void on_start_clicked();
void on_clearBtn_clicked();
void on_loadImageMatchBtn_1_clicked();
void on_loadImageMatchBtn_2_clicked();
void on_startMatchingBtn_clicked();
void on_matchClearBtn_clicked();
void on_filterFreqSelect_currentIndexChanged(QString);
void on_clearSegmentBtn_clicked();
void on_reRunBtn_clicked();
void on_thHighCannySlider_valueChanged(int);
void on_sigmaCannySlider_valueChanged(int);
void on_thLowCannySlider_valueChanged(int);
void on_segmentImgBtn_clicked();
void startSegmentation();
protected:
bool eventFilter(QObject *obj, QEvent *event);
private:
Ui::MainWindow *ui;
void initializeCustomPlot(QCustomPlot * plot);
void loadImage(std::string filepath, Image *&image, int numChannels = 1);
void displayRGBImage(Image *image, QLabel *label);
void displayGrayscaleImage(Image *image, QLabel *label);
void histDisplay(int histogram[], int color, QCustomPlot *plot);
void CDFDisplay(int histogram[], int color, QCustomPlot *plot);
};
#endif //CV_MAINWINDOW_H