1 |
|
2 |
|
3 |
|
4 | #ifndef SRC_OPERATIONS_H_
|
5 | #define SRC_OPERATIONS_H_
|
6 |
|
7 | #include <algorithm>
|
8 | #include <functional>
|
9 | #include <memory>
|
10 | #include <tuple>
|
11 | #include <vips/vips8>
|
12 |
|
13 | using vips::VImage;
|
14 |
|
15 | namespace sharp {
|
16 |
|
17 | |
18 |
|
19 |
|
20 | VImage Tint(VImage image, std::vector<double> const tint);
|
21 |
|
22 | |
23 |
|
24 |
|
25 | VImage Normalise(VImage image, int const lower, int const upper);
|
26 |
|
27 | |
28 |
|
29 |
|
30 | VImage Clahe(VImage image, int const width, int const height, int const maxSlope);
|
31 |
|
32 | |
33 |
|
34 |
|
35 | VImage Gamma(VImage image, double const exponent);
|
36 |
|
37 | |
38 |
|
39 |
|
40 | VImage Flatten(VImage image, std::vector<double> flattenBackground);
|
41 |
|
42 | |
43 |
|
44 |
|
45 | VImage Negate(VImage image, bool const negateAlpha);
|
46 |
|
47 | |
48 |
|
49 |
|
50 | VImage Blur(VImage image, double const sigma, VipsPrecision precision, double const minAmpl);
|
51 |
|
52 | |
53 |
|
54 |
|
55 | VImage Convolve(VImage image, int const width, int const height,
|
56 | double const scale, double const offset, std::vector<double> const &kernel_v);
|
57 |
|
58 | |
59 |
|
60 |
|
61 | VImage Sharpen(VImage image, double const sigma, double const m1, double const m2,
|
62 | double const x1, double const y2, double const y3);
|
63 |
|
64 | |
65 |
|
66 |
|
67 | VImage Threshold(VImage image, double const threshold, bool const thresholdColor);
|
68 |
|
69 | |
70 |
|
71 |
|
72 | VImage Bandbool(VImage image, VipsOperationBoolean const boolean);
|
73 |
|
74 | |
75 |
|
76 |
|
77 | VImage Boolean(VImage image, VImage imageR, VipsOperationBoolean const boolean);
|
78 |
|
79 | |
80 |
|
81 |
|
82 | VImage Trim(VImage image, std::vector<double> background, double threshold, bool const lineArt);
|
83 |
|
84 | |
85 |
|
86 |
|
87 | VImage Linear(VImage image, std::vector<double> const a, std::vector<double> const b);
|
88 |
|
89 | |
90 |
|
91 |
|
92 | VImage Unflatten(VImage image);
|
93 |
|
94 | |
95 |
|
96 |
|
97 |
|
98 | VImage Recomb(VImage image, std::vector<double> const &matrix);
|
99 |
|
100 | |
101 |
|
102 |
|
103 | VImage Modulate(VImage image, double const brightness, double const saturation,
|
104 | int const hue, double const lightness);
|
105 |
|
106 | |
107 |
|
108 |
|
109 | VImage EnsureColourspace(VImage image, VipsInterpretation colourspace);
|
110 |
|
111 | |
112 |
|
113 |
|
114 | VImage CropMultiPage(VImage image, int left, int top, int width, int height,
|
115 | int nPages, int *pageHeight);
|
116 |
|
117 | |
118 |
|
119 |
|
120 | VImage EmbedMultiPage(VImage image, int left, int top, int width, int height,
|
121 | VipsExtend extendWith, std::vector<double> background, int nPages, int *pageHeight);
|
122 |
|
123 | }
|
124 |
|
125 | #endif
|