forked from hybridgroup/gocv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
imgproc_colorcodes.go
351 lines (249 loc) · 8.99 KB
/
imgproc_colorcodes.go
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
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
package gocv
// ColorConversionCode is a color conversion code used on Mat.
//
// For further details, please see:
// http://docs.opencv.org/3.4.0/d7/d1b/group__imgproc__misc.html#ga4e0972be5de079fed4e3a10e24ef5ef0
//
type ColorConversionCode int
const (
// ColorBGRToBGRA adds alpha channel to BGR image.
ColorBGRToBGRA ColorConversionCode = 0
// ColorBGRAToBGR removes alpha channel from BGR image.
ColorBGRAToBGR = 1
// ColorBGRToRGBA converts from BGR to RGB with alpha channel.
ColorBGRToRGBA = 2
// ColorRGBAToBGR converts from RGB with alpha to BGR color space.
ColorRGBAToBGR = 3
// ColorBGRToRGB converts from BGR to RGB without alpha channel.
ColorBGRToRGB = 4
// ColorBGRAToRGBA converts from BGR with alpha channel
// to RGB with alpha channel.
ColorBGRAToRGBA = 5
// ColorBGRToGray converts from BGR to grayscale.
ColorBGRToGray = 6
// ColorRGBToGray converts from RGB to grayscale.
ColorRGBToGray = 7
// ColorGrayToBGR converts from grayscale to BGR.
ColorGrayToBGR = 8
// ColorGrayToBGRA converts from grayscale to BGR with alpha channel.
ColorGrayToBGRA = 9
// ColorBGRAToGray converts from BGR with alpha channel to grayscale.
ColorBGRAToGray = 10
// ColorRGBAToGray converts from RGB with alpha channel to grayscale.
ColorRGBAToGray = 11
// ColorBGRToBGR565 converts from BGR to BGR565 (16-bit images).
ColorBGRToBGR565 = 12
// ColorRGBToBGR565 converts from RGB to BGR565 (16-bit images).
ColorRGBToBGR565 = 13
// ColorBGR565ToBGR converts from BGR565 (16-bit images) to BGR.
ColorBGR565ToBGR = 14
// ColorBGR565ToRGB converts from BGR565 (16-bit images) to RGB.
ColorBGR565ToRGB = 15
// ColorBGRAToBGR565 converts from BGRA (with alpha channel)
// to BGR565 (16-bit images).
ColorBGRAToBGR565 = 16
// ColorRGBAToBGR565 converts from RGBA (with alpha channel)
// to BGR565 (16-bit images).
ColorRGBAToBGR565 = 17
// ColorBGR565ToBGRA converts from BGR565 (16-bit images)
// to BGRA (with alpha channel).
ColorBGR565ToBGRA = 18
// ColorBGR565ToRGBA converts from BGR565 (16-bit images)
// to RGBA (with alpha channel).
ColorBGR565ToRGBA = 19
// ColorGrayToBGR565 converts from grayscale
// to BGR565 (16-bit images).
ColorGrayToBGR565 = 20
// ColorBGR565ToGray converts from BGR565 (16-bit images)
// to grayscale.
ColorBGR565ToGray = 21
// ColorBGRToBGR555 converts from BGR to BGR555 (16-bit images).
ColorBGRToBGR555 = 22
// ColorRGBToBGR555 converts from RGB to BGR555 (16-bit images).
ColorRGBToBGR555 = 23
// ColorBGR555ToBGR converts from BGR555 (16-bit images) to BGR.
ColorBGR555ToBGR = 24
// ColorBGR555ToRGB converts from BGR555 (16-bit images) to RGB.
ColorBGR555ToRGB = 25
// ColorBGRAToBGR555 converts from BGRA (with alpha channel)
// to BGR555 (16-bit images).
ColorBGRAToBGR555 = 26
// ColorRGBAToBGR555 converts from RGBA (with alpha channel)
// to BGR555 (16-bit images).
ColorRGBAToBGR555 = 27
// ColorBGR555ToBGRA converts from BGR555 (16-bit images)
// to BGRA (with alpha channel).
ColorBGR555ToBGRA = 28
// ColorBGR555ToRGBA converts from BGR555 (16-bit images)
// to RGBA (with alpha channel).
ColorBGR555ToRGBA = 29
// ColorGrayToBGR555 converts from grayscale to BGR555 (16-bit images).
ColorGrayToBGR555 = 30
// ColorBGR555ToGRAY converts from BGR555 (16-bit images) to grayscale.
ColorBGR555ToGRAY = 31
// ColorBGRToXYZ converts from BGR to CIE XYZ.
ColorBGRToXYZ = 32
// ColorRGBToXYZ converts from RGB to CIE XYZ.
ColorRGBToXYZ = 33
// ColorXYZToBGR converts from CIE XYZ to BGR.
ColorXYZToBGR = 34
// ColorXYZToRGB converts from CIE XYZ to RGB.
ColorXYZToRGB = 35
// ColorBGRToYCrCb converts from BGR to luma-chroma (aka YCC).
ColorBGRToYCrCb = 36
// ColorRGBToYCrCb converts from RGB to luma-chroma (aka YCC).
ColorRGBToYCrCb = 37
// ColorYCrCbToBGR converts from luma-chroma (aka YCC) to BGR.
ColorYCrCbToBGR = 38
// ColorYCrCbToRGB converts from luma-chroma (aka YCC) to RGB.
ColorYCrCbToRGB = 39
// ColorBGRToHSV converts from BGR to HSV (hue saturation value).
ColorBGRToHSV = 40
// ColorRGBToHSV converts from RGB to HSV (hue saturation value).
ColorRGBToHSV = 41
// ColorBGRToLab converts from BGR to CIE Lab.
ColorBGRToLab = 44
// ColorRGBToLab converts from RGB to CIE Lab.
ColorRGBToLab = 45
// ColorBGRToLuv converts from BGR to CIE Luv.
ColorBGRToLuv = 50
// ColorRGBToLuv converts from RGB to CIE Luv.
ColorRGBToLuv = 51
// ColorBGRToHLS converts from BGR to HLS (hue lightness saturation).
ColorBGRToHLS = 52
// ColorRGBToHLS converts from RGB to HLS (hue lightness saturation).
ColorRGBToHLS = 53
// ColorHSVToBGR converts from HSV (hue saturation value) to BGR.
ColorHSVToBGR = 54
// ColorHSVToRGB converts from HSV (hue saturation value) to RGB.
ColorHSVToRGB = 55
// ColorLabToBGR converts from CIE Lab to BGR.
ColorLabToBGR = 56
// ColorLabToRGB converts from CIE Lab to RGB.
ColorLabToRGB = 57
// ColorLuvToBGR converts from CIE Luv to BGR.
ColorLuvToBGR = 58
// ColorLuvToRGB converts from CIE Luv to RGB.
ColorLuvToRGB = 59
// ColorHLSToBGR converts from HLS (hue lightness saturation) to BGR.
ColorHLSToBGR = 60
// ColorHLSToRGB converts from HLS (hue lightness saturation) to RGB.
ColorHLSToRGB = 61
// ColorBGRToHSVFull converts from BGR to HSV (hue saturation value) full.
ColorBGRToHSVFull = 66
// ColorRGBToHSVFull converts from RGB to HSV (hue saturation value) full.
ColorRGBToHSVFull = 67
// ColorBGRToHLSFull converts from BGR to HLS (hue lightness saturation) full.
ColorBGRToHLSFull = 68
// ColorRGBToHLSFull converts from RGB to HLS (hue lightness saturation) full.
ColorRGBToHLSFull = 69
// ColorHSVToBGRFull converts from HSV (hue saturation value) to BGR full.
ColorHSVToBGRFull = 70
// ColorHSVToRGBFull converts from HSV (hue saturation value) to RGB full.
ColorHSVToRGBFull = 71
// ColorHLSToBGRFull converts from HLS (hue lightness saturation) to BGR full.
ColorHLSToBGRFull = 72
// ColorHLSToRGBFull converts from HLS (hue lightness saturation) to RGB full.
ColorHLSToRGBFull = 73
// ColorLBGRToLab converts from LBGR to CIE Lab.
ColorLBGRToLab = 74
// ColorLRGBToLab converts from LRGB to CIE Lab.
ColorLRGBToLab = 75
// ColorLBGRToLuv converts from LBGR to CIE Luv.
ColorLBGRToLuv = 76
// ColorLRGBToLuv converts from LRGB to CIE Luv.
ColorLRGBToLuv = 77
// ColorLabToLBGR converts from CIE Lab to LBGR.
ColorLabToLBGR = 78
// ColorLabToLRGB converts from CIE Lab to LRGB.
ColorLabToLRGB = 79
// ColorLuvToLBGR converts from CIE Luv to LBGR.
ColorLuvToLBGR = 80
// ColorLuvToLRGB converts from CIE Luv to LRGB.
ColorLuvToLRGB = 81
// ColorBGRToYUV converts from BGR to YUV.
ColorBGRToYUV = 82
// ColorRGBToYUV converts from RGB to YUV.
ColorRGBToYUV = 83
// ColorYUVToBGR converts from YUV to BGR.
ColorYUVToBGR = 84
// ColorYUVToRGB converts from YUV to RGB.
ColorYUVToRGB = 85
// ColorYUVToRGBNV12 converts from YUV 4:2:0 to RGB NV12.
ColorYUVToRGBNV12 = 90
// ColorYUVToBGRNV12 converts from YUV 4:2:0 to BGR NV12.
ColorYUVToBGRNV12 = 91
// ColorYUVToRGBNV21 converts from YUV 4:2:0 to RGB NV21.
ColorYUVToRGBNV21 = 92
// ColorYUVToBGRNV21 converts from YUV 4:2:0 to BGR NV21.
ColorYUVToBGRNV21 = 93
// ColorYUVToRGBANV12 converts from YUV 4:2:0 to RGBA NV12.
ColorYUVToRGBANV12 = 94
// ColorYUVToBGRANV12 converts from YUV 4:2:0 to BGRA NV12.
ColorYUVToBGRANV12 = 95
// ColorYUVToRGBANV21 converts from YUV 4:2:0 to RGBA NV21.
ColorYUVToRGBANV21 = 96
// ColorYUVToBGRANV21 converts from YUV 4:2:0 to BGRA NV21.
ColorYUVToBGRANV21 = 97
ColorYUVToRGBYV12 = 98
ColorYUVToBGRYV12 = 99
ColorYUVToRGBIYUV = 100
ColorYUVToBGRIYUV = 101
ColorYUVToRGBAYV12 = 102
ColorYUVToBGRAYV12 = 103
ColorYUVToRGBAIYUV = 104
ColorYUVToBGRAIYUV = 105
ColorYUVToGRAY420 = 106
// YUV 4:2:2 family to RGB
ColorYUVToRGBUYVY = 107
ColorYUVToBGRUYVY = 108
ColorYUVToRGBAUYVY = 111
ColorYUVToBGRAUYVY = 112
ColorYUVToRGBYUY2 = 115
ColorYUVToBGRYUY2 = 116
ColorYUVToRGBYVYU = 117
ColorYUVToBGRYVYU = 118
ColorYUVToRGBAYUY2 = 119
ColorYUVToBGRAYUY2 = 120
ColorYUVToRGBAYVYU = 121
ColorYUVToBGRAYVYU = 122
ColorYUVToGRAYUYVY = 123
ColorYUVToGRAYYUY2 = 124
// alpha premultiplication
ColorRGBATomRGBA = 125
ColormRGBAToRGBA = 126
// RGB to YUV 4:2:0 family
ColorRGBToYUVI420 = 127
ColorBGRToYUVI420 = 128
ColorRGBAToYUVI420 = 129
ColorBGRAToYUVI420 = 130
ColorRGBToYUVYV12 = 131
ColorBGRToYUVYV12 = 132
ColorRGBAToYUVYV12 = 133
ColorBGRAToYUVYV12 = 134
// Demosaicing
ColorBayerBGToBGR = 46
ColorBayerGBToBGR = 47
ColorBayerRGToBGR = 48
ColorBayerGRToBGR = 49
ColorBayerBGToGRAY = 86
ColorBayerGBToGRAY = 87
ColorBayerRGToGRAY = 88
ColorBayerGRToGRAY = 89
// Demosaicing using Variable Number of Gradients
ColorBayerBGToBGRVNG = 62
ColorBayerGBToBGRVNG = 63
ColorBayerRGToBGRVNG = 64
ColorBayerGRToBGRVNG = 65
// Edge-Aware Demosaicing
ColorBayerBGToBGREA = 135
ColorBayerGBToBGREA = 136
ColorBayerRGToBGREA = 137
ColorBayerGRToBGREA = 138
// Demosaicing with alpha channel
ColorBayerBGToBGRA = 139
ColorBayerGBToBGRA = 140
ColorBayerRGToBGRA = 141
ColorBayerGRToBGRA = 142
ColorCOLORCVTMAX = 143
)