-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathimage.h
44 lines (38 loc) · 994 Bytes
/
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
#include <cstdint>
#include <vector>
#include <cmath>
class ImageAttribute {
public:
int image_heigh_;
int image_width_;
};
class Point {
public:
int x_;
int y_;
};
class DataFluctuation {
public:
bool changetype_;
Point coordinatel;
};
class RotationAngle {
public:
double now_;
double next_;
double total_;
};
namespace image_process {
// image preprocess
uint8_t OtsuMethod(std::vector<int> &histogram,
ImageAttribute &image_attribute);
std::vector<int>
FrequencyDistributionFunction(std::vector<std::vector<uint8_t>> &image,
ImageAttribute &image_attribute);
std::vector<std::vector<uint8_t>>
ImageEqualize(std::vector<std::vector<uint8_t>> &image,
ImageAttribute &image_attribute);
std::vector<std::vector<uint8_t>>
ImageBinarize(std::vector<std::vector<uint8_t>> &image,
ImageAttribute &image_attribute, uint8_t threshold);
} // namespace image_process