-
Notifications
You must be signed in to change notification settings - Fork 1
/
imageprocessor.h
44 lines (34 loc) · 1.01 KB
/
imageprocessor.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
#ifndef IMAGEPROCESSOR_H
#define IMAGEPROCESSOR_H
#include <QImage>
#include <QPair>
#include "moment.h"
class ImageProcessor
{
private:
QImage image;
QVector<double> histChannel(QImage image, QColor color);
void adjustImageChannel(QVector<double> transform, QColor color);
void adjustChannel(QColor color, int Xmax, int Xmin);
public:
ImageProcessor();
void setImage(QImage image);
QImage getImage();
QImage grayScale();
QImage binarize(int t);
int getOtsuThreshold();
QVector< QPair<double, double> > getOnes();
QVector<Moment> geoMoments();
QVector<Moment> centralMoments();
QVector<Moment> scaleMoments();
QVector<double> huMoments();
QVector<double> histRed();
QVector<double> histGreen();
QVector<double> histBlue();
QVector<double> histGray();
void adjustRed(int Xmax, int Xmin);
void adjustGreen(int Xmax, int Xmin);
void adjustBlue(int Xmax, int Xmin);
void adjustGray(int Xmax, int Xmin);
};
#endif // IMAGEPROCESSOR_H