include/opencv2/imgproc/types_c.h
Go to the documentation of this file.
00001 /*M///////////////////////////////////////////////////////////////////////////////////////
00002 //
00003 //  IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
00004 //
00005 //  By downloading, copying, installing or using the software you agree to this license.
00006 //  If you do not agree to this license, do not download, install,
00007 //  copy or use the software.
00008 //
00009 //
00010 //                           License Agreement
00011 //                For Open Source Computer Vision Library
00012 //
00013 // Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
00014 // Copyright (C) 2009, Willow Garage Inc., all rights reserved.
00015 // Third party copyrights are property of their respective owners.
00016 //
00017 // Redistribution and use in source and binary forms, with or without modification,
00018 // are permitted provided that the following conditions are met:
00019 //
00020 //   * Redistribution's of source code must retain the above copyright notice,
00021 //     this list of conditions and the following disclaimer.
00022 //
00023 //   * Redistribution's in binary form must reproduce the above copyright notice,
00024 //     this list of conditions and the following disclaimer in the documentation
00025 //     and/or other materials provided with the distribution.
00026 //
00027 //   * The name of the copyright holders may not be used to endorse or promote products
00028 //     derived from this software without specific prior written permission.
00029 //
00030 // This software is provided by the copyright holders and contributors "as is" and
00031 // any express or implied warranties, including, but not limited to, the implied
00032 // warranties of merchantability and fitness for a particular purpose are disclaimed.
00033 // In no event shall the Intel Corporation or contributors be liable for any direct,
00034 // indirect, incidental, special, exemplary, or consequential damages
00035 // (including, but not limited to, procurement of substitute goods or services;
00036 // loss of use, data, or profits; or business interruption) however caused
00037 // and on any theory of liability, whether in contract, strict liability,
00038 // or tort (including negligence or otherwise) arising in any way out of
00039 // the use of this software, even if advised of the possibility of such damage.
00040 //
00041 //M*/
00042 
00043 #ifndef __OPENCV_IMGPROC_TYPES_C_H__
00044 #define __OPENCV_IMGPROC_TYPES_C_H__
00045 
00046 #include "opencv2/core/core_c.h"
00047 
00048 #ifdef __cplusplus
00049 extern "C" {
00050 #endif
00051 
00052 /* Connected component structure */
00053 typedef struct CvConnectedComp
00054 {
00055     double area;    /* area of the connected component  */
00056     CvScalar value; /* average color of the connected component */
00057     CvRect rect;    /* ROI of the component  */
00058     CvSeq* contour; /* optional component boundary
00059                       (the contour might have child contours corresponding to the holes)*/
00060 }
00061 CvConnectedComp;
00062 
00063 /* Image smooth methods */
00064 enum
00065 {
00066     CV_BLUR_NO_SCALE =0,
00067     CV_BLUR  =1,
00068     CV_GAUSSIAN  =2,
00069     CV_MEDIAN =3,
00070     CV_BILATERAL =4
00071 };
00072 
00073 /* Filters used in pyramid decomposition */
00074 enum
00075 {
00076     CV_GAUSSIAN_5x5 = 7
00077 };
00078 
00079 /* Special filters */
00080 enum
00081 {
00082     CV_SCHARR =-1,
00083     CV_MAX_SOBEL_KSIZE =7
00084 };
00085 
00086 /* Constants for color conversion */
00087 enum
00088 {
00089     CV_BGR2BGRA    =0,
00090     CV_RGB2RGBA    =CV_BGR2BGRA,
00091 
00092     CV_BGRA2BGR    =1,
00093     CV_RGBA2RGB    =CV_BGRA2BGR,
00094 
00095     CV_BGR2RGBA    =2,
00096     CV_RGB2BGRA    =CV_BGR2RGBA,
00097 
00098     CV_RGBA2BGR    =3,
00099     CV_BGRA2RGB    =CV_RGBA2BGR,
00100 
00101     CV_BGR2RGB     =4,
00102     CV_RGB2BGR     =CV_BGR2RGB,
00103 
00104     CV_BGRA2RGBA   =5,
00105     CV_RGBA2BGRA   =CV_BGRA2RGBA,
00106 
00107     CV_BGR2GRAY    =6,
00108     CV_RGB2GRAY    =7,
00109     CV_GRAY2BGR    =8,
00110     CV_GRAY2RGB    =CV_GRAY2BGR,
00111     CV_GRAY2BGRA   =9,
00112     CV_GRAY2RGBA   =CV_GRAY2BGRA,
00113     CV_BGRA2GRAY   =10,
00114     CV_RGBA2GRAY   =11,
00115 
00116     CV_BGR2BGR565  =12,
00117     CV_RGB2BGR565  =13,
00118     CV_BGR5652BGR  =14,
00119     CV_BGR5652RGB  =15,
00120     CV_BGRA2BGR565 =16,
00121     CV_RGBA2BGR565 =17,
00122     CV_BGR5652BGRA =18,
00123     CV_BGR5652RGBA =19,
00124 
00125     CV_GRAY2BGR565 =20,
00126     CV_BGR5652GRAY =21,
00127 
00128     CV_BGR2BGR555  =22,
00129     CV_RGB2BGR555  =23,
00130     CV_BGR5552BGR  =24,
00131     CV_BGR5552RGB  =25,
00132     CV_BGRA2BGR555 =26,
00133     CV_RGBA2BGR555 =27,
00134     CV_BGR5552BGRA =28,
00135     CV_BGR5552RGBA =29,
00136 
00137     CV_GRAY2BGR555 =30,
00138     CV_BGR5552GRAY =31,
00139 
00140     CV_BGR2XYZ     =32,
00141     CV_RGB2XYZ     =33,
00142     CV_XYZ2BGR     =34,
00143     CV_XYZ2RGB     =35,
00144 
00145     CV_BGR2YCrCb   =36,
00146     CV_RGB2YCrCb   =37,
00147     CV_YCrCb2BGR   =38,
00148     CV_YCrCb2RGB   =39,
00149 
00150     CV_BGR2HSV     =40,
00151     CV_RGB2HSV     =41,
00152 
00153     CV_BGR2Lab     =44,
00154     CV_RGB2Lab     =45,
00155 
00156     CV_BayerBG2BGR =46,
00157     CV_BayerGB2BGR =47,
00158     CV_BayerRG2BGR =48,
00159     CV_BayerGR2BGR =49,
00160 
00161     CV_BayerBG2RGB =CV_BayerRG2BGR,
00162     CV_BayerGB2RGB =CV_BayerGR2BGR,
00163     CV_BayerRG2RGB =CV_BayerBG2BGR,
00164     CV_BayerGR2RGB =CV_BayerGB2BGR,
00165 
00166     CV_BGR2Luv     =50,
00167     CV_RGB2Luv     =51,
00168     CV_BGR2HLS     =52,
00169     CV_RGB2HLS     =53,
00170 
00171     CV_HSV2BGR     =54,
00172     CV_HSV2RGB     =55,
00173 
00174     CV_Lab2BGR     =56,
00175     CV_Lab2RGB     =57,
00176     CV_Luv2BGR     =58,
00177     CV_Luv2RGB     =59,
00178     CV_HLS2BGR     =60,
00179     CV_HLS2RGB     =61,
00180 
00181     CV_BayerBG2BGR_VNG =62,
00182     CV_BayerGB2BGR_VNG =63,
00183     CV_BayerRG2BGR_VNG =64,
00184     CV_BayerGR2BGR_VNG =65,
00185 
00186     CV_BayerBG2RGB_VNG =CV_BayerRG2BGR_VNG,
00187     CV_BayerGB2RGB_VNG =CV_BayerGR2BGR_VNG,
00188     CV_BayerRG2RGB_VNG =CV_BayerBG2BGR_VNG,
00189     CV_BayerGR2RGB_VNG =CV_BayerGB2BGR_VNG,
00190 
00191     CV_BGR2HSV_FULL = 66,
00192     CV_RGB2HSV_FULL = 67,
00193     CV_BGR2HLS_FULL = 68,
00194     CV_RGB2HLS_FULL = 69,
00195 
00196     CV_HSV2BGR_FULL = 70,
00197     CV_HSV2RGB_FULL = 71,
00198     CV_HLS2BGR_FULL = 72,
00199     CV_HLS2RGB_FULL = 73,
00200 
00201     CV_LBGR2Lab     = 74,
00202     CV_LRGB2Lab     = 75,
00203     CV_LBGR2Luv     = 76,
00204     CV_LRGB2Luv     = 77,
00205 
00206     CV_Lab2LBGR     = 78,
00207     CV_Lab2LRGB     = 79,
00208     CV_Luv2LBGR     = 80,
00209     CV_Luv2LRGB     = 81,
00210 
00211     CV_BGR2YUV      = 82,
00212     CV_RGB2YUV      = 83,
00213     CV_YUV2BGR      = 84,
00214     CV_YUV2RGB      = 85,
00215 
00216     CV_BayerBG2GRAY = 86,
00217     CV_BayerGB2GRAY = 87,
00218     CV_BayerRG2GRAY = 88,
00219     CV_BayerGR2GRAY = 89,
00220 
00221     //YUV 4:2:0 formats family
00222     CV_YUV2RGB_NV12 = 90,
00223     CV_YUV2BGR_NV12 = 91,
00224     CV_YUV2RGB_NV21 = 92,
00225     CV_YUV2BGR_NV21 = 93,
00226     CV_YUV420sp2RGB = CV_YUV2RGB_NV21,
00227     CV_YUV420sp2BGR = CV_YUV2BGR_NV21,
00228 
00229     CV_YUV2RGBA_NV12 = 94,
00230     CV_YUV2BGRA_NV12 = 95,
00231     CV_YUV2RGBA_NV21 = 96,
00232     CV_YUV2BGRA_NV21 = 97,
00233     CV_YUV420sp2RGBA = CV_YUV2RGBA_NV21,
00234     CV_YUV420sp2BGRA = CV_YUV2BGRA_NV21,
00235 
00236     CV_YUV2RGB_YV12 = 98,
00237     CV_YUV2BGR_YV12 = 99,
00238     CV_YUV2RGB_IYUV = 100,
00239     CV_YUV2BGR_IYUV = 101,
00240     CV_YUV2RGB_I420 = CV_YUV2RGB_IYUV,
00241     CV_YUV2BGR_I420 = CV_YUV2BGR_IYUV,
00242     CV_YUV420p2RGB = CV_YUV2RGB_YV12,
00243     CV_YUV420p2BGR = CV_YUV2BGR_YV12,
00244 
00245     CV_YUV2RGBA_YV12 = 102,
00246     CV_YUV2BGRA_YV12 = 103,
00247     CV_YUV2RGBA_IYUV = 104,
00248     CV_YUV2BGRA_IYUV = 105,
00249     CV_YUV2RGBA_I420 = CV_YUV2RGBA_IYUV,
00250     CV_YUV2BGRA_I420 = CV_YUV2BGRA_IYUV,
00251     CV_YUV420p2RGBA = CV_YUV2RGBA_YV12,
00252     CV_YUV420p2BGRA = CV_YUV2BGRA_YV12,
00253 
00254     CV_YUV2GRAY_420 = 106,
00255     CV_YUV2GRAY_NV21 = CV_YUV2GRAY_420,
00256     CV_YUV2GRAY_NV12 = CV_YUV2GRAY_420,
00257     CV_YUV2GRAY_YV12 = CV_YUV2GRAY_420,
00258     CV_YUV2GRAY_IYUV = CV_YUV2GRAY_420,
00259     CV_YUV2GRAY_I420 = CV_YUV2GRAY_420,
00260     CV_YUV420sp2GRAY = CV_YUV2GRAY_420,
00261     CV_YUV420p2GRAY = CV_YUV2GRAY_420,
00262 
00263     //YUV 4:2:2 formats family
00264     CV_YUV2RGB_UYVY = 107,
00265     CV_YUV2BGR_UYVY = 108,
00266     //CV_YUV2RGB_VYUY = 109,
00267     //CV_YUV2BGR_VYUY = 110,
00268     CV_YUV2RGB_Y422 = CV_YUV2RGB_UYVY,
00269     CV_YUV2BGR_Y422 = CV_YUV2BGR_UYVY,
00270     CV_YUV2RGB_UYNV = CV_YUV2RGB_UYVY,
00271     CV_YUV2BGR_UYNV = CV_YUV2BGR_UYVY,
00272 
00273     CV_YUV2RGBA_UYVY = 111,
00274     CV_YUV2BGRA_UYVY = 112,
00275     //CV_YUV2RGBA_VYUY = 113,
00276     //CV_YUV2BGRA_VYUY = 114,
00277     CV_YUV2RGBA_Y422 = CV_YUV2RGBA_UYVY,
00278     CV_YUV2BGRA_Y422 = CV_YUV2BGRA_UYVY,
00279     CV_YUV2RGBA_UYNV = CV_YUV2RGBA_UYVY,
00280     CV_YUV2BGRA_UYNV = CV_YUV2BGRA_UYVY,
00281 
00282     CV_YUV2RGB_YUY2 = 115,
00283     CV_YUV2BGR_YUY2 = 116,
00284     CV_YUV2RGB_YVYU = 117,
00285     CV_YUV2BGR_YVYU = 118,
00286     CV_YUV2RGB_YUYV = CV_YUV2RGB_YUY2,
00287     CV_YUV2BGR_YUYV = CV_YUV2BGR_YUY2,
00288     CV_YUV2RGB_YUNV = CV_YUV2RGB_YUY2,
00289     CV_YUV2BGR_YUNV = CV_YUV2BGR_YUY2,
00290 
00291     CV_YUV2RGBA_YUY2 = 119,
00292     CV_YUV2BGRA_YUY2 = 120,
00293     CV_YUV2RGBA_YVYU = 121,
00294     CV_YUV2BGRA_YVYU = 122,
00295     CV_YUV2RGBA_YUYV = CV_YUV2RGBA_YUY2,
00296     CV_YUV2BGRA_YUYV = CV_YUV2BGRA_YUY2,
00297     CV_YUV2RGBA_YUNV = CV_YUV2RGBA_YUY2,
00298     CV_YUV2BGRA_YUNV = CV_YUV2BGRA_YUY2,
00299 
00300     CV_YUV2GRAY_UYVY = 123,
00301     CV_YUV2GRAY_YUY2 = 124,
00302     //CV_YUV2GRAY_VYUY = CV_YUV2GRAY_UYVY,
00303     CV_YUV2GRAY_Y422 = CV_YUV2GRAY_UYVY,
00304     CV_YUV2GRAY_UYNV = CV_YUV2GRAY_UYVY,
00305     CV_YUV2GRAY_YVYU = CV_YUV2GRAY_YUY2,
00306     CV_YUV2GRAY_YUYV = CV_YUV2GRAY_YUY2,
00307     CV_YUV2GRAY_YUNV = CV_YUV2GRAY_YUY2,
00308 
00309     // alpha premultiplication
00310     CV_RGBA2mRGBA = 125,
00311     CV_mRGBA2RGBA = 126,
00312 
00313     CV_COLORCVT_MAX  = 127
00314 };
00315 
00316 
00317 /* Sub-pixel interpolation methods */
00318 enum
00319 {
00320     CV_INTER_NN        =0,
00321     CV_INTER_LINEAR    =1,
00322     CV_INTER_CUBIC     =2,
00323     CV_INTER_AREA      =3,
00324     CV_INTER_LANCZOS4  =4
00325 };
00326 
00327 /* ... and other image warping flags */
00328 enum
00329 {
00330     CV_WARP_FILL_OUTLIERS =8,
00331     CV_WARP_INVERSE_MAP  =16
00332 };
00333 
00334 /* Shapes of a structuring element for morphological operations */
00335 enum
00336 {
00337     CV_SHAPE_RECT      =0,
00338     CV_SHAPE_CROSS     =1,
00339     CV_SHAPE_ELLIPSE   =2,
00340     CV_SHAPE_CUSTOM    =100
00341 };
00342 
00343 /* Morphological operations */
00344 enum
00345 {
00346     CV_MOP_ERODE        =0,
00347     CV_MOP_DILATE       =1,
00348     CV_MOP_OPEN         =2,
00349     CV_MOP_CLOSE        =3,
00350     CV_MOP_GRADIENT     =4,
00351     CV_MOP_TOPHAT       =5,
00352     CV_MOP_BLACKHAT     =6
00353 };
00354 
00355 /* Spatial and central moments */
00356 typedef struct CvMoments
00357 {
00358     double  m00, m10, m01, m20, m11, m02, m30, m21, m12, m03; /* spatial moments */
00359     double  mu20, mu11, mu02, mu30, mu21, mu12, mu03; /* central moments */
00360     double  inv_sqrt_m00; /* m00 != 0 ? 1/sqrt(m00) : 0 */
00361 }
00362 CvMoments;
00363 
00364 /* Hu invariants */
00365 typedef struct CvHuMoments
00366 {
00367     double hu1, hu2, hu3, hu4, hu5, hu6, hu7; /* Hu invariants */
00368 }
00369 CvHuMoments;
00370 
00371 /* Template matching methods */
00372 enum
00373 {
00374     CV_TM_SQDIFF        =0,
00375     CV_TM_SQDIFF_NORMED =1,
00376     CV_TM_CCORR         =2,
00377     CV_TM_CCORR_NORMED  =3,
00378     CV_TM_CCOEFF        =4,
00379     CV_TM_CCOEFF_NORMED =5
00380 };
00381 
00382 typedef float (CV_CDECL * CvDistanceFunction)( const float* a, const float* b, void* user_param );
00383 
00384 /* Contour retrieval modes */
00385 enum
00386 {
00387     CV_RETR_EXTERNAL=0,
00388     CV_RETR_LIST=1,
00389     CV_RETR_CCOMP=2,
00390     CV_RETR_TREE=3,
00391     CV_RETR_FLOODFILL=4
00392 };
00393 
00394 /* Contour approximation methods */
00395 enum
00396 {
00397     CV_CHAIN_CODE=0,
00398     CV_CHAIN_APPROX_NONE=1,
00399     CV_CHAIN_APPROX_SIMPLE=2,
00400     CV_CHAIN_APPROX_TC89_L1=3,
00401     CV_CHAIN_APPROX_TC89_KCOS=4,
00402     CV_LINK_RUNS=5
00403 };
00404 
00405 /*
00406 Internal structure that is used for sequental retrieving contours from the image.
00407 It supports both hierarchical and plane variants of Suzuki algorithm.
00408 */
00409 typedef struct _CvContourScanner* CvContourScanner;
00410 
00411 /* Freeman chain reader state */
00412 typedef struct CvChainPtReader
00413 {
00414     CV_SEQ_READER_FIELDS()
00415     char      code;
00416     CvPoint   pt;
00417     schar     deltas[8][2];
00418 }
00419 CvChainPtReader;
00420 
00421 /* initializes 8-element array for fast access to 3x3 neighborhood of a pixel */
00422 #define  CV_INIT_3X3_DELTAS( deltas, step, nch )            \
00423     ((deltas)[0] =  (nch),  (deltas)[1] = -(step) + (nch),  \
00424      (deltas)[2] = -(step), (deltas)[3] = -(step) - (nch),  \
00425      (deltas)[4] = -(nch),  (deltas)[5] =  (step) - (nch),  \
00426      (deltas)[6] =  (step), (deltas)[7] =  (step) + (nch))
00427 
00428 
00429 /****************************************************************************************\
00430 *                              Planar subdivisions                                       *
00431 \****************************************************************************************/
00432 
00433 typedef size_t CvSubdiv2DEdge;
00434 
00435 #define CV_QUADEDGE2D_FIELDS()     \
00436     int flags;                     \
00437     struct CvSubdiv2DPoint* pt[4]; \
00438     CvSubdiv2DEdge  next[4];
00439 
00440 #define CV_SUBDIV2D_POINT_FIELDS()\
00441     int            flags;      \
00442     CvSubdiv2DEdge first;      \
00443     CvPoint2D32f   pt;         \
00444     int id;
00445 
00446 #define CV_SUBDIV2D_VIRTUAL_POINT_FLAG (1 << 30)
00447 
00448 typedef struct CvQuadEdge2D
00449 {
00450     CV_QUADEDGE2D_FIELDS()
00451 }
00452 CvQuadEdge2D;
00453 
00454 typedef struct CvSubdiv2DPoint
00455 {
00456     CV_SUBDIV2D_POINT_FIELDS()
00457 }
00458 CvSubdiv2DPoint;
00459 
00460 #define CV_SUBDIV2D_FIELDS()    \
00461     CV_GRAPH_FIELDS()           \
00462     int  quad_edges;            \
00463     int  is_geometry_valid;     \
00464     CvSubdiv2DEdge recent_edge; \
00465     CvPoint2D32f  topleft;      \
00466     CvPoint2D32f  bottomright;
00467 
00468 typedef struct CvSubdiv2D
00469 {
00470     CV_SUBDIV2D_FIELDS()
00471 }
00472 CvSubdiv2D;
00473 
00474 
00475 typedef enum CvSubdiv2DPointLocation
00476 {
00477     CV_PTLOC_ERROR = -2,
00478     CV_PTLOC_OUTSIDE_RECT = -1,
00479     CV_PTLOC_INSIDE = 0,
00480     CV_PTLOC_VERTEX = 1,
00481     CV_PTLOC_ON_EDGE = 2
00482 }
00483 CvSubdiv2DPointLocation;
00484 
00485 typedef enum CvNextEdgeType
00486 {
00487     CV_NEXT_AROUND_ORG   = 0x00,
00488     CV_NEXT_AROUND_DST   = 0x22,
00489     CV_PREV_AROUND_ORG   = 0x11,
00490     CV_PREV_AROUND_DST   = 0x33,
00491     CV_NEXT_AROUND_LEFT  = 0x13,
00492     CV_NEXT_AROUND_RIGHT = 0x31,
00493     CV_PREV_AROUND_LEFT  = 0x20,
00494     CV_PREV_AROUND_RIGHT = 0x02
00495 }
00496 CvNextEdgeType;
00497 
00498 /* get the next edge with the same origin point (counterwise) */
00499 #define  CV_SUBDIV2D_NEXT_EDGE( edge )  (((CvQuadEdge2D*)((edge) & ~3))->next[(edge)&3])
00500 
00501 
00502 /* Contour approximation algorithms */
00503 enum
00504 {
00505     CV_POLY_APPROX_DP = 0
00506 };
00507 
00508 /* Shape matching methods */
00509 enum
00510 {
00511     CV_CONTOURS_MATCH_I1  =1,
00512     CV_CONTOURS_MATCH_I2  =2,
00513     CV_CONTOURS_MATCH_I3  =3
00514 };
00515 
00516 /* Shape orientation */
00517 enum
00518 {
00519     CV_CLOCKWISE         =1,
00520     CV_COUNTER_CLOCKWISE =2
00521 };
00522 
00523 
00524 /* Convexity defect */
00525 typedef struct CvConvexityDefect
00526 {
00527     CvPoint* start; /* point of the contour where the defect begins */
00528     CvPoint* end; /* point of the contour where the defect ends */
00529     CvPoint* depth_point; /* the farthest from the convex hull point within the defect */
00530     float depth; /* distance between the farthest point and the convex hull */
00531 } CvConvexityDefect;
00532 
00533 
00534 /* Histogram comparison methods */
00535 enum
00536 {
00537     CV_COMP_CORREL        =0,
00538     CV_COMP_CHISQR        =1,
00539     CV_COMP_INTERSECT     =2,
00540     CV_COMP_BHATTACHARYYA =3,
00541     CV_COMP_HELLINGER     =CV_COMP_BHATTACHARYYA
00542 };
00543 
00544 /* Mask size for distance transform */
00545 enum
00546 {
00547     CV_DIST_MASK_3   =3,
00548     CV_DIST_MASK_5   =5,
00549     CV_DIST_MASK_PRECISE =0
00550 };
00551 
00552 /* Content of output label array: connected components or pixels */
00553 enum
00554 {
00555   CV_DIST_LABEL_CCOMP = 0,
00556   CV_DIST_LABEL_PIXEL = 1
00557 };
00558 
00559 /* Distance types for Distance Transform and M-estimators */
00560 enum
00561 {
00562     CV_DIST_USER    =-1,  /* User defined distance */
00563     CV_DIST_L1      =1,   /* distance = |x1-x2| + |y1-y2| */
00564     CV_DIST_L2      =2,   /* the simple euclidean distance */
00565     CV_DIST_C       =3,   /* distance = max(|x1-x2|,|y1-y2|) */
00566     CV_DIST_L12     =4,   /* L1-L2 metric: distance = 2(sqrt(1+x*x/2) - 1)) */
00567     CV_DIST_FAIR    =5,   /* distance = c^2(|x|/c-log(1+|x|/c)), c = 1.3998 */
00568     CV_DIST_WELSCH  =6,   /* distance = c^2/2(1-exp(-(x/c)^2)), c = 2.9846 */
00569     CV_DIST_HUBER   =7    /* distance = |x|<c ? x^2/2 : c(|x|-c/2), c=1.345 */
00570 };
00571 
00572 
00573 /* Threshold types */
00574 enum
00575 {
00576     CV_THRESH_BINARY      =0,  /* value = value > threshold ? max_value : 0       */
00577     CV_THRESH_BINARY_INV  =1,  /* value = value > threshold ? 0 : max_value       */
00578     CV_THRESH_TRUNC       =2,  /* value = value > threshold ? threshold : value   */
00579     CV_THRESH_TOZERO      =3,  /* value = value > threshold ? value : 0           */
00580     CV_THRESH_TOZERO_INV  =4,  /* value = value > threshold ? 0 : value           */
00581     CV_THRESH_MASK        =7,
00582     CV_THRESH_OTSU        =8  /* use Otsu algorithm to choose the optimal threshold value;
00583                                  combine the flag with one of the above CV_THRESH_* values */
00584 };
00585 
00586 /* Adaptive threshold methods */
00587 enum
00588 {
00589     CV_ADAPTIVE_THRESH_MEAN_C  =0,
00590     CV_ADAPTIVE_THRESH_GAUSSIAN_C  =1
00591 };
00592 
00593 /* FloodFill flags */
00594 enum
00595 {
00596     CV_FLOODFILL_FIXED_RANGE =(1 << 16),
00597     CV_FLOODFILL_MASK_ONLY   =(1 << 17)
00598 };
00599 
00600 
00601 /* Canny edge detector flags */
00602 enum
00603 {
00604     CV_CANNY_L2_GRADIENT  =(1 << 31)
00605 };
00606 
00607 /* Variants of a Hough transform */
00608 enum
00609 {
00610     CV_HOUGH_STANDARD =0,
00611     CV_HOUGH_PROBABILISTIC =1,
00612     CV_HOUGH_MULTI_SCALE =2,
00613     CV_HOUGH_GRADIENT =3
00614 };
00615 
00616 
00617 /* Fast search data structures  */
00618 struct CvFeatureTree;
00619 struct CvLSH;
00620 struct CvLSHOperations;
00621 
00622 #ifdef __cplusplus
00623 }
00624 #endif
00625 
00626 #endif