openCV library for Renesas RZ/A

Dependents:   RZ_A2M_Mbed_samples

Committer:
RyoheiHagimoto
Date:
Fri Jan 29 04:53:38 2021 +0000
Revision:
0:0e0631af0305
copied from https://github.com/d-kato/opencv-lib.

Who changed what in which revision?

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