opencv on mbed

Dependencies:   mbed

Committer:
joeverbout
Date:
Thu Mar 31 21:16:38 2016 +0000
Revision:
0:ea44dc9ed014
OpenCV on mbed attempt

Who changed what in which revision?

UserRevisionLine numberNew contents of line
joeverbout 0:ea44dc9ed014 1 /*M///////////////////////////////////////////////////////////////////////////////////////
joeverbout 0:ea44dc9ed014 2 //
joeverbout 0:ea44dc9ed014 3 // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
joeverbout 0:ea44dc9ed014 4 //
joeverbout 0:ea44dc9ed014 5 // By downloading, copying, installing or using the software you agree to this license.
joeverbout 0:ea44dc9ed014 6 // If you do not agree to this license, do not download, install,
joeverbout 0:ea44dc9ed014 7 // copy or use the software.
joeverbout 0:ea44dc9ed014 8 //
joeverbout 0:ea44dc9ed014 9 //
joeverbout 0:ea44dc9ed014 10 // License Agreement
joeverbout 0:ea44dc9ed014 11 // For Open Source Computer Vision Library
joeverbout 0:ea44dc9ed014 12 //
joeverbout 0:ea44dc9ed014 13 // Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
joeverbout 0:ea44dc9ed014 14 // Copyright (C) 2009, Willow Garage Inc., all rights reserved.
joeverbout 0:ea44dc9ed014 15 // Third party copyrights are property of their respective owners.
joeverbout 0:ea44dc9ed014 16 //
joeverbout 0:ea44dc9ed014 17 // Redistribution and use in source and binary forms, with or without modification,
joeverbout 0:ea44dc9ed014 18 // are permitted provided that the following conditions are met:
joeverbout 0:ea44dc9ed014 19 //
joeverbout 0:ea44dc9ed014 20 // * Redistribution's of source code must retain the above copyright notice,
joeverbout 0:ea44dc9ed014 21 // this list of conditions and the following disclaimer.
joeverbout 0:ea44dc9ed014 22 //
joeverbout 0:ea44dc9ed014 23 // * Redistribution's in binary form must reproduce the above copyright notice,
joeverbout 0:ea44dc9ed014 24 // this list of conditions and the following disclaimer in the documentation
joeverbout 0:ea44dc9ed014 25 // and/or other materials provided with the distribution.
joeverbout 0:ea44dc9ed014 26 //
joeverbout 0:ea44dc9ed014 27 // * The name of the copyright holders may not be used to endorse or promote products
joeverbout 0:ea44dc9ed014 28 // derived from this software without specific prior written permission.
joeverbout 0:ea44dc9ed014 29 //
joeverbout 0:ea44dc9ed014 30 // This software is provided by the copyright holders and contributors "as is" and
joeverbout 0:ea44dc9ed014 31 // any express or implied warranties, including, but not limited to, the implied
joeverbout 0:ea44dc9ed014 32 // warranties of merchantability and fitness for a particular purpose are disclaimed.
joeverbout 0:ea44dc9ed014 33 // In no event shall the Intel Corporation or contributors be liable for any direct,
joeverbout 0:ea44dc9ed014 34 // indirect, incidental, special, exemplary, or consequential damages
joeverbout 0:ea44dc9ed014 35 // (including, but not limited to, procurement of substitute goods or services;
joeverbout 0:ea44dc9ed014 36 // loss of use, data, or profits; or business interruption) however caused
joeverbout 0:ea44dc9ed014 37 // and on any theory of liability, whether in contract, strict liability,
joeverbout 0:ea44dc9ed014 38 // or tort (including negligence or otherwise) arising in any way out of
joeverbout 0:ea44dc9ed014 39 // the use of this software, even if advised of the possibility of such damage.
joeverbout 0:ea44dc9ed014 40 //
joeverbout 0:ea44dc9ed014 41 //M*/
joeverbout 0:ea44dc9ed014 42
joeverbout 0:ea44dc9ed014 43 #ifndef __OPENCV_IMGPROC_TYPES_C_H__
joeverbout 0:ea44dc9ed014 44 #define __OPENCV_IMGPROC_TYPES_C_H__
joeverbout 0:ea44dc9ed014 45
joeverbout 0:ea44dc9ed014 46 #include "opencv2/core/core_c.h"
joeverbout 0:ea44dc9ed014 47
joeverbout 0:ea44dc9ed014 48 #ifdef __cplusplus
joeverbout 0:ea44dc9ed014 49 extern "C" {
joeverbout 0:ea44dc9ed014 50 #endif
joeverbout 0:ea44dc9ed014 51
joeverbout 0:ea44dc9ed014 52 /** @addtogroup imgproc_c
joeverbout 0:ea44dc9ed014 53 @{
joeverbout 0:ea44dc9ed014 54 */
joeverbout 0:ea44dc9ed014 55
joeverbout 0:ea44dc9ed014 56 /** Connected component structure */
joeverbout 0:ea44dc9ed014 57 typedef struct CvConnectedComp
joeverbout 0:ea44dc9ed014 58 {
joeverbout 0:ea44dc9ed014 59 double area; /**<area of the connected component */
joeverbout 0:ea44dc9ed014 60 CvScalar value; /**<average color of the connected component */
joeverbout 0:ea44dc9ed014 61 CvRect rect; /**<ROI of the component */
joeverbout 0:ea44dc9ed014 62 CvSeq* contour; /**<optional component boundary
joeverbout 0:ea44dc9ed014 63 (the contour might have child contours corresponding to the holes)*/
joeverbout 0:ea44dc9ed014 64 }
joeverbout 0:ea44dc9ed014 65 CvConnectedComp;
joeverbout 0:ea44dc9ed014 66
joeverbout 0:ea44dc9ed014 67 /** Image smooth methods */
joeverbout 0:ea44dc9ed014 68 enum SmoothMethod_c
joeverbout 0:ea44dc9ed014 69 {
joeverbout 0:ea44dc9ed014 70 /** linear convolution with \f$\texttt{size1}\times\texttt{size2}\f$ box kernel (all 1's). If
joeverbout 0:ea44dc9ed014 71 you want to smooth different pixels with different-size box kernels, you can use the integral
joeverbout 0:ea44dc9ed014 72 image that is computed using integral */
joeverbout 0:ea44dc9ed014 73 CV_BLUR_NO_SCALE =0,
joeverbout 0:ea44dc9ed014 74 /** linear convolution with \f$\texttt{size1}\times\texttt{size2}\f$ box kernel (all
joeverbout 0:ea44dc9ed014 75 1's) with subsequent scaling by \f$1/(\texttt{size1}\cdot\texttt{size2})\f$ */
joeverbout 0:ea44dc9ed014 76 CV_BLUR =1,
joeverbout 0:ea44dc9ed014 77 /** linear convolution with a \f$\texttt{size1}\times\texttt{size2}\f$ Gaussian kernel */
joeverbout 0:ea44dc9ed014 78 CV_GAUSSIAN =2,
joeverbout 0:ea44dc9ed014 79 /** median filter with a \f$\texttt{size1}\times\texttt{size1}\f$ square aperture */
joeverbout 0:ea44dc9ed014 80 CV_MEDIAN =3,
joeverbout 0:ea44dc9ed014 81 /** bilateral filter with a \f$\texttt{size1}\times\texttt{size1}\f$ square aperture, color
joeverbout 0:ea44dc9ed014 82 sigma= sigma1 and spatial sigma= sigma2. If size1=0, the aperture square side is set to
joeverbout 0:ea44dc9ed014 83 cvRound(sigma2\*1.5)\*2+1. See cv::bilateralFilter */
joeverbout 0:ea44dc9ed014 84 CV_BILATERAL =4
joeverbout 0:ea44dc9ed014 85 };
joeverbout 0:ea44dc9ed014 86
joeverbout 0:ea44dc9ed014 87 /** Filters used in pyramid decomposition */
joeverbout 0:ea44dc9ed014 88 enum
joeverbout 0:ea44dc9ed014 89 {
joeverbout 0:ea44dc9ed014 90 CV_GAUSSIAN_5x5 = 7
joeverbout 0:ea44dc9ed014 91 };
joeverbout 0:ea44dc9ed014 92
joeverbout 0:ea44dc9ed014 93 /** Special filters */
joeverbout 0:ea44dc9ed014 94 enum
joeverbout 0:ea44dc9ed014 95 {
joeverbout 0:ea44dc9ed014 96 CV_SCHARR =-1,
joeverbout 0:ea44dc9ed014 97 CV_MAX_SOBEL_KSIZE =7
joeverbout 0:ea44dc9ed014 98 };
joeverbout 0:ea44dc9ed014 99
joeverbout 0:ea44dc9ed014 100 /** Constants for color conversion */
joeverbout 0:ea44dc9ed014 101 enum
joeverbout 0:ea44dc9ed014 102 {
joeverbout 0:ea44dc9ed014 103 CV_BGR2BGRA =0,
joeverbout 0:ea44dc9ed014 104 CV_RGB2RGBA =CV_BGR2BGRA,
joeverbout 0:ea44dc9ed014 105
joeverbout 0:ea44dc9ed014 106 CV_BGRA2BGR =1,
joeverbout 0:ea44dc9ed014 107 CV_RGBA2RGB =CV_BGRA2BGR,
joeverbout 0:ea44dc9ed014 108
joeverbout 0:ea44dc9ed014 109 CV_BGR2RGBA =2,
joeverbout 0:ea44dc9ed014 110 CV_RGB2BGRA =CV_BGR2RGBA,
joeverbout 0:ea44dc9ed014 111
joeverbout 0:ea44dc9ed014 112 CV_RGBA2BGR =3,
joeverbout 0:ea44dc9ed014 113 CV_BGRA2RGB =CV_RGBA2BGR,
joeverbout 0:ea44dc9ed014 114
joeverbout 0:ea44dc9ed014 115 CV_BGR2RGB =4,
joeverbout 0:ea44dc9ed014 116 CV_RGB2BGR =CV_BGR2RGB,
joeverbout 0:ea44dc9ed014 117
joeverbout 0:ea44dc9ed014 118 CV_BGRA2RGBA =5,
joeverbout 0:ea44dc9ed014 119 CV_RGBA2BGRA =CV_BGRA2RGBA,
joeverbout 0:ea44dc9ed014 120
joeverbout 0:ea44dc9ed014 121 CV_BGR2GRAY =6,
joeverbout 0:ea44dc9ed014 122 CV_RGB2GRAY =7,
joeverbout 0:ea44dc9ed014 123 CV_GRAY2BGR =8,
joeverbout 0:ea44dc9ed014 124 CV_GRAY2RGB =CV_GRAY2BGR,
joeverbout 0:ea44dc9ed014 125 CV_GRAY2BGRA =9,
joeverbout 0:ea44dc9ed014 126 CV_GRAY2RGBA =CV_GRAY2BGRA,
joeverbout 0:ea44dc9ed014 127 CV_BGRA2GRAY =10,
joeverbout 0:ea44dc9ed014 128 CV_RGBA2GRAY =11,
joeverbout 0:ea44dc9ed014 129
joeverbout 0:ea44dc9ed014 130 CV_BGR2BGR565 =12,
joeverbout 0:ea44dc9ed014 131 CV_RGB2BGR565 =13,
joeverbout 0:ea44dc9ed014 132 CV_BGR5652BGR =14,
joeverbout 0:ea44dc9ed014 133 CV_BGR5652RGB =15,
joeverbout 0:ea44dc9ed014 134 CV_BGRA2BGR565 =16,
joeverbout 0:ea44dc9ed014 135 CV_RGBA2BGR565 =17,
joeverbout 0:ea44dc9ed014 136 CV_BGR5652BGRA =18,
joeverbout 0:ea44dc9ed014 137 CV_BGR5652RGBA =19,
joeverbout 0:ea44dc9ed014 138
joeverbout 0:ea44dc9ed014 139 CV_GRAY2BGR565 =20,
joeverbout 0:ea44dc9ed014 140 CV_BGR5652GRAY =21,
joeverbout 0:ea44dc9ed014 141
joeverbout 0:ea44dc9ed014 142 CV_BGR2BGR555 =22,
joeverbout 0:ea44dc9ed014 143 CV_RGB2BGR555 =23,
joeverbout 0:ea44dc9ed014 144 CV_BGR5552BGR =24,
joeverbout 0:ea44dc9ed014 145 CV_BGR5552RGB =25,
joeverbout 0:ea44dc9ed014 146 CV_BGRA2BGR555 =26,
joeverbout 0:ea44dc9ed014 147 CV_RGBA2BGR555 =27,
joeverbout 0:ea44dc9ed014 148 CV_BGR5552BGRA =28,
joeverbout 0:ea44dc9ed014 149 CV_BGR5552RGBA =29,
joeverbout 0:ea44dc9ed014 150
joeverbout 0:ea44dc9ed014 151 CV_GRAY2BGR555 =30,
joeverbout 0:ea44dc9ed014 152 CV_BGR5552GRAY =31,
joeverbout 0:ea44dc9ed014 153
joeverbout 0:ea44dc9ed014 154 CV_BGR2XYZ =32,
joeverbout 0:ea44dc9ed014 155 CV_RGB2XYZ =33,
joeverbout 0:ea44dc9ed014 156 CV_XYZ2BGR =34,
joeverbout 0:ea44dc9ed014 157 CV_XYZ2RGB =35,
joeverbout 0:ea44dc9ed014 158
joeverbout 0:ea44dc9ed014 159 CV_BGR2YCrCb =36,
joeverbout 0:ea44dc9ed014 160 CV_RGB2YCrCb =37,
joeverbout 0:ea44dc9ed014 161 CV_YCrCb2BGR =38,
joeverbout 0:ea44dc9ed014 162 CV_YCrCb2RGB =39,
joeverbout 0:ea44dc9ed014 163
joeverbout 0:ea44dc9ed014 164 CV_BGR2HSV =40,
joeverbout 0:ea44dc9ed014 165 CV_RGB2HSV =41,
joeverbout 0:ea44dc9ed014 166
joeverbout 0:ea44dc9ed014 167 CV_BGR2Lab =44,
joeverbout 0:ea44dc9ed014 168 CV_RGB2Lab =45,
joeverbout 0:ea44dc9ed014 169
joeverbout 0:ea44dc9ed014 170 CV_BayerBG2BGR =46,
joeverbout 0:ea44dc9ed014 171 CV_BayerGB2BGR =47,
joeverbout 0:ea44dc9ed014 172 CV_BayerRG2BGR =48,
joeverbout 0:ea44dc9ed014 173 CV_BayerGR2BGR =49,
joeverbout 0:ea44dc9ed014 174
joeverbout 0:ea44dc9ed014 175 CV_BayerBG2RGB =CV_BayerRG2BGR,
joeverbout 0:ea44dc9ed014 176 CV_BayerGB2RGB =CV_BayerGR2BGR,
joeverbout 0:ea44dc9ed014 177 CV_BayerRG2RGB =CV_BayerBG2BGR,
joeverbout 0:ea44dc9ed014 178 CV_BayerGR2RGB =CV_BayerGB2BGR,
joeverbout 0:ea44dc9ed014 179
joeverbout 0:ea44dc9ed014 180 CV_BGR2Luv =50,
joeverbout 0:ea44dc9ed014 181 CV_RGB2Luv =51,
joeverbout 0:ea44dc9ed014 182 CV_BGR2HLS =52,
joeverbout 0:ea44dc9ed014 183 CV_RGB2HLS =53,
joeverbout 0:ea44dc9ed014 184
joeverbout 0:ea44dc9ed014 185 CV_HSV2BGR =54,
joeverbout 0:ea44dc9ed014 186 CV_HSV2RGB =55,
joeverbout 0:ea44dc9ed014 187
joeverbout 0:ea44dc9ed014 188 CV_Lab2BGR =56,
joeverbout 0:ea44dc9ed014 189 CV_Lab2RGB =57,
joeverbout 0:ea44dc9ed014 190 CV_Luv2BGR =58,
joeverbout 0:ea44dc9ed014 191 CV_Luv2RGB =59,
joeverbout 0:ea44dc9ed014 192 CV_HLS2BGR =60,
joeverbout 0:ea44dc9ed014 193 CV_HLS2RGB =61,
joeverbout 0:ea44dc9ed014 194
joeverbout 0:ea44dc9ed014 195 CV_BayerBG2BGR_VNG =62,
joeverbout 0:ea44dc9ed014 196 CV_BayerGB2BGR_VNG =63,
joeverbout 0:ea44dc9ed014 197 CV_BayerRG2BGR_VNG =64,
joeverbout 0:ea44dc9ed014 198 CV_BayerGR2BGR_VNG =65,
joeverbout 0:ea44dc9ed014 199
joeverbout 0:ea44dc9ed014 200 CV_BayerBG2RGB_VNG =CV_BayerRG2BGR_VNG,
joeverbout 0:ea44dc9ed014 201 CV_BayerGB2RGB_VNG =CV_BayerGR2BGR_VNG,
joeverbout 0:ea44dc9ed014 202 CV_BayerRG2RGB_VNG =CV_BayerBG2BGR_VNG,
joeverbout 0:ea44dc9ed014 203 CV_BayerGR2RGB_VNG =CV_BayerGB2BGR_VNG,
joeverbout 0:ea44dc9ed014 204
joeverbout 0:ea44dc9ed014 205 CV_BGR2HSV_FULL = 66,
joeverbout 0:ea44dc9ed014 206 CV_RGB2HSV_FULL = 67,
joeverbout 0:ea44dc9ed014 207 CV_BGR2HLS_FULL = 68,
joeverbout 0:ea44dc9ed014 208 CV_RGB2HLS_FULL = 69,
joeverbout 0:ea44dc9ed014 209
joeverbout 0:ea44dc9ed014 210 CV_HSV2BGR_FULL = 70,
joeverbout 0:ea44dc9ed014 211 CV_HSV2RGB_FULL = 71,
joeverbout 0:ea44dc9ed014 212 CV_HLS2BGR_FULL = 72,
joeverbout 0:ea44dc9ed014 213 CV_HLS2RGB_FULL = 73,
joeverbout 0:ea44dc9ed014 214
joeverbout 0:ea44dc9ed014 215 CV_LBGR2Lab = 74,
joeverbout 0:ea44dc9ed014 216 CV_LRGB2Lab = 75,
joeverbout 0:ea44dc9ed014 217 CV_LBGR2Luv = 76,
joeverbout 0:ea44dc9ed014 218 CV_LRGB2Luv = 77,
joeverbout 0:ea44dc9ed014 219
joeverbout 0:ea44dc9ed014 220 CV_Lab2LBGR = 78,
joeverbout 0:ea44dc9ed014 221 CV_Lab2LRGB = 79,
joeverbout 0:ea44dc9ed014 222 CV_Luv2LBGR = 80,
joeverbout 0:ea44dc9ed014 223 CV_Luv2LRGB = 81,
joeverbout 0:ea44dc9ed014 224
joeverbout 0:ea44dc9ed014 225 CV_BGR2YUV = 82,
joeverbout 0:ea44dc9ed014 226 CV_RGB2YUV = 83,
joeverbout 0:ea44dc9ed014 227 CV_YUV2BGR = 84,
joeverbout 0:ea44dc9ed014 228 CV_YUV2RGB = 85,
joeverbout 0:ea44dc9ed014 229
joeverbout 0:ea44dc9ed014 230 CV_BayerBG2GRAY = 86,
joeverbout 0:ea44dc9ed014 231 CV_BayerGB2GRAY = 87,
joeverbout 0:ea44dc9ed014 232 CV_BayerRG2GRAY = 88,
joeverbout 0:ea44dc9ed014 233 CV_BayerGR2GRAY = 89,
joeverbout 0:ea44dc9ed014 234
joeverbout 0:ea44dc9ed014 235 //YUV 4:2:0 formats family
joeverbout 0:ea44dc9ed014 236 CV_YUV2RGB_NV12 = 90,
joeverbout 0:ea44dc9ed014 237 CV_YUV2BGR_NV12 = 91,
joeverbout 0:ea44dc9ed014 238 CV_YUV2RGB_NV21 = 92,
joeverbout 0:ea44dc9ed014 239 CV_YUV2BGR_NV21 = 93,
joeverbout 0:ea44dc9ed014 240 CV_YUV420sp2RGB = CV_YUV2RGB_NV21,
joeverbout 0:ea44dc9ed014 241 CV_YUV420sp2BGR = CV_YUV2BGR_NV21,
joeverbout 0:ea44dc9ed014 242
joeverbout 0:ea44dc9ed014 243 CV_YUV2RGBA_NV12 = 94,
joeverbout 0:ea44dc9ed014 244 CV_YUV2BGRA_NV12 = 95,
joeverbout 0:ea44dc9ed014 245 CV_YUV2RGBA_NV21 = 96,
joeverbout 0:ea44dc9ed014 246 CV_YUV2BGRA_NV21 = 97,
joeverbout 0:ea44dc9ed014 247 CV_YUV420sp2RGBA = CV_YUV2RGBA_NV21,
joeverbout 0:ea44dc9ed014 248 CV_YUV420sp2BGRA = CV_YUV2BGRA_NV21,
joeverbout 0:ea44dc9ed014 249
joeverbout 0:ea44dc9ed014 250 CV_YUV2RGB_YV12 = 98,
joeverbout 0:ea44dc9ed014 251 CV_YUV2BGR_YV12 = 99,
joeverbout 0:ea44dc9ed014 252 CV_YUV2RGB_IYUV = 100,
joeverbout 0:ea44dc9ed014 253 CV_YUV2BGR_IYUV = 101,
joeverbout 0:ea44dc9ed014 254 CV_YUV2RGB_I420 = CV_YUV2RGB_IYUV,
joeverbout 0:ea44dc9ed014 255 CV_YUV2BGR_I420 = CV_YUV2BGR_IYUV,
joeverbout 0:ea44dc9ed014 256 CV_YUV420p2RGB = CV_YUV2RGB_YV12,
joeverbout 0:ea44dc9ed014 257 CV_YUV420p2BGR = CV_YUV2BGR_YV12,
joeverbout 0:ea44dc9ed014 258
joeverbout 0:ea44dc9ed014 259 CV_YUV2RGBA_YV12 = 102,
joeverbout 0:ea44dc9ed014 260 CV_YUV2BGRA_YV12 = 103,
joeverbout 0:ea44dc9ed014 261 CV_YUV2RGBA_IYUV = 104,
joeverbout 0:ea44dc9ed014 262 CV_YUV2BGRA_IYUV = 105,
joeverbout 0:ea44dc9ed014 263 CV_YUV2RGBA_I420 = CV_YUV2RGBA_IYUV,
joeverbout 0:ea44dc9ed014 264 CV_YUV2BGRA_I420 = CV_YUV2BGRA_IYUV,
joeverbout 0:ea44dc9ed014 265 CV_YUV420p2RGBA = CV_YUV2RGBA_YV12,
joeverbout 0:ea44dc9ed014 266 CV_YUV420p2BGRA = CV_YUV2BGRA_YV12,
joeverbout 0:ea44dc9ed014 267
joeverbout 0:ea44dc9ed014 268 CV_YUV2GRAY_420 = 106,
joeverbout 0:ea44dc9ed014 269 CV_YUV2GRAY_NV21 = CV_YUV2GRAY_420,
joeverbout 0:ea44dc9ed014 270 CV_YUV2GRAY_NV12 = CV_YUV2GRAY_420,
joeverbout 0:ea44dc9ed014 271 CV_YUV2GRAY_YV12 = CV_YUV2GRAY_420,
joeverbout 0:ea44dc9ed014 272 CV_YUV2GRAY_IYUV = CV_YUV2GRAY_420,
joeverbout 0:ea44dc9ed014 273 CV_YUV2GRAY_I420 = CV_YUV2GRAY_420,
joeverbout 0:ea44dc9ed014 274 CV_YUV420sp2GRAY = CV_YUV2GRAY_420,
joeverbout 0:ea44dc9ed014 275 CV_YUV420p2GRAY = CV_YUV2GRAY_420,
joeverbout 0:ea44dc9ed014 276
joeverbout 0:ea44dc9ed014 277 //YUV 4:2:2 formats family
joeverbout 0:ea44dc9ed014 278 CV_YUV2RGB_UYVY = 107,
joeverbout 0:ea44dc9ed014 279 CV_YUV2BGR_UYVY = 108,
joeverbout 0:ea44dc9ed014 280 //CV_YUV2RGB_VYUY = 109,
joeverbout 0:ea44dc9ed014 281 //CV_YUV2BGR_VYUY = 110,
joeverbout 0:ea44dc9ed014 282 CV_YUV2RGB_Y422 = CV_YUV2RGB_UYVY,
joeverbout 0:ea44dc9ed014 283 CV_YUV2BGR_Y422 = CV_YUV2BGR_UYVY,
joeverbout 0:ea44dc9ed014 284 CV_YUV2RGB_UYNV = CV_YUV2RGB_UYVY,
joeverbout 0:ea44dc9ed014 285 CV_YUV2BGR_UYNV = CV_YUV2BGR_UYVY,
joeverbout 0:ea44dc9ed014 286
joeverbout 0:ea44dc9ed014 287 CV_YUV2RGBA_UYVY = 111,
joeverbout 0:ea44dc9ed014 288 CV_YUV2BGRA_UYVY = 112,
joeverbout 0:ea44dc9ed014 289 //CV_YUV2RGBA_VYUY = 113,
joeverbout 0:ea44dc9ed014 290 //CV_YUV2BGRA_VYUY = 114,
joeverbout 0:ea44dc9ed014 291 CV_YUV2RGBA_Y422 = CV_YUV2RGBA_UYVY,
joeverbout 0:ea44dc9ed014 292 CV_YUV2BGRA_Y422 = CV_YUV2BGRA_UYVY,
joeverbout 0:ea44dc9ed014 293 CV_YUV2RGBA_UYNV = CV_YUV2RGBA_UYVY,
joeverbout 0:ea44dc9ed014 294 CV_YUV2BGRA_UYNV = CV_YUV2BGRA_UYVY,
joeverbout 0:ea44dc9ed014 295
joeverbout 0:ea44dc9ed014 296 CV_YUV2RGB_YUY2 = 115,
joeverbout 0:ea44dc9ed014 297 CV_YUV2BGR_YUY2 = 116,
joeverbout 0:ea44dc9ed014 298 CV_YUV2RGB_YVYU = 117,
joeverbout 0:ea44dc9ed014 299 CV_YUV2BGR_YVYU = 118,
joeverbout 0:ea44dc9ed014 300 CV_YUV2RGB_YUYV = CV_YUV2RGB_YUY2,
joeverbout 0:ea44dc9ed014 301 CV_YUV2BGR_YUYV = CV_YUV2BGR_YUY2,
joeverbout 0:ea44dc9ed014 302 CV_YUV2RGB_YUNV = CV_YUV2RGB_YUY2,
joeverbout 0:ea44dc9ed014 303 CV_YUV2BGR_YUNV = CV_YUV2BGR_YUY2,
joeverbout 0:ea44dc9ed014 304
joeverbout 0:ea44dc9ed014 305 CV_YUV2RGBA_YUY2 = 119,
joeverbout 0:ea44dc9ed014 306 CV_YUV2BGRA_YUY2 = 120,
joeverbout 0:ea44dc9ed014 307 CV_YUV2RGBA_YVYU = 121,
joeverbout 0:ea44dc9ed014 308 CV_YUV2BGRA_YVYU = 122,
joeverbout 0:ea44dc9ed014 309 CV_YUV2RGBA_YUYV = CV_YUV2RGBA_YUY2,
joeverbout 0:ea44dc9ed014 310 CV_YUV2BGRA_YUYV = CV_YUV2BGRA_YUY2,
joeverbout 0:ea44dc9ed014 311 CV_YUV2RGBA_YUNV = CV_YUV2RGBA_YUY2,
joeverbout 0:ea44dc9ed014 312 CV_YUV2BGRA_YUNV = CV_YUV2BGRA_YUY2,
joeverbout 0:ea44dc9ed014 313
joeverbout 0:ea44dc9ed014 314 CV_YUV2GRAY_UYVY = 123,
joeverbout 0:ea44dc9ed014 315 CV_YUV2GRAY_YUY2 = 124,
joeverbout 0:ea44dc9ed014 316 //CV_YUV2GRAY_VYUY = CV_YUV2GRAY_UYVY,
joeverbout 0:ea44dc9ed014 317 CV_YUV2GRAY_Y422 = CV_YUV2GRAY_UYVY,
joeverbout 0:ea44dc9ed014 318 CV_YUV2GRAY_UYNV = CV_YUV2GRAY_UYVY,
joeverbout 0:ea44dc9ed014 319 CV_YUV2GRAY_YVYU = CV_YUV2GRAY_YUY2,
joeverbout 0:ea44dc9ed014 320 CV_YUV2GRAY_YUYV = CV_YUV2GRAY_YUY2,
joeverbout 0:ea44dc9ed014 321 CV_YUV2GRAY_YUNV = CV_YUV2GRAY_YUY2,
joeverbout 0:ea44dc9ed014 322
joeverbout 0:ea44dc9ed014 323 // alpha premultiplication
joeverbout 0:ea44dc9ed014 324 CV_RGBA2mRGBA = 125,
joeverbout 0:ea44dc9ed014 325 CV_mRGBA2RGBA = 126,
joeverbout 0:ea44dc9ed014 326
joeverbout 0:ea44dc9ed014 327 CV_RGB2YUV_I420 = 127,
joeverbout 0:ea44dc9ed014 328 CV_BGR2YUV_I420 = 128,
joeverbout 0:ea44dc9ed014 329 CV_RGB2YUV_IYUV = CV_RGB2YUV_I420,
joeverbout 0:ea44dc9ed014 330 CV_BGR2YUV_IYUV = CV_BGR2YUV_I420,
joeverbout 0:ea44dc9ed014 331
joeverbout 0:ea44dc9ed014 332 CV_RGBA2YUV_I420 = 129,
joeverbout 0:ea44dc9ed014 333 CV_BGRA2YUV_I420 = 130,
joeverbout 0:ea44dc9ed014 334 CV_RGBA2YUV_IYUV = CV_RGBA2YUV_I420,
joeverbout 0:ea44dc9ed014 335 CV_BGRA2YUV_IYUV = CV_BGRA2YUV_I420,
joeverbout 0:ea44dc9ed014 336 CV_RGB2YUV_YV12 = 131,
joeverbout 0:ea44dc9ed014 337 CV_BGR2YUV_YV12 = 132,
joeverbout 0:ea44dc9ed014 338 CV_RGBA2YUV_YV12 = 133,
joeverbout 0:ea44dc9ed014 339 CV_BGRA2YUV_YV12 = 134,
joeverbout 0:ea44dc9ed014 340
joeverbout 0:ea44dc9ed014 341 // Edge-Aware Demosaicing
joeverbout 0:ea44dc9ed014 342 CV_BayerBG2BGR_EA = 135,
joeverbout 0:ea44dc9ed014 343 CV_BayerGB2BGR_EA = 136,
joeverbout 0:ea44dc9ed014 344 CV_BayerRG2BGR_EA = 137,
joeverbout 0:ea44dc9ed014 345 CV_BayerGR2BGR_EA = 138,
joeverbout 0:ea44dc9ed014 346
joeverbout 0:ea44dc9ed014 347 CV_BayerBG2RGB_EA = CV_BayerRG2BGR_EA,
joeverbout 0:ea44dc9ed014 348 CV_BayerGB2RGB_EA = CV_BayerGR2BGR_EA,
joeverbout 0:ea44dc9ed014 349 CV_BayerRG2RGB_EA = CV_BayerBG2BGR_EA,
joeverbout 0:ea44dc9ed014 350 CV_BayerGR2RGB_EA = CV_BayerGB2BGR_EA,
joeverbout 0:ea44dc9ed014 351
joeverbout 0:ea44dc9ed014 352 CV_COLORCVT_MAX = 139
joeverbout 0:ea44dc9ed014 353 };
joeverbout 0:ea44dc9ed014 354
joeverbout 0:ea44dc9ed014 355
joeverbout 0:ea44dc9ed014 356 /** Sub-pixel interpolation methods */
joeverbout 0:ea44dc9ed014 357 enum
joeverbout 0:ea44dc9ed014 358 {
joeverbout 0:ea44dc9ed014 359 CV_INTER_NN =0,
joeverbout 0:ea44dc9ed014 360 CV_INTER_LINEAR =1,
joeverbout 0:ea44dc9ed014 361 CV_INTER_CUBIC =2,
joeverbout 0:ea44dc9ed014 362 CV_INTER_AREA =3,
joeverbout 0:ea44dc9ed014 363 CV_INTER_LANCZOS4 =4
joeverbout 0:ea44dc9ed014 364 };
joeverbout 0:ea44dc9ed014 365
joeverbout 0:ea44dc9ed014 366 /** ... and other image warping flags */
joeverbout 0:ea44dc9ed014 367 enum
joeverbout 0:ea44dc9ed014 368 {
joeverbout 0:ea44dc9ed014 369 CV_WARP_FILL_OUTLIERS =8,
joeverbout 0:ea44dc9ed014 370 CV_WARP_INVERSE_MAP =16
joeverbout 0:ea44dc9ed014 371 };
joeverbout 0:ea44dc9ed014 372
joeverbout 0:ea44dc9ed014 373 /** Shapes of a structuring element for morphological operations
joeverbout 0:ea44dc9ed014 374 @see cv::MorphShapes, cv::getStructuringElement
joeverbout 0:ea44dc9ed014 375 */
joeverbout 0:ea44dc9ed014 376 enum MorphShapes_c
joeverbout 0:ea44dc9ed014 377 {
joeverbout 0:ea44dc9ed014 378 CV_SHAPE_RECT =0,
joeverbout 0:ea44dc9ed014 379 CV_SHAPE_CROSS =1,
joeverbout 0:ea44dc9ed014 380 CV_SHAPE_ELLIPSE =2,
joeverbout 0:ea44dc9ed014 381 CV_SHAPE_CUSTOM =100 //!< custom structuring element
joeverbout 0:ea44dc9ed014 382 };
joeverbout 0:ea44dc9ed014 383
joeverbout 0:ea44dc9ed014 384 /** Morphological operations */
joeverbout 0:ea44dc9ed014 385 enum
joeverbout 0:ea44dc9ed014 386 {
joeverbout 0:ea44dc9ed014 387 CV_MOP_ERODE =0,
joeverbout 0:ea44dc9ed014 388 CV_MOP_DILATE =1,
joeverbout 0:ea44dc9ed014 389 CV_MOP_OPEN =2,
joeverbout 0:ea44dc9ed014 390 CV_MOP_CLOSE =3,
joeverbout 0:ea44dc9ed014 391 CV_MOP_GRADIENT =4,
joeverbout 0:ea44dc9ed014 392 CV_MOP_TOPHAT =5,
joeverbout 0:ea44dc9ed014 393 CV_MOP_BLACKHAT =6
joeverbout 0:ea44dc9ed014 394 };
joeverbout 0:ea44dc9ed014 395
joeverbout 0:ea44dc9ed014 396 /** Spatial and central moments */
joeverbout 0:ea44dc9ed014 397 typedef struct CvMoments
joeverbout 0:ea44dc9ed014 398 {
joeverbout 0:ea44dc9ed014 399 double m00, m10, m01, m20, m11, m02, m30, m21, m12, m03; /**< spatial moments */
joeverbout 0:ea44dc9ed014 400 double mu20, mu11, mu02, mu30, mu21, mu12, mu03; /**< central moments */
joeverbout 0:ea44dc9ed014 401 double inv_sqrt_m00; /**< m00 != 0 ? 1/sqrt(m00) : 0 */
joeverbout 0:ea44dc9ed014 402
joeverbout 0:ea44dc9ed014 403 #ifdef __cplusplus
joeverbout 0:ea44dc9ed014 404 CvMoments(){}
joeverbout 0:ea44dc9ed014 405 CvMoments(const cv::Moments& m)
joeverbout 0:ea44dc9ed014 406 {
joeverbout 0:ea44dc9ed014 407 m00 = m.m00; m10 = m.m10; m01 = m.m01;
joeverbout 0:ea44dc9ed014 408 m20 = m.m20; m11 = m.m11; m02 = m.m02;
joeverbout 0:ea44dc9ed014 409 m30 = m.m30; m21 = m.m21; m12 = m.m12; m03 = m.m03;
joeverbout 0:ea44dc9ed014 410 mu20 = m.mu20; mu11 = m.mu11; mu02 = m.mu02;
joeverbout 0:ea44dc9ed014 411 mu30 = m.mu30; mu21 = m.mu21; mu12 = m.mu12; mu03 = m.mu03;
joeverbout 0:ea44dc9ed014 412 double am00 = std::abs(m.m00);
joeverbout 0:ea44dc9ed014 413 inv_sqrt_m00 = am00 > DBL_EPSILON ? 1./std::sqrt(am00) : 0;
joeverbout 0:ea44dc9ed014 414 }
joeverbout 0:ea44dc9ed014 415 operator cv::Moments() const
joeverbout 0:ea44dc9ed014 416 {
joeverbout 0:ea44dc9ed014 417 return cv::Moments(m00, m10, m01, m20, m11, m02, m30, m21, m12, m03);
joeverbout 0:ea44dc9ed014 418 }
joeverbout 0:ea44dc9ed014 419 #endif
joeverbout 0:ea44dc9ed014 420 }
joeverbout 0:ea44dc9ed014 421 CvMoments;
joeverbout 0:ea44dc9ed014 422
joeverbout 0:ea44dc9ed014 423 /** Hu invariants */
joeverbout 0:ea44dc9ed014 424 typedef struct CvHuMoments
joeverbout 0:ea44dc9ed014 425 {
joeverbout 0:ea44dc9ed014 426 double hu1, hu2, hu3, hu4, hu5, hu6, hu7; /**< Hu invariants */
joeverbout 0:ea44dc9ed014 427 }
joeverbout 0:ea44dc9ed014 428 CvHuMoments;
joeverbout 0:ea44dc9ed014 429
joeverbout 0:ea44dc9ed014 430 /** Template matching methods */
joeverbout 0:ea44dc9ed014 431 enum
joeverbout 0:ea44dc9ed014 432 {
joeverbout 0:ea44dc9ed014 433 CV_TM_SQDIFF =0,
joeverbout 0:ea44dc9ed014 434 CV_TM_SQDIFF_NORMED =1,
joeverbout 0:ea44dc9ed014 435 CV_TM_CCORR =2,
joeverbout 0:ea44dc9ed014 436 CV_TM_CCORR_NORMED =3,
joeverbout 0:ea44dc9ed014 437 CV_TM_CCOEFF =4,
joeverbout 0:ea44dc9ed014 438 CV_TM_CCOEFF_NORMED =5
joeverbout 0:ea44dc9ed014 439 };
joeverbout 0:ea44dc9ed014 440
joeverbout 0:ea44dc9ed014 441 typedef float (CV_CDECL * CvDistanceFunction)( const float* a, const float* b, void* user_param );
joeverbout 0:ea44dc9ed014 442
joeverbout 0:ea44dc9ed014 443 /** Contour retrieval modes */
joeverbout 0:ea44dc9ed014 444 enum
joeverbout 0:ea44dc9ed014 445 {
joeverbout 0:ea44dc9ed014 446 CV_RETR_EXTERNAL=0,
joeverbout 0:ea44dc9ed014 447 CV_RETR_LIST=1,
joeverbout 0:ea44dc9ed014 448 CV_RETR_CCOMP=2,
joeverbout 0:ea44dc9ed014 449 CV_RETR_TREE=3,
joeverbout 0:ea44dc9ed014 450 CV_RETR_FLOODFILL=4
joeverbout 0:ea44dc9ed014 451 };
joeverbout 0:ea44dc9ed014 452
joeverbout 0:ea44dc9ed014 453 /** Contour approximation methods */
joeverbout 0:ea44dc9ed014 454 enum
joeverbout 0:ea44dc9ed014 455 {
joeverbout 0:ea44dc9ed014 456 CV_CHAIN_CODE=0,
joeverbout 0:ea44dc9ed014 457 CV_CHAIN_APPROX_NONE=1,
joeverbout 0:ea44dc9ed014 458 CV_CHAIN_APPROX_SIMPLE=2,
joeverbout 0:ea44dc9ed014 459 CV_CHAIN_APPROX_TC89_L1=3,
joeverbout 0:ea44dc9ed014 460 CV_CHAIN_APPROX_TC89_KCOS=4,
joeverbout 0:ea44dc9ed014 461 CV_LINK_RUNS=5
joeverbout 0:ea44dc9ed014 462 };
joeverbout 0:ea44dc9ed014 463
joeverbout 0:ea44dc9ed014 464 /*
joeverbout 0:ea44dc9ed014 465 Internal structure that is used for sequential retrieving contours from the image.
joeverbout 0:ea44dc9ed014 466 It supports both hierarchical and plane variants of Suzuki algorithm.
joeverbout 0:ea44dc9ed014 467 */
joeverbout 0:ea44dc9ed014 468 typedef struct _CvContourScanner* CvContourScanner;
joeverbout 0:ea44dc9ed014 469
joeverbout 0:ea44dc9ed014 470 /** Freeman chain reader state */
joeverbout 0:ea44dc9ed014 471 typedef struct CvChainPtReader
joeverbout 0:ea44dc9ed014 472 {
joeverbout 0:ea44dc9ed014 473 CV_SEQ_READER_FIELDS()
joeverbout 0:ea44dc9ed014 474 char code;
joeverbout 0:ea44dc9ed014 475 CvPoint pt;
joeverbout 0:ea44dc9ed014 476 schar deltas[8][2];
joeverbout 0:ea44dc9ed014 477 }
joeverbout 0:ea44dc9ed014 478 CvChainPtReader;
joeverbout 0:ea44dc9ed014 479
joeverbout 0:ea44dc9ed014 480 /** initializes 8-element array for fast access to 3x3 neighborhood of a pixel */
joeverbout 0:ea44dc9ed014 481 #define CV_INIT_3X3_DELTAS( deltas, step, nch ) \
joeverbout 0:ea44dc9ed014 482 ((deltas)[0] = (nch), (deltas)[1] = -(step) + (nch), \
joeverbout 0:ea44dc9ed014 483 (deltas)[2] = -(step), (deltas)[3] = -(step) - (nch), \
joeverbout 0:ea44dc9ed014 484 (deltas)[4] = -(nch), (deltas)[5] = (step) - (nch), \
joeverbout 0:ea44dc9ed014 485 (deltas)[6] = (step), (deltas)[7] = (step) + (nch))
joeverbout 0:ea44dc9ed014 486
joeverbout 0:ea44dc9ed014 487
joeverbout 0:ea44dc9ed014 488 /** Contour approximation algorithms */
joeverbout 0:ea44dc9ed014 489 enum
joeverbout 0:ea44dc9ed014 490 {
joeverbout 0:ea44dc9ed014 491 CV_POLY_APPROX_DP = 0
joeverbout 0:ea44dc9ed014 492 };
joeverbout 0:ea44dc9ed014 493
joeverbout 0:ea44dc9ed014 494 /** @brief Shape matching methods
joeverbout 0:ea44dc9ed014 495
joeverbout 0:ea44dc9ed014 496 \f$A\f$ denotes object1,\f$B\f$ denotes object2
joeverbout 0:ea44dc9ed014 497
joeverbout 0:ea44dc9ed014 498 \f$\begin{array}{l} m^A_i = \mathrm{sign} (h^A_i) \cdot \log{h^A_i} \\ m^B_i = \mathrm{sign} (h^B_i) \cdot \log{h^B_i} \end{array}\f$
joeverbout 0:ea44dc9ed014 499
joeverbout 0:ea44dc9ed014 500 and \f$h^A_i, h^B_i\f$ are the Hu moments of \f$A\f$ and \f$B\f$ , respectively.
joeverbout 0:ea44dc9ed014 501 */
joeverbout 0:ea44dc9ed014 502 enum ShapeMatchModes
joeverbout 0:ea44dc9ed014 503 {
joeverbout 0:ea44dc9ed014 504 CV_CONTOURS_MATCH_I1 =1, //!< \f[I_1(A,B) = \sum _{i=1...7} \left | \frac{1}{m^A_i} - \frac{1}{m^B_i} \right |\f]
joeverbout 0:ea44dc9ed014 505 CV_CONTOURS_MATCH_I2 =2, //!< \f[I_2(A,B) = \sum _{i=1...7} \left | m^A_i - m^B_i \right |\f]
joeverbout 0:ea44dc9ed014 506 CV_CONTOURS_MATCH_I3 =3 //!< \f[I_3(A,B) = \max _{i=1...7} \frac{ \left| m^A_i - m^B_i \right| }{ \left| m^A_i \right| }\f]
joeverbout 0:ea44dc9ed014 507 };
joeverbout 0:ea44dc9ed014 508
joeverbout 0:ea44dc9ed014 509 /** Shape orientation */
joeverbout 0:ea44dc9ed014 510 enum
joeverbout 0:ea44dc9ed014 511 {
joeverbout 0:ea44dc9ed014 512 CV_CLOCKWISE =1,
joeverbout 0:ea44dc9ed014 513 CV_COUNTER_CLOCKWISE =2
joeverbout 0:ea44dc9ed014 514 };
joeverbout 0:ea44dc9ed014 515
joeverbout 0:ea44dc9ed014 516
joeverbout 0:ea44dc9ed014 517 /** Convexity defect */
joeverbout 0:ea44dc9ed014 518 typedef struct CvConvexityDefect
joeverbout 0:ea44dc9ed014 519 {
joeverbout 0:ea44dc9ed014 520 CvPoint* start; /**< point of the contour where the defect begins */
joeverbout 0:ea44dc9ed014 521 CvPoint* end; /**< point of the contour where the defect ends */
joeverbout 0:ea44dc9ed014 522 CvPoint* depth_point; /**< the farthest from the convex hull point within the defect */
joeverbout 0:ea44dc9ed014 523 float depth; /**< distance between the farthest point and the convex hull */
joeverbout 0:ea44dc9ed014 524 } CvConvexityDefect;
joeverbout 0:ea44dc9ed014 525
joeverbout 0:ea44dc9ed014 526
joeverbout 0:ea44dc9ed014 527 /** Histogram comparison methods */
joeverbout 0:ea44dc9ed014 528 enum
joeverbout 0:ea44dc9ed014 529 {
joeverbout 0:ea44dc9ed014 530 CV_COMP_CORREL =0,
joeverbout 0:ea44dc9ed014 531 CV_COMP_CHISQR =1,
joeverbout 0:ea44dc9ed014 532 CV_COMP_INTERSECT =2,
joeverbout 0:ea44dc9ed014 533 CV_COMP_BHATTACHARYYA =3,
joeverbout 0:ea44dc9ed014 534 CV_COMP_HELLINGER =CV_COMP_BHATTACHARYYA,
joeverbout 0:ea44dc9ed014 535 CV_COMP_CHISQR_ALT =4,
joeverbout 0:ea44dc9ed014 536 CV_COMP_KL_DIV =5
joeverbout 0:ea44dc9ed014 537 };
joeverbout 0:ea44dc9ed014 538
joeverbout 0:ea44dc9ed014 539 /** Mask size for distance transform */
joeverbout 0:ea44dc9ed014 540 enum
joeverbout 0:ea44dc9ed014 541 {
joeverbout 0:ea44dc9ed014 542 CV_DIST_MASK_3 =3,
joeverbout 0:ea44dc9ed014 543 CV_DIST_MASK_5 =5,
joeverbout 0:ea44dc9ed014 544 CV_DIST_MASK_PRECISE =0
joeverbout 0:ea44dc9ed014 545 };
joeverbout 0:ea44dc9ed014 546
joeverbout 0:ea44dc9ed014 547 /** Content of output label array: connected components or pixels */
joeverbout 0:ea44dc9ed014 548 enum
joeverbout 0:ea44dc9ed014 549 {
joeverbout 0:ea44dc9ed014 550 CV_DIST_LABEL_CCOMP = 0,
joeverbout 0:ea44dc9ed014 551 CV_DIST_LABEL_PIXEL = 1
joeverbout 0:ea44dc9ed014 552 };
joeverbout 0:ea44dc9ed014 553
joeverbout 0:ea44dc9ed014 554 /** Distance types for Distance Transform and M-estimators */
joeverbout 0:ea44dc9ed014 555 enum
joeverbout 0:ea44dc9ed014 556 {
joeverbout 0:ea44dc9ed014 557 CV_DIST_USER =-1, /**< User defined distance */
joeverbout 0:ea44dc9ed014 558 CV_DIST_L1 =1, /**< distance = |x1-x2| + |y1-y2| */
joeverbout 0:ea44dc9ed014 559 CV_DIST_L2 =2, /**< the simple euclidean distance */
joeverbout 0:ea44dc9ed014 560 CV_DIST_C =3, /**< distance = max(|x1-x2|,|y1-y2|) */
joeverbout 0:ea44dc9ed014 561 CV_DIST_L12 =4, /**< L1-L2 metric: distance = 2(sqrt(1+x*x/2) - 1)) */
joeverbout 0:ea44dc9ed014 562 CV_DIST_FAIR =5, /**< distance = c^2(|x|/c-log(1+|x|/c)), c = 1.3998 */
joeverbout 0:ea44dc9ed014 563 CV_DIST_WELSCH =6, /**< distance = c^2/2(1-exp(-(x/c)^2)), c = 2.9846 */
joeverbout 0:ea44dc9ed014 564 CV_DIST_HUBER =7 /**< distance = |x|<c ? x^2/2 : c(|x|-c/2), c=1.345 */
joeverbout 0:ea44dc9ed014 565 };
joeverbout 0:ea44dc9ed014 566
joeverbout 0:ea44dc9ed014 567
joeverbout 0:ea44dc9ed014 568 /** Threshold types */
joeverbout 0:ea44dc9ed014 569 enum
joeverbout 0:ea44dc9ed014 570 {
joeverbout 0:ea44dc9ed014 571 CV_THRESH_BINARY =0, /**< value = value > threshold ? max_value : 0 */
joeverbout 0:ea44dc9ed014 572 CV_THRESH_BINARY_INV =1, /**< value = value > threshold ? 0 : max_value */
joeverbout 0:ea44dc9ed014 573 CV_THRESH_TRUNC =2, /**< value = value > threshold ? threshold : value */
joeverbout 0:ea44dc9ed014 574 CV_THRESH_TOZERO =3, /**< value = value > threshold ? value : 0 */
joeverbout 0:ea44dc9ed014 575 CV_THRESH_TOZERO_INV =4, /**< value = value > threshold ? 0 : value */
joeverbout 0:ea44dc9ed014 576 CV_THRESH_MASK =7,
joeverbout 0:ea44dc9ed014 577 CV_THRESH_OTSU =8, /**< use Otsu algorithm to choose the optimal threshold value;
joeverbout 0:ea44dc9ed014 578 combine the flag with one of the above CV_THRESH_* values */
joeverbout 0:ea44dc9ed014 579 CV_THRESH_TRIANGLE =16 /**< use Triangle algorithm to choose the optimal threshold value;
joeverbout 0:ea44dc9ed014 580 combine the flag with one of the above CV_THRESH_* values, but not
joeverbout 0:ea44dc9ed014 581 with CV_THRESH_OTSU */
joeverbout 0:ea44dc9ed014 582 };
joeverbout 0:ea44dc9ed014 583
joeverbout 0:ea44dc9ed014 584 /** Adaptive threshold methods */
joeverbout 0:ea44dc9ed014 585 enum
joeverbout 0:ea44dc9ed014 586 {
joeverbout 0:ea44dc9ed014 587 CV_ADAPTIVE_THRESH_MEAN_C =0,
joeverbout 0:ea44dc9ed014 588 CV_ADAPTIVE_THRESH_GAUSSIAN_C =1
joeverbout 0:ea44dc9ed014 589 };
joeverbout 0:ea44dc9ed014 590
joeverbout 0:ea44dc9ed014 591 /** FloodFill flags */
joeverbout 0:ea44dc9ed014 592 enum
joeverbout 0:ea44dc9ed014 593 {
joeverbout 0:ea44dc9ed014 594 CV_FLOODFILL_FIXED_RANGE =(1 << 16),
joeverbout 0:ea44dc9ed014 595 CV_FLOODFILL_MASK_ONLY =(1 << 17)
joeverbout 0:ea44dc9ed014 596 };
joeverbout 0:ea44dc9ed014 597
joeverbout 0:ea44dc9ed014 598
joeverbout 0:ea44dc9ed014 599 /** Canny edge detector flags */
joeverbout 0:ea44dc9ed014 600 enum
joeverbout 0:ea44dc9ed014 601 {
joeverbout 0:ea44dc9ed014 602 CV_CANNY_L2_GRADIENT =(1 << 31)
joeverbout 0:ea44dc9ed014 603 };
joeverbout 0:ea44dc9ed014 604
joeverbout 0:ea44dc9ed014 605 /** Variants of a Hough transform */
joeverbout 0:ea44dc9ed014 606 enum
joeverbout 0:ea44dc9ed014 607 {
joeverbout 0:ea44dc9ed014 608 CV_HOUGH_STANDARD =0,
joeverbout 0:ea44dc9ed014 609 CV_HOUGH_PROBABILISTIC =1,
joeverbout 0:ea44dc9ed014 610 CV_HOUGH_MULTI_SCALE =2,
joeverbout 0:ea44dc9ed014 611 CV_HOUGH_GRADIENT =3
joeverbout 0:ea44dc9ed014 612 };
joeverbout 0:ea44dc9ed014 613
joeverbout 0:ea44dc9ed014 614
joeverbout 0:ea44dc9ed014 615 /* Fast search data structures */
joeverbout 0:ea44dc9ed014 616 struct CvFeatureTree;
joeverbout 0:ea44dc9ed014 617 struct CvLSH;
joeverbout 0:ea44dc9ed014 618 struct CvLSHOperations;
joeverbout 0:ea44dc9ed014 619
joeverbout 0:ea44dc9ed014 620 /** @} */
joeverbout 0:ea44dc9ed014 621
joeverbout 0:ea44dc9ed014 622 #ifdef __cplusplus
joeverbout 0:ea44dc9ed014 623 }
joeverbout 0:ea44dc9ed014 624 #endif
joeverbout 0:ea44dc9ed014 625
joeverbout 0:ea44dc9ed014 626 #endif
joeverbout 0:ea44dc9ed014 627