
#############################################
# Image Processing Constants
############################################

CV_BLUR_NO_SCALE = 0
CV_BLUR = 1
CV_GAUSSIAN = 2
CV_MEDIAN = 3
CV_BILATERAL = 4

CV_TERMCRIT_NUMBER = 1
CV_TERMCRIT_ITER = 1
CV_TERMCRIT_EPS = 2

CV_INTER_NN = 0
CV_INTER_LINEAR = 1
CV_INTER_CUBIC = 2
CV_INTER_AREA = 3

CV_WARP_FILL_OUTLIERS = 8
CV_WARP_INVERSE_MAP = 16

CV_SHAPE_RECT = 0
CV_SHAPE_CROSS = 1
CV_SHAPE_ELLIPSE = 2
CV_SHAPE_CUSTOM = 100

CV_THRESH_BINARY = 0
CV_THRESH_BINARY_INV = 1
CV_THRESH_TRUNC = 2
CV_THRESH_TOZERO = 3
CV_THRESH_TOZERO_INV = 4
CV_THRESH_MASK = 7
CV_ADAPTIVE_THRESH_MEAN_C = 0
CV_ADAPTIVE_THRESH_GAUSSIAN_C = 1

CV_MOP_OPEN = 2
CV_MOP_CLOSE = 3
CV_MOP_GRADIENT = 4
CV_MOP_TOPHAT = 5
CV_MOP_BLACKHAT = 6

#-------------------------------------------------------------------------------
# Color Conversion
#-------------------------------------------------------------------------------
CV_BGR2BGRA = 0
CV_RGB2RGBA = CV_BGR2BGRA

CV_BGRA2BGR = 1
CV_RGBA2RGB = CV_BGRA2BGR

CV_BGR2RGBA = 2
CV_RGB2BGRA = CV_BGR2RGBA

CV_RGBA2BGR = 3
CV_BGRA2RGB = CV_RGBA2BGR

CV_BGR2RGB = 4
CV_RGB2BGR = CV_BGR2RGB

CV_BGRA2RGBA = 5
CV_RGBA2BGRA = CV_BGRA2RGBA

CV_BGR2GRAY = 6
CV_RGB2GRAY = 7
CV_GRAY2BGR = 8
CV_GRAY2RGB = CV_GRAY2BGR
CV_GRAY2BGRA = 9
CV_GRAY2RGBA = CV_GRAY2BGRA
CV_BGRA2GRAY = 10
CV_RGBA2GRAY = 11

CV_BGR2BGR565 = 12
CV_RGB2BGR565 = 13
CV_BGR5652BGR = 14
CV_BGR5652RGB = 15
CV_BGRA2BGR565 = 16
CV_RGBA2BGR565 = 17
CV_BGR5652BGRA = 18
CV_BGR5652RGBA = 19

CV_GRAY2BGR565 = 20
CV_BGR5652GRAY = 21

CV_BGR2BGR555 = 22
CV_RGB2BGR555 = 23
CV_BGR5552BGR = 24
CV_BGR5552RGB = 25
CV_BGRA2BGR555 = 26
CV_RGBA2BGR555 = 27
CV_BGR5552BGRA = 28
CV_BGR5552RGBA = 29

CV_GRAY2BGR555 = 30
CV_BGR5552GRAY = 31

CV_BGR2XYZ = 32
CV_RGB2XYZ = 33
CV_XYZ2BGR = 34
CV_XYZ2RGB = 35

CV_BGR2YCrCb = 36
CV_RGB2YCrCb = 37
CV_YCrCb2BGR = 38
CV_YCrCb2RGB = 39

CV_BGR2HSV = 40
CV_RGB2HSV = 41

CV_BGR2Lab = 44
CV_RGB2Lab = 45

CV_BayerBG2BGR = 46
CV_BayerGB2BGR = 47
CV_BayerRG2BGR = 48
CV_BayerGR2BGR = 49

CV_BayerBG2RGB = CV_BayerRG2BGR
CV_BayerGB2RGB = CV_BayerGR2BGR
CV_BayerRG2RGB = CV_BayerBG2BGR
CV_BayerGR2RGB = CV_BayerGB2BGR

CV_BGR2Luv = 50
CV_RGB2Luv = 51
CV_BGR2HLS = 52
CV_RGB2HLS = 53

CV_HSV2BGR = 54
CV_HSV2RGB = 55

CV_Lab2BGR = 56
CV_Lab2RGB = 57
CV_Luv2BGR = 58
CV_Luv2RGB = 59
CV_HLS2BGR = 60
CV_HLS2RGB = 61

#########################
# Calibration Constants #
#########################
CV_CALIB_USE_INTRINSIC_GUESS = 1
CV_CALIB_FIX_ASPECT_RATIO = 2
CV_CALIB_FIX_PRINCIPAL_POINT = 4
CV_CALIB_ZERO_TANGENT_DIST = 8
CV_CALIB_CB_ADAPTIVE_THRESH = 1
CV_CALIB_CB_NORMALIZE_IMAGE = 2
CV_CALIB_CB_FILTER_QUADS = 4

####################
# cvMat TypeValues #
####################
CV_CN_MAX = 4
CV_CN_SHIFT = 3
CV_DEPTH_MAX = (1 << CV_CN_SHIFT)

CV_8U = 0
CV_8S = 1
CV_16U = 2
CV_16S = 3
CV_32S = 4
CV_32F = 5
CV_64F = 6
CV_USRTYPE1 = 7

def _CV_MAKETYPE(depth,cn):
    return ((depth) + (((cn)-1) << CV_CN_SHIFT))

CV_8UC1 = _CV_MAKETYPE(CV_8U,1)
CV_8UC2 = _CV_MAKETYPE(CV_8U,2)
CV_8UC3 = _CV_MAKETYPE(CV_8U,3)
CV_8UC4 = _CV_MAKETYPE(CV_8U,4)

CV_8SC1 = _CV_MAKETYPE(CV_8S,1)
CV_8SC2 = _CV_MAKETYPE(CV_8S,2)
CV_8SC3 = _CV_MAKETYPE(CV_8S,3)
CV_8SC4 = _CV_MAKETYPE(CV_8S,4)

CV_16UC1 = _CV_MAKETYPE(CV_16U,1)
CV_16UC2 = _CV_MAKETYPE(CV_16U,2)
CV_16UC3 = _CV_MAKETYPE(CV_16U,3)
CV_16UC4 = _CV_MAKETYPE(CV_16U,4)

CV_16SC1 = _CV_MAKETYPE(CV_16S,1)
CV_16SC2 = _CV_MAKETYPE(CV_16S,2)
CV_16SC3 = _CV_MAKETYPE(CV_16S,3)
CV_16SC4 = _CV_MAKETYPE(CV_16S,4)

CV_32SC1 = _CV_MAKETYPE(CV_32S,1)
CV_32SC2 = _CV_MAKETYPE(CV_32S,2)
CV_32SC3 = _CV_MAKETYPE(CV_32S,3)
CV_32SC4 = _CV_MAKETYPE(CV_32S,4)

CV_32FC1 = _CV_MAKETYPE(CV_32F,1)
CV_32FC2 = _CV_MAKETYPE(CV_32F,2)
CV_32FC3 = _CV_MAKETYPE(CV_32F,3)
CV_32FC4 = _CV_MAKETYPE(CV_32F,4)

CV_64FC1 = _CV_MAKETYPE(CV_64F,1)
CV_64FC2 = _CV_MAKETYPE(CV_64F,2)
CV_64FC3 = _CV_MAKETYPE(CV_64F,3)
CV_64FC4 = _CV_MAKETYPE(CV_64F,4)



