-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsharper.h
More file actions
64 lines (53 loc) · 1.54 KB
/
sharper.h
File metadata and controls
64 lines (53 loc) · 1.54 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
57
58
59
60
61
62
63
64
#ifndef SHARPER_H
#define SHARPER_H
#include <QWidget>
#include <mainwindow.h>
class MainWindow;
namespace Ui {
class Sharper;
}
class Sharper : public QWidget
{
Q_OBJECT
protected:
MainWindow* window;
public:
explicit Sharper(QWidget *parent = 0);
~Sharper();
void setSource(MainWindow* source);
void setImage(QImage picture);
QList<int> vicinity(QImage *picture, int power, int curx, int cury, int chanel);
int listAverage(QList<int> theArray);
double listDisp(QList<int> theArray, int mu);
int applyKernel(QList<int> area, QList<qreal> kernel);
void uncertainMask(QImage *picture, int mode, int hsl);
double countKg(QList<int> proxy);
void localContrast(QImage *picture);
int contrastPixel(int source, int proxBright);
QPixmap doCut(QImage *picture, int y);
QList<qreal> genGauss(int power, qreal sigma);
QColor uncertainColor(QImage *picture, int mode, int tempKg, QColor sourcePixel, QList<qreal>gaussian, int x, int y, int hsl);
private:
Ui::Sharper *ui;
QImage image;
QImage result;
QImage output;
int kg, kn, contArea, realKg;
int power;
int gausPower;
qreal gausSigma;
double N;
private slots:
void kgChanged(int spin);
void uncertainSlot();
void sliderChanged(int value);
void nChanged(double spin);
void contrastSlot();
void contAreaChanged(int spin);
void realKgChanged(int spin);
void simpleSharp();
void simpleSharpRGB();
void setGausPower(int spin);
void setGausSigma(double spin);
};
#endif // SHARPER_H