imagecore 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +24 -0
- data/Gemfile +4 -0
- data/Rakefile +2 -0
- data/ext/imagecore/analyze_image.cxx +58 -0
- data/ext/imagecore/analyze_image.h +6 -0
- data/ext/imagecore/extconf.rb +9 -0
- data/ext/imagecore/imagecore.cxx +34 -0
- data/ext/opencv/core/___.c +3 -0
- data/ext/opencv/core/alloc.cpp +697 -0
- data/ext/opencv/core/array.cpp +3206 -0
- data/ext/opencv/core/datastructs.cpp +4064 -0
- data/ext/opencv/core/extconf.rb +22 -0
- data/ext/opencv/core/matrix.cpp +3777 -0
- data/ext/opencv/core/precomp.hpp +216 -0
- data/ext/opencv/core/system.cpp +832 -0
- data/ext/opencv/core/tables.cpp +3512 -0
- data/ext/opencv/highgui/___.c +3 -0
- data/ext/opencv/highgui/bitstrm.cpp +582 -0
- data/ext/opencv/highgui/bitstrm.hpp +182 -0
- data/ext/opencv/highgui/extconf.rb +28 -0
- data/ext/opencv/highgui/grfmt_base.cpp +128 -0
- data/ext/opencv/highgui/grfmt_base.hpp +113 -0
- data/ext/opencv/highgui/grfmt_bmp.cpp +564 -0
- data/ext/opencv/highgui/grfmt_bmp.hpp +99 -0
- data/ext/opencv/highgui/grfmt_exr.hpp +113 -0
- data/ext/opencv/highgui/grfmt_imageio.hpp +56 -0
- data/ext/opencv/highgui/grfmt_jpeg.cpp +622 -0
- data/ext/opencv/highgui/grfmt_jpeg.hpp +90 -0
- data/ext/opencv/highgui/grfmt_jpeg2000.cpp +529 -0
- data/ext/opencv/highgui/grfmt_jpeg2000.hpp +95 -0
- data/ext/opencv/highgui/grfmt_png.cpp +406 -0
- data/ext/opencv/highgui/grfmt_png.hpp +101 -0
- data/ext/opencv/highgui/grfmt_pxm.cpp +513 -0
- data/ext/opencv/highgui/grfmt_pxm.hpp +92 -0
- data/ext/opencv/highgui/grfmt_sunras.cpp +425 -0
- data/ext/opencv/highgui/grfmt_sunras.hpp +105 -0
- data/ext/opencv/highgui/grfmt_tiff.cpp +718 -0
- data/ext/opencv/highgui/grfmt_tiff.hpp +136 -0
- data/ext/opencv/highgui/grfmts.hpp +56 -0
- data/ext/opencv/highgui/loadsave.cpp +535 -0
- data/ext/opencv/highgui/precomp.hpp +223 -0
- data/ext/opencv/highgui/utils.cpp +689 -0
- data/ext/opencv/highgui/utils.hpp +128 -0
- data/ext/opencv/imgproc/___.c +3 -0
- data/ext/opencv/imgproc/_geom.h +72 -0
- data/ext/opencv/imgproc/color.cpp +3179 -0
- data/ext/opencv/imgproc/contours.cpp +1780 -0
- data/ext/opencv/imgproc/extconf.rb +11 -0
- data/ext/opencv/imgproc/filter.cpp +3063 -0
- data/ext/opencv/imgproc/precomp.hpp +159 -0
- data/ext/opencv/imgproc/shapedescr.cpp +1306 -0
- data/ext/opencv/imgproc/smooth.cpp +1566 -0
- data/ext/opencv/imgproc/tables.cpp +214 -0
- data/ext/opencv/imgproc/thresh.cpp +636 -0
- data/ext/opencv/imgproc/utils.cpp +242 -0
- data/ext/opencv/include/opencv2/core/core.hpp +4344 -0
- data/ext/opencv/include/opencv2/core/core_c.h +1885 -0
- data/ext/opencv/include/opencv2/core/internal.hpp +710 -0
- data/ext/opencv/include/opencv2/core/mat.hpp +2557 -0
- data/ext/opencv/include/opencv2/core/operations.hpp +3623 -0
- data/ext/opencv/include/opencv2/core/types_c.h +1875 -0
- data/ext/opencv/include/opencv2/core/version.hpp +58 -0
- data/ext/opencv/include/opencv2/highgui/highgui.hpp +198 -0
- data/ext/opencv/include/opencv2/highgui/highgui_c.h +506 -0
- data/ext/opencv/include/opencv2/imgproc/imgproc.hpp +1139 -0
- data/ext/opencv/include/opencv2/imgproc/imgproc_c.h +783 -0
- data/ext/opencv/include/opencv2/imgproc/types_c.h +538 -0
- data/imagecore.gemspec +20 -0
- data/lib/imagecore.rb +16 -0
- data/lib/imagecore/version.rb +3 -0
- metadata +119 -0
@@ -0,0 +1,538 @@
|
|
1
|
+
/*M///////////////////////////////////////////////////////////////////////////////////////
|
2
|
+
//
|
3
|
+
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
|
4
|
+
//
|
5
|
+
// By downloading, copying, installing or using the software you agree to this license.
|
6
|
+
// If you do not agree to this license, do not download, install,
|
7
|
+
// copy or use the software.
|
8
|
+
//
|
9
|
+
//
|
10
|
+
// License Agreement
|
11
|
+
// For Open Source Computer Vision Library
|
12
|
+
//
|
13
|
+
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
|
14
|
+
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
|
15
|
+
// Third party copyrights are property of their respective owners.
|
16
|
+
//
|
17
|
+
// Redistribution and use in source and binary forms, with or without modification,
|
18
|
+
// are permitted provided that the following conditions are met:
|
19
|
+
//
|
20
|
+
// * Redistribution's of source code must retain the above copyright notice,
|
21
|
+
// this list of conditions and the following disclaimer.
|
22
|
+
//
|
23
|
+
// * Redistribution's in binary form must reproduce the above copyright notice,
|
24
|
+
// this list of conditions and the following disclaimer in the documentation
|
25
|
+
// and/or other materials provided with the distribution.
|
26
|
+
//
|
27
|
+
// * The name of the copyright holders may not be used to endorse or promote products
|
28
|
+
// derived from this software without specific prior written permission.
|
29
|
+
//
|
30
|
+
// This software is provided by the copyright holders and contributors "as is" and
|
31
|
+
// any express or implied warranties, including, but not limited to, the implied
|
32
|
+
// warranties of merchantability and fitness for a particular purpose are disclaimed.
|
33
|
+
// In no event shall the Intel Corporation or contributors be liable for any direct,
|
34
|
+
// indirect, incidental, special, exemplary, or consequential damages
|
35
|
+
// (including, but not limited to, procurement of substitute goods or services;
|
36
|
+
// loss of use, data, or profits; or business interruption) however caused
|
37
|
+
// and on any theory of liability, whether in contract, strict liability,
|
38
|
+
// or tort (including negligence or otherwise) arising in any way out of
|
39
|
+
// the use of this software, even if advised of the possibility of such damage.
|
40
|
+
//
|
41
|
+
//M*/
|
42
|
+
|
43
|
+
#ifndef __OPENCV_IMGPROC_TYPES_C_H__
|
44
|
+
#define __OPENCV_IMGPROC_TYPES_C_H__
|
45
|
+
|
46
|
+
#include "opencv2/core/core_c.h"
|
47
|
+
#include "opencv2/imgproc/types_c.h"
|
48
|
+
|
49
|
+
#ifdef __cplusplus
|
50
|
+
extern "C" {
|
51
|
+
#endif
|
52
|
+
|
53
|
+
/* Connected component structure */
|
54
|
+
typedef struct CvConnectedComp
|
55
|
+
{
|
56
|
+
double area; /* area of the connected component */
|
57
|
+
CvScalar value; /* average color of the connected component */
|
58
|
+
CvRect rect; /* ROI of the component */
|
59
|
+
CvSeq* contour; /* optional component boundary
|
60
|
+
(the contour might have child contours corresponding to the holes)*/
|
61
|
+
}
|
62
|
+
CvConnectedComp;
|
63
|
+
|
64
|
+
/* Image smooth methods */
|
65
|
+
enum
|
66
|
+
{
|
67
|
+
CV_BLUR_NO_SCALE =0,
|
68
|
+
CV_BLUR =1,
|
69
|
+
CV_GAUSSIAN =2,
|
70
|
+
CV_MEDIAN =3,
|
71
|
+
CV_BILATERAL =4
|
72
|
+
};
|
73
|
+
|
74
|
+
/* Filters used in pyramid decomposition */
|
75
|
+
enum
|
76
|
+
{
|
77
|
+
CV_GAUSSIAN_5x5 = 7
|
78
|
+
};
|
79
|
+
|
80
|
+
/* Inpainting algorithms */
|
81
|
+
enum
|
82
|
+
{
|
83
|
+
CV_INPAINT_NS =0,
|
84
|
+
CV_INPAINT_TELEA =1
|
85
|
+
};
|
86
|
+
|
87
|
+
/* Special filters */
|
88
|
+
enum
|
89
|
+
{
|
90
|
+
CV_SCHARR =-1,
|
91
|
+
CV_MAX_SOBEL_KSIZE =7
|
92
|
+
};
|
93
|
+
|
94
|
+
/* Constants for color conversion */
|
95
|
+
enum
|
96
|
+
{
|
97
|
+
CV_BGR2BGRA =0,
|
98
|
+
CV_RGB2RGBA =CV_BGR2BGRA,
|
99
|
+
|
100
|
+
CV_BGRA2BGR =1,
|
101
|
+
CV_RGBA2RGB =CV_BGRA2BGR,
|
102
|
+
|
103
|
+
CV_BGR2RGBA =2,
|
104
|
+
CV_RGB2BGRA =CV_BGR2RGBA,
|
105
|
+
|
106
|
+
CV_RGBA2BGR =3,
|
107
|
+
CV_BGRA2RGB =CV_RGBA2BGR,
|
108
|
+
|
109
|
+
CV_BGR2RGB =4,
|
110
|
+
CV_RGB2BGR =CV_BGR2RGB,
|
111
|
+
|
112
|
+
CV_BGRA2RGBA =5,
|
113
|
+
CV_RGBA2BGRA =CV_BGRA2RGBA,
|
114
|
+
|
115
|
+
CV_BGR2GRAY =6,
|
116
|
+
CV_RGB2GRAY =7,
|
117
|
+
CV_GRAY2BGR =8,
|
118
|
+
CV_GRAY2RGB =CV_GRAY2BGR,
|
119
|
+
CV_GRAY2BGRA =9,
|
120
|
+
CV_GRAY2RGBA =CV_GRAY2BGRA,
|
121
|
+
CV_BGRA2GRAY =10,
|
122
|
+
CV_RGBA2GRAY =11,
|
123
|
+
|
124
|
+
CV_BGR2BGR565 =12,
|
125
|
+
CV_RGB2BGR565 =13,
|
126
|
+
CV_BGR5652BGR =14,
|
127
|
+
CV_BGR5652RGB =15,
|
128
|
+
CV_BGRA2BGR565 =16,
|
129
|
+
CV_RGBA2BGR565 =17,
|
130
|
+
CV_BGR5652BGRA =18,
|
131
|
+
CV_BGR5652RGBA =19,
|
132
|
+
|
133
|
+
CV_GRAY2BGR565 =20,
|
134
|
+
CV_BGR5652GRAY =21,
|
135
|
+
|
136
|
+
CV_BGR2BGR555 =22,
|
137
|
+
CV_RGB2BGR555 =23,
|
138
|
+
CV_BGR5552BGR =24,
|
139
|
+
CV_BGR5552RGB =25,
|
140
|
+
CV_BGRA2BGR555 =26,
|
141
|
+
CV_RGBA2BGR555 =27,
|
142
|
+
CV_BGR5552BGRA =28,
|
143
|
+
CV_BGR5552RGBA =29,
|
144
|
+
|
145
|
+
CV_GRAY2BGR555 =30,
|
146
|
+
CV_BGR5552GRAY =31,
|
147
|
+
|
148
|
+
CV_BGR2XYZ =32,
|
149
|
+
CV_RGB2XYZ =33,
|
150
|
+
CV_XYZ2BGR =34,
|
151
|
+
CV_XYZ2RGB =35,
|
152
|
+
|
153
|
+
CV_BGR2YCrCb =36,
|
154
|
+
CV_RGB2YCrCb =37,
|
155
|
+
CV_YCrCb2BGR =38,
|
156
|
+
CV_YCrCb2RGB =39,
|
157
|
+
|
158
|
+
CV_BGR2HSV =40,
|
159
|
+
CV_RGB2HSV =41,
|
160
|
+
|
161
|
+
CV_BGR2Lab =44,
|
162
|
+
CV_RGB2Lab =45,
|
163
|
+
|
164
|
+
CV_BayerBG2BGR =46,
|
165
|
+
CV_BayerGB2BGR =47,
|
166
|
+
CV_BayerRG2BGR =48,
|
167
|
+
CV_BayerGR2BGR =49,
|
168
|
+
|
169
|
+
CV_BayerBG2RGB =CV_BayerRG2BGR,
|
170
|
+
CV_BayerGB2RGB =CV_BayerGR2BGR,
|
171
|
+
CV_BayerRG2RGB =CV_BayerBG2BGR,
|
172
|
+
CV_BayerGR2RGB =CV_BayerGB2BGR,
|
173
|
+
|
174
|
+
CV_BGR2Luv =50,
|
175
|
+
CV_RGB2Luv =51,
|
176
|
+
CV_BGR2HLS =52,
|
177
|
+
CV_RGB2HLS =53,
|
178
|
+
|
179
|
+
CV_HSV2BGR =54,
|
180
|
+
CV_HSV2RGB =55,
|
181
|
+
|
182
|
+
CV_Lab2BGR =56,
|
183
|
+
CV_Lab2RGB =57,
|
184
|
+
CV_Luv2BGR =58,
|
185
|
+
CV_Luv2RGB =59,
|
186
|
+
CV_HLS2BGR =60,
|
187
|
+
CV_HLS2RGB =61,
|
188
|
+
|
189
|
+
CV_BayerBG2BGR_VNG =62,
|
190
|
+
CV_BayerGB2BGR_VNG =63,
|
191
|
+
CV_BayerRG2BGR_VNG =64,
|
192
|
+
CV_BayerGR2BGR_VNG =65,
|
193
|
+
|
194
|
+
CV_BayerBG2RGB_VNG =CV_BayerRG2BGR_VNG,
|
195
|
+
CV_BayerGB2RGB_VNG =CV_BayerGR2BGR_VNG,
|
196
|
+
CV_BayerRG2RGB_VNG =CV_BayerBG2BGR_VNG,
|
197
|
+
CV_BayerGR2RGB_VNG =CV_BayerGB2BGR_VNG,
|
198
|
+
|
199
|
+
CV_BGR2HSV_FULL = 66,
|
200
|
+
CV_RGB2HSV_FULL = 67,
|
201
|
+
CV_BGR2HLS_FULL = 68,
|
202
|
+
CV_RGB2HLS_FULL = 69,
|
203
|
+
|
204
|
+
CV_HSV2BGR_FULL = 70,
|
205
|
+
CV_HSV2RGB_FULL = 71,
|
206
|
+
CV_HLS2BGR_FULL = 72,
|
207
|
+
CV_HLS2RGB_FULL = 73,
|
208
|
+
|
209
|
+
CV_LBGR2Lab = 74,
|
210
|
+
CV_LRGB2Lab = 75,
|
211
|
+
CV_LBGR2Luv = 76,
|
212
|
+
CV_LRGB2Luv = 77,
|
213
|
+
|
214
|
+
CV_Lab2LBGR = 78,
|
215
|
+
CV_Lab2LRGB = 79,
|
216
|
+
CV_Luv2LBGR = 80,
|
217
|
+
CV_Luv2LRGB = 81,
|
218
|
+
|
219
|
+
CV_BGR2YUV = 82,
|
220
|
+
CV_RGB2YUV = 83,
|
221
|
+
CV_YUV2BGR = 84,
|
222
|
+
CV_YUV2RGB = 85,
|
223
|
+
|
224
|
+
CV_BayerBG2GRAY = 86,
|
225
|
+
CV_BayerGB2GRAY = 87,
|
226
|
+
CV_BayerRG2GRAY = 88,
|
227
|
+
CV_BayerGR2GRAY = 89,
|
228
|
+
|
229
|
+
CV_YUV420i2RGB = 90,
|
230
|
+
CV_YUV420i2BGR = 91,
|
231
|
+
CV_YUV420sp2RGB = 92,
|
232
|
+
CV_YUV420sp2BGR = 93,
|
233
|
+
|
234
|
+
CV_COLORCVT_MAX =100
|
235
|
+
};
|
236
|
+
|
237
|
+
|
238
|
+
/* Sub-pixel interpolation methods */
|
239
|
+
enum
|
240
|
+
{
|
241
|
+
CV_INTER_NN =0,
|
242
|
+
CV_INTER_LINEAR =1,
|
243
|
+
CV_INTER_CUBIC =2,
|
244
|
+
CV_INTER_AREA =3,
|
245
|
+
CV_INTER_LANCZOS4 =4
|
246
|
+
};
|
247
|
+
|
248
|
+
/* ... and other image warping flags */
|
249
|
+
enum
|
250
|
+
{
|
251
|
+
CV_WARP_FILL_OUTLIERS =8,
|
252
|
+
CV_WARP_INVERSE_MAP =16
|
253
|
+
};
|
254
|
+
|
255
|
+
/* Shapes of a structuring element for morphological operations */
|
256
|
+
enum
|
257
|
+
{
|
258
|
+
CV_SHAPE_RECT =0,
|
259
|
+
CV_SHAPE_CROSS =1,
|
260
|
+
CV_SHAPE_ELLIPSE =2,
|
261
|
+
CV_SHAPE_CUSTOM =100
|
262
|
+
};
|
263
|
+
|
264
|
+
/* Morphological operations */
|
265
|
+
enum
|
266
|
+
{
|
267
|
+
CV_MOP_ERODE =0,
|
268
|
+
CV_MOP_DILATE =1,
|
269
|
+
CV_MOP_OPEN =2,
|
270
|
+
CV_MOP_CLOSE =3,
|
271
|
+
CV_MOP_GRADIENT =4,
|
272
|
+
CV_MOP_TOPHAT =5,
|
273
|
+
CV_MOP_BLACKHAT =6
|
274
|
+
};
|
275
|
+
|
276
|
+
/* Spatial and central moments */
|
277
|
+
typedef struct CvMoments
|
278
|
+
{
|
279
|
+
double m00, m10, m01, m20, m11, m02, m30, m21, m12, m03; /* spatial moments */
|
280
|
+
double mu20, mu11, mu02, mu30, mu21, mu12, mu03; /* central moments */
|
281
|
+
double inv_sqrt_m00; /* m00 != 0 ? 1/sqrt(m00) : 0 */
|
282
|
+
}
|
283
|
+
CvMoments;
|
284
|
+
|
285
|
+
/* Hu invariants */
|
286
|
+
typedef struct CvHuMoments
|
287
|
+
{
|
288
|
+
double hu1, hu2, hu3, hu4, hu5, hu6, hu7; /* Hu invariants */
|
289
|
+
}
|
290
|
+
CvHuMoments;
|
291
|
+
|
292
|
+
/* Template matching methods */
|
293
|
+
enum
|
294
|
+
{
|
295
|
+
CV_TM_SQDIFF =0,
|
296
|
+
CV_TM_SQDIFF_NORMED =1,
|
297
|
+
CV_TM_CCORR =2,
|
298
|
+
CV_TM_CCORR_NORMED =3,
|
299
|
+
CV_TM_CCOEFF =4,
|
300
|
+
CV_TM_CCOEFF_NORMED =5
|
301
|
+
};
|
302
|
+
|
303
|
+
typedef float (CV_CDECL * CvDistanceFunction)( const float* a, const float* b, void* user_param );
|
304
|
+
|
305
|
+
/* Contour retrieval modes */
|
306
|
+
enum
|
307
|
+
{
|
308
|
+
CV_RETR_EXTERNAL=0,
|
309
|
+
CV_RETR_LIST=1,
|
310
|
+
CV_RETR_CCOMP=2,
|
311
|
+
CV_RETR_TREE=3
|
312
|
+
};
|
313
|
+
|
314
|
+
/* Contour approximation methods */
|
315
|
+
enum
|
316
|
+
{
|
317
|
+
CV_CHAIN_CODE=0,
|
318
|
+
CV_CHAIN_APPROX_NONE=1,
|
319
|
+
CV_CHAIN_APPROX_SIMPLE=2,
|
320
|
+
CV_CHAIN_APPROX_TC89_L1=3,
|
321
|
+
CV_CHAIN_APPROX_TC89_KCOS=4,
|
322
|
+
CV_LINK_RUNS=5
|
323
|
+
};
|
324
|
+
|
325
|
+
/*
|
326
|
+
Internal structure that is used for sequental retrieving contours from the image.
|
327
|
+
It supports both hierarchical and plane variants of Suzuki algorithm.
|
328
|
+
*/
|
329
|
+
typedef struct _CvContourScanner* CvContourScanner;
|
330
|
+
|
331
|
+
/* Freeman chain reader state */
|
332
|
+
typedef struct CvChainPtReader
|
333
|
+
{
|
334
|
+
CV_SEQ_READER_FIELDS()
|
335
|
+
char code;
|
336
|
+
CvPoint pt;
|
337
|
+
schar deltas[8][2];
|
338
|
+
}
|
339
|
+
CvChainPtReader;
|
340
|
+
|
341
|
+
/* initializes 8-element array for fast access to 3x3 neighborhood of a pixel */
|
342
|
+
#define CV_INIT_3X3_DELTAS( deltas, step, nch ) \
|
343
|
+
((deltas)[0] = (nch), (deltas)[1] = -(step) + (nch), \
|
344
|
+
(deltas)[2] = -(step), (deltas)[3] = -(step) - (nch), \
|
345
|
+
(deltas)[4] = -(nch), (deltas)[5] = (step) - (nch), \
|
346
|
+
(deltas)[6] = (step), (deltas)[7] = (step) + (nch))
|
347
|
+
|
348
|
+
|
349
|
+
/****************************************************************************************\
|
350
|
+
* Planar subdivisions *
|
351
|
+
\****************************************************************************************/
|
352
|
+
|
353
|
+
typedef size_t CvSubdiv2DEdge;
|
354
|
+
|
355
|
+
#define CV_QUADEDGE2D_FIELDS() \
|
356
|
+
int flags; \
|
357
|
+
struct CvSubdiv2DPoint* pt[4]; \
|
358
|
+
CvSubdiv2DEdge next[4];
|
359
|
+
|
360
|
+
#define CV_SUBDIV2D_POINT_FIELDS()\
|
361
|
+
int flags; \
|
362
|
+
CvSubdiv2DEdge first; \
|
363
|
+
CvPoint2D32f pt; \
|
364
|
+
int id;
|
365
|
+
|
366
|
+
#define CV_SUBDIV2D_VIRTUAL_POINT_FLAG (1 << 30)
|
367
|
+
|
368
|
+
typedef struct CvQuadEdge2D
|
369
|
+
{
|
370
|
+
CV_QUADEDGE2D_FIELDS()
|
371
|
+
}
|
372
|
+
CvQuadEdge2D;
|
373
|
+
|
374
|
+
typedef struct CvSubdiv2DPoint
|
375
|
+
{
|
376
|
+
CV_SUBDIV2D_POINT_FIELDS()
|
377
|
+
}
|
378
|
+
CvSubdiv2DPoint;
|
379
|
+
|
380
|
+
#define CV_SUBDIV2D_FIELDS() \
|
381
|
+
CV_GRAPH_FIELDS() \
|
382
|
+
int quad_edges; \
|
383
|
+
int is_geometry_valid; \
|
384
|
+
CvSubdiv2DEdge recent_edge; \
|
385
|
+
CvPoint2D32f topleft; \
|
386
|
+
CvPoint2D32f bottomright;
|
387
|
+
|
388
|
+
typedef struct CvSubdiv2D
|
389
|
+
{
|
390
|
+
CV_SUBDIV2D_FIELDS()
|
391
|
+
}
|
392
|
+
CvSubdiv2D;
|
393
|
+
|
394
|
+
|
395
|
+
typedef enum CvSubdiv2DPointLocation
|
396
|
+
{
|
397
|
+
CV_PTLOC_ERROR = -2,
|
398
|
+
CV_PTLOC_OUTSIDE_RECT = -1,
|
399
|
+
CV_PTLOC_INSIDE = 0,
|
400
|
+
CV_PTLOC_VERTEX = 1,
|
401
|
+
CV_PTLOC_ON_EDGE = 2
|
402
|
+
}
|
403
|
+
CvSubdiv2DPointLocation;
|
404
|
+
|
405
|
+
typedef enum CvNextEdgeType
|
406
|
+
{
|
407
|
+
CV_NEXT_AROUND_ORG = 0x00,
|
408
|
+
CV_NEXT_AROUND_DST = 0x22,
|
409
|
+
CV_PREV_AROUND_ORG = 0x11,
|
410
|
+
CV_PREV_AROUND_DST = 0x33,
|
411
|
+
CV_NEXT_AROUND_LEFT = 0x13,
|
412
|
+
CV_NEXT_AROUND_RIGHT = 0x31,
|
413
|
+
CV_PREV_AROUND_LEFT = 0x20,
|
414
|
+
CV_PREV_AROUND_RIGHT = 0x02
|
415
|
+
}
|
416
|
+
CvNextEdgeType;
|
417
|
+
|
418
|
+
/* get the next edge with the same origin point (counterwise) */
|
419
|
+
#define CV_SUBDIV2D_NEXT_EDGE( edge ) (((CvQuadEdge2D*)((edge) & ~3))->next[(edge)&3])
|
420
|
+
|
421
|
+
|
422
|
+
/* Contour approximation algorithms */
|
423
|
+
enum
|
424
|
+
{
|
425
|
+
CV_POLY_APPROX_DP = 0
|
426
|
+
};
|
427
|
+
|
428
|
+
/* Shape matching methods */
|
429
|
+
enum
|
430
|
+
{
|
431
|
+
CV_CONTOURS_MATCH_I1 =1,
|
432
|
+
CV_CONTOURS_MATCH_I2 =2,
|
433
|
+
CV_CONTOURS_MATCH_I3 =3
|
434
|
+
};
|
435
|
+
|
436
|
+
/* Shape orientation */
|
437
|
+
enum
|
438
|
+
{
|
439
|
+
CV_CLOCKWISE =1,
|
440
|
+
CV_COUNTER_CLOCKWISE =2
|
441
|
+
};
|
442
|
+
|
443
|
+
|
444
|
+
/* Convexity defect */
|
445
|
+
typedef struct CvConvexityDefect
|
446
|
+
{
|
447
|
+
CvPoint* start; /* point of the contour where the defect begins */
|
448
|
+
CvPoint* end; /* point of the contour where the defect ends */
|
449
|
+
CvPoint* depth_point; /* the farthest from the convex hull point within the defect */
|
450
|
+
float depth; /* distance between the farthest point and the convex hull */
|
451
|
+
} CvConvexityDefect;
|
452
|
+
|
453
|
+
|
454
|
+
/* Histogram comparison methods */
|
455
|
+
enum
|
456
|
+
{
|
457
|
+
CV_COMP_CORREL =0,
|
458
|
+
CV_COMP_CHISQR =1,
|
459
|
+
CV_COMP_INTERSECT =2,
|
460
|
+
CV_COMP_BHATTACHARYYA =3
|
461
|
+
};
|
462
|
+
|
463
|
+
/* Mask size for distance transform */
|
464
|
+
enum
|
465
|
+
{
|
466
|
+
CV_DIST_MASK_3 =3,
|
467
|
+
CV_DIST_MASK_5 =5,
|
468
|
+
CV_DIST_MASK_PRECISE =0
|
469
|
+
};
|
470
|
+
|
471
|
+
/* Distance types for Distance Transform and M-estimators */
|
472
|
+
enum
|
473
|
+
{
|
474
|
+
CV_DIST_USER =-1, /* User defined distance */
|
475
|
+
CV_DIST_L1 =1, /* distance = |x1-x2| + |y1-y2| */
|
476
|
+
CV_DIST_L2 =2, /* the simple euclidean distance */
|
477
|
+
CV_DIST_C =3, /* distance = max(|x1-x2|,|y1-y2|) */
|
478
|
+
CV_DIST_L12 =4, /* L1-L2 metric: distance = 2(sqrt(1+x*x/2) - 1)) */
|
479
|
+
CV_DIST_FAIR =5, /* distance = c^2(|x|/c-log(1+|x|/c)), c = 1.3998 */
|
480
|
+
CV_DIST_WELSCH =6, /* distance = c^2/2(1-exp(-(x/c)^2)), c = 2.9846 */
|
481
|
+
CV_DIST_HUBER =7 /* distance = |x|<c ? x^2/2 : c(|x|-c/2), c=1.345 */
|
482
|
+
};
|
483
|
+
|
484
|
+
|
485
|
+
/* Threshold types */
|
486
|
+
enum
|
487
|
+
{
|
488
|
+
CV_THRESH_BINARY =0, /* value = value > threshold ? max_value : 0 */
|
489
|
+
CV_THRESH_BINARY_INV =1, /* value = value > threshold ? 0 : max_value */
|
490
|
+
CV_THRESH_TRUNC =2, /* value = value > threshold ? threshold : value */
|
491
|
+
CV_THRESH_TOZERO =3, /* value = value > threshold ? value : 0 */
|
492
|
+
CV_THRESH_TOZERO_INV =4, /* value = value > threshold ? 0 : value */
|
493
|
+
CV_THRESH_MASK =7,
|
494
|
+
CV_THRESH_OTSU =8 /* use Otsu algorithm to choose the optimal threshold value;
|
495
|
+
combine the flag with one of the above CV_THRESH_* values */
|
496
|
+
};
|
497
|
+
|
498
|
+
/* Adaptive threshold methods */
|
499
|
+
enum
|
500
|
+
{
|
501
|
+
CV_ADAPTIVE_THRESH_MEAN_C =0,
|
502
|
+
CV_ADAPTIVE_THRESH_GAUSSIAN_C =1
|
503
|
+
};
|
504
|
+
|
505
|
+
/* FloodFill flags */
|
506
|
+
enum
|
507
|
+
{
|
508
|
+
CV_FLOODFILL_FIXED_RANGE =(1 << 16),
|
509
|
+
CV_FLOODFILL_MASK_ONLY =(1 << 17)
|
510
|
+
};
|
511
|
+
|
512
|
+
|
513
|
+
/* Canny edge detector flags */
|
514
|
+
enum
|
515
|
+
{
|
516
|
+
CV_CANNY_L2_GRADIENT =(1 << 31)
|
517
|
+
};
|
518
|
+
|
519
|
+
/* Variants of a Hough transform */
|
520
|
+
enum
|
521
|
+
{
|
522
|
+
CV_HOUGH_STANDARD =0,
|
523
|
+
CV_HOUGH_PROBABILISTIC =1,
|
524
|
+
CV_HOUGH_MULTI_SCALE =2,
|
525
|
+
CV_HOUGH_GRADIENT =3
|
526
|
+
};
|
527
|
+
|
528
|
+
|
529
|
+
/* Fast search data structures */
|
530
|
+
struct CvFeatureTree;
|
531
|
+
struct CvLSH;
|
532
|
+
struct CvLSHOperations;
|
533
|
+
|
534
|
+
#ifdef __cplusplus
|
535
|
+
}
|
536
|
+
#endif
|
537
|
+
|
538
|
+
#endif
|