-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathedger.h
More file actions
56 lines (44 loc) · 1.1 KB
/
edger.h
File metadata and controls
56 lines (44 loc) · 1.1 KB
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
#ifndef EDGER_H
#define EDGER_H
#include <QWidget>
#include <mainwindow.h>
class MainWindow;
namespace Ui {
class Edger;
}
class Edger : public QWidget
{
Q_OBJECT
public:
explicit Edger(QWidget *parent = 0);
~Edger();
void setSource(MainWindow* source);
void setImage(QImage picture);
void doBNW(QImage &target);
void filtPixel(int curx, int cury, int mode);
int applyKirschKernel(QList<int> area, QList<QList<int> > kernel);
int applyKernel(QList<int> area, QList<int> kernelx, QList<int> kernely);
int applyWallace(QList<int> area);
double maxOfList(QList<int> aList);
int applyAnyKernel(QList<int> area, QList<int> kernel);
protected:
MainWindow* window;
private:
Ui::Edger *ui;
QImage image;
QImage result;
QImage blackNWhite;
int filter;
QList<int> preCoef;
double coef;
QList<QList<int> > kernels;
QList<int> sobelx; QList<int> sobely;
QList<int> prewitx; QList<int> prewity;
QList<int> mask1;
QList<int> mask2;
QList<int> mask3;
private slots:
void doFilter();
void radio();
};
#endif // EDGER_H