-
Notifications
You must be signed in to change notification settings - Fork 0
/
mainwindow.h
executable file
·58 lines (50 loc) · 1.82 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
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include <QMainWindow>
#include <QPixmap>
#include <QTableWidget>
#include <QFileDialog>
#include <QInputDialog>
#include <QStandardItemModel>
#include <QMessageBox>
#include "pgmimage.h"
namespace Ui {
class MainWindow;
}
class MainWindow : public QMainWindow {
Q_OBJECT
public:
explicit MainWindow(PgmImage *pgmImage, QWidget *parent = 0);
~MainWindow();
private:
Ui::MainWindow *ui;
PgmImage *pgmImage;
// kernel things
int** kernel;
int kSize; ///< size of kernel
bool rotateKernel;
int generateKernel(); ///< ask user for type of kernel
int kernelFreiChen(); ///< user chose "Frei & Chen" kernel
int kernelGauss(); ///< user chose "Gauss" kernel
int kernelKirsch(); ///< user chose "Kirsch" kernel
int kernelLaplace(); ///< user chose "Laplace" kernel
int kernelPrewitt1(); ///< user chose "Prewitt 1" kernel
int kernelPrewitt2(); ///< user chose "Prewitt 2" kernel
int kernelSobel(); ///< user chose "Sobel" kernel
int kernelOther(); ///< user chose "other" kernel
int sizeOfKernel(); ///< ask user for size of kernel
int contentOfKernel(); ///< ask user for content of kernel
void mallocKernel(); ///< allocate memory for kernel
private slots:
void load(); ///< load a pgm image and show it
void histogram(); ///< create a histogram of the pgm image and show it
void invert(); ///< invert the pgm image and show it
void convolution(); ///< convolution between the image and a matrix
void hough(); ///< Hough transformation
void laneDetection(); ///< Lane detection part 1
void laneDetection2(); ///< Lane detection part 2
void laneDetection3(); ///< Lane detection part 3
void railDetection(); ///< rail detection
void save(); ///< save the pgm image
};
#endif // MAINWINDOW_H