/
filters.tbl
210 lines (184 loc) · 7.47 KB
/
filters.tbl
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
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
// *****************************************************************************
// filters.tbl Tao3D project
// *****************************************************************************
//
// File description:
//
// Definition of the interface between XLR and native code
// for the "Filters" module.
//
//
//
//
//
//
//
// *****************************************************************************
// This software is licensed under the GNU General Public License v3
// (C) 2011-2012,2014, Baptiste Soulisse <baptiste.soulisse@taodyne.com>
// (C) 2011-2013, Catherine Burvelle <catherine@taodyne.com>
// (C) 2011-2014,2019, Christophe de Dinechin <christophe@dinechin.org>
// (C) 2011-2012,2014, Jérôme Forissier <jerome@taodyne.com>
// (C) 2011-2012,2014, Baptiste Soulisse <baptiste.soulisse@taodyne.com>
// *****************************************************************************
// This file is part of Tao3D
//
// Tao3D is free software: you can r redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// Tao3D is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Tao3D, in a file named COPYING.
// If not, see <https://www.gnu.org/licenses/>.
// *****************************************************************************
// ============================================================================
//
// Filtering amount
//
// ============================================================================
PREFIX(SetFilteringAmount, tree, "filtering_amount",
PARM(a, real, ),
return filtering_amount(self, a),
GROUP(module.Filters)
SYNOPSIS("Set the filtering amount"))
PREFIX(GetFilteringAmount, real, "filtering_amount", ,
return filtering_amount(self),
GROUP(module.Filters)
SYNOPSIS("Set the filtering amount"))
// ============================================================================
//
// Two-pass gaussian filter
//
// ============================================================================
PREFIX(GaussianH, tree, "gaussian_h",
PARM(w, integer, )
PARM(h, integer, )
PARM(n, integer, ),
return gaussian_pass(w, h, n, false),
GROUP(module.Filters)
SYNOPSIS("Apply a horizontal gaussian filter on the current texture.")
DESCRIPTION("Apply a gaussian filter on the current texture."
"It can be used to add blur on an image for instance"))
PREFIX(GaussianV, tree, "gaussian_v",
PARM(w, integer, )
PARM(h, integer, )
PARM(n, integer, ),
return gaussian_pass(w, h, n, true),
GROUP(module.Filters)
SYNOPSIS("Apply a vertical gaussian filter on the current texture.")
DESCRIPTION("Apply a gaussian filter on the current texture."
"It can be used to add blur on an image for instance"))
// ============================================================================
//
// Convolution filters
//
// ============================================================================
PREFIX(Gaussian3X3, tree, "gaussian_3x3_filter",
PARM(w, integer, )
PARM(h, integer, ),
return gaussian(w, h),
GROUP(module.Filters)
SYNOPSIS("Apply a gaussian filter on the current texture.")
DESCRIPTION("Apply a gaussian filter on the current texture."
"It can be used to add blur on an image for instance"))
PREFIX(Mean, tree, "mean_filter",
PARM(w, integer, )
PARM(h, integer, ),
return mean(w, h),
GROUP(module.Filters)
SYNOPSIS("Apply a mean filter on the current texture.")
DESCRIPTION("Apply a mean filter on the current texture."
"It can be used to remove noise of an image for instance."))
PREFIX(Emboss, tree, "emboss_filter",
PARM(w, integer, )
PARM(h, integer, ),
return emboss(w, h),
GROUP(module.Filters)
SYNOPSIS("Apply a emboss filter on the current texture.")
DESCRIPTION("Apply a emboss filter on the current texture."
"It can be used to simulate 3D of an image for instance."))
PREFIX(Sharpness, tree, "sharpness_filter",
PARM(w, integer, )
PARM(h, integer, ),
return sharpness(w, h),
GROUP(module.Filters)
SYNOPSIS("Apply a sharpness filter on the current texture.")
DESCRIPTION("Apply a sharpness filter on the current texture."
"It can be used to highlight details of an image for instance."))
PREFIX(Laplacian, tree, "laplacian_filter",
PARM(w, integer, )
PARM(h, integer, ),
return laplacian(w, h),
GROUP(module.Filters)
SYNOPSIS("Apply a laplacian filter on the current texture.")
DESCRIPTION("Apply a laplacian filter on the current texture."
"It can be used to detect oulines of an image for instance."))
// ============================================================================
//
// Erosion filter
//
// ============================================================================
PREFIX(ErodeRadius, tree, "erode_radius",
PARM(r, real, ),
return erode_radius(r),
GROUP(module.Filters)
SYNOPSIS("Modify the eroding radius")
DESCRIPTION("Modify the eroding radius"))
PREFIX(ErodeColor, tree, "erode_color",
PARM(r, real, )
PARM(g, real, )
PARM(b, real, ),
return erode_color(r, g, b, -1),
GROUP(module.Filters)
SYNOPSIS("Choose the eroding color")
DESCRIPTION("Choose the eroding color"))
PREFIX(ErodeColorAlpha, tree, "erode_color",
PARM(r, real, )
PARM(g, real, )
PARM(b, real, )
PARM(a, real, ),
return erode_color(r, g, b, a),
GROUP(module.Filters)
SYNOPSIS("Choose the eroding color")
DESCRIPTION("Choose the eroding color"))
PREFIX(Erode, tree, "erode_filter",
PARM(x, real, )
PARM(y, real, )
PARM(thr, real, ),
return erode(x, y, thr),
GROUP(module.Filters)
SYNOPSIS("Apply Erosion filter")
DESCRIPTION("Apply an Erosion filter"))
// ============================================================================
//
// Black and white filter
//
// ============================================================================
PREFIX(BlackAndWhiteLevelsAlpha, tree, "black_and_white_levels",
PARM(r, real, )
PARM(g, real, )
PARM(b, real, )
PARM(a, real, ),
return black_and_white_levels(r, g, b, a),
GROUP(module.Filters)
SYNOPSIS("Modify Black & White levels")
DESCRIPTION("Modify Black & White levels"))
PREFIX(BlackAndWhiteLevels, tree, "black_and_white_levels",
PARM(r, real, )
PARM(g, real, )
PARM(b, real, ),
return black_and_white_levels(r, g, b, 0),
GROUP(module.Filters)
SYNOPSIS("Modify Black & White levels")
DESCRIPTION("Modify Black & White levels"))
PREFIX(BlackAndWhite, tree, "black_and_white_filter", ,
return black_and_white(),
GROUP(module.Filters)
SYNOPSIS("Apply Black & White filter")
DESCRIPTION("Apply Black & White filter"))