added color conversion constants

This commit is contained in:
sccolbert
2009-10-24 13:05:15 +02:00
parent d2697df064
commit c2b98b259a
5 changed files with 3682 additions and 3103 deletions
File diff suppressed because it is too large Load Diff
+98 -1
View File
@@ -1,6 +1,6 @@
#############################################
# Image Processing Constants
# Image Processing Constants
############################################
@@ -33,6 +33,103 @@ 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
CV_COLORCVT_MAX = 100
#########################
# Calibration Constants #
#########################
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -1054,7 +1054,7 @@ def cvCalibrateCamera2(np.ndarray object_points, np.ndarray image_points,
# Allocate a new distortion array
cdef np.npy_intp distortion_shape[2]
distortion_shape[0] = <np.npy_intp> 1
distortion_shape[1] = <np.npy_intp> 5
distortion_shape[1] = <np.npy_intp> 4
cdef np.ndarray distortion = new_array(2, distortion_shape, FLOAT64)
cdef IplImage ipl_distortion
populate_iplimage(distortion, &ipl_distortion)
+1 -1
View File
@@ -223,7 +223,7 @@ class TestCalibrateCamera2(object):
np.array([16, 16, 16], dtype=np.int32), (4, 4)
)
assert_almost_equal(distortions, np.array([0., 0., 0., 0., 0.]))
assert_almost_equal(distortions, np.array([0., 0., 0., 0.,]))
# The intrinsics will be strange, but we can at least check
# for known zeros and ones
assert_almost_equal( intrinsics[0,1], 0)