-
Notifications
You must be signed in to change notification settings - Fork 0
/
Image.h
63 lines (51 loc) · 1.24 KB
/
Image.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
#ifndef IMAGE_H
#define IMAGE_H
#include <string>
#include <opencv2/opencv.hpp>
using namespace cv;
using namespace std;
enum colorType {
GRAYSCALE,
RGB
};
#include "Operators.h"
#define MAX_BRIGHTNESS 255;
class Image
{
public:
Image();
Image(Mat image);
virtual ~Image();
int width;
int height;
int size;
int concreteWidth;
int concreteHeight;
int concreteSize;
unsigned char* data;
char* name;
float hist[256];
colorType color;
int channels;
void writeData(char* filename);
char* getString(char* str);
void brightnessUp(int brightness);
void brightnessDown(int brightness);
void saltAndPepper(float prob);
void addPadding(int pad);
void computeHistogram();
void computeHistogram(char* filename);
void equalizeHistogram();
void writeHist(char* filename);
int getValue(int row, int col, int channel);
int convolute(int row, int col, int channel, float** kernel, int kernelSize);
void applyKernel(const double kernel[][3]);
void Blur(float strength);
void applySepia();
void parallelConv(const double kernel[][3]);
void parallelBlur(double strength);
void downSize(int skipRate);
protected:
private:
};
#endif // IMAGE_H