Enum opencv::imgproc::ColorConversionCodes

source ·
#[repr(C)]
pub enum ColorConversionCodes {
Show 150 variants COLOR_BGR2BGRA = 0, COLOR_BGRA2BGR = 1, COLOR_BGR2RGBA = 2, COLOR_RGBA2BGR = 3, COLOR_BGR2RGB = 4, COLOR_BGRA2RGBA = 5, COLOR_BGR2GRAY = 6, COLOR_RGB2GRAY = 7, COLOR_GRAY2BGR = 8, COLOR_GRAY2BGRA = 9, COLOR_BGRA2GRAY = 10, COLOR_RGBA2GRAY = 11, COLOR_BGR2BGR565 = 12, COLOR_RGB2BGR565 = 13, COLOR_BGR5652BGR = 14, COLOR_BGR5652RGB = 15, COLOR_BGRA2BGR565 = 16, COLOR_RGBA2BGR565 = 17, COLOR_BGR5652BGRA = 18, COLOR_BGR5652RGBA = 19, COLOR_GRAY2BGR565 = 20, COLOR_BGR5652GRAY = 21, COLOR_BGR2BGR555 = 22, COLOR_RGB2BGR555 = 23, COLOR_BGR5552BGR = 24, COLOR_BGR5552RGB = 25, COLOR_BGRA2BGR555 = 26, COLOR_RGBA2BGR555 = 27, COLOR_BGR5552BGRA = 28, COLOR_BGR5552RGBA = 29, COLOR_GRAY2BGR555 = 30, COLOR_BGR5552GRAY = 31, COLOR_BGR2XYZ = 32, COLOR_RGB2XYZ = 33, COLOR_XYZ2BGR = 34, COLOR_XYZ2RGB = 35, COLOR_BGR2YCrCb = 36, COLOR_RGB2YCrCb = 37, COLOR_YCrCb2BGR = 38, COLOR_YCrCb2RGB = 39, COLOR_BGR2HSV = 40, COLOR_RGB2HSV = 41, COLOR_BGR2Lab = 44, COLOR_RGB2Lab = 45, COLOR_BGR2Luv = 50, COLOR_RGB2Luv = 51, COLOR_BGR2HLS = 52, COLOR_RGB2HLS = 53, COLOR_HSV2BGR = 54, COLOR_HSV2RGB = 55, COLOR_Lab2BGR = 56, COLOR_Lab2RGB = 57, COLOR_Luv2BGR = 58, COLOR_Luv2RGB = 59, COLOR_HLS2BGR = 60, COLOR_HLS2RGB = 61, COLOR_BGR2HSV_FULL = 66, COLOR_RGB2HSV_FULL = 67, COLOR_BGR2HLS_FULL = 68, COLOR_RGB2HLS_FULL = 69, COLOR_HSV2BGR_FULL = 70, COLOR_HSV2RGB_FULL = 71, COLOR_HLS2BGR_FULL = 72, COLOR_HLS2RGB_FULL = 73, COLOR_LBGR2Lab = 74, COLOR_LRGB2Lab = 75, COLOR_LBGR2Luv = 76, COLOR_LRGB2Luv = 77, COLOR_Lab2LBGR = 78, COLOR_Lab2LRGB = 79, COLOR_Luv2LBGR = 80, COLOR_Luv2LRGB = 81, COLOR_BGR2YUV = 82, COLOR_RGB2YUV = 83, COLOR_YUV2BGR = 84, COLOR_YUV2RGB = 85, COLOR_YUV2RGB_NV12 = 90, COLOR_YUV2BGR_NV12 = 91, COLOR_YUV2RGB_NV21 = 92, COLOR_YUV2BGR_NV21 = 93, COLOR_YUV2RGBA_NV12 = 94, COLOR_YUV2BGRA_NV12 = 95, COLOR_YUV2RGBA_NV21 = 96, COLOR_YUV2BGRA_NV21 = 97, COLOR_YUV2RGB_YV12 = 98, COLOR_YUV2BGR_YV12 = 99, COLOR_YUV2RGB_IYUV = 100, COLOR_YUV2BGR_IYUV = 101, COLOR_YUV2RGBA_YV12 = 102, COLOR_YUV2BGRA_YV12 = 103, COLOR_YUV2RGBA_IYUV = 104, COLOR_YUV2BGRA_IYUV = 105, COLOR_YUV2GRAY_420 = 106, COLOR_YUV2RGB_UYVY = 107, COLOR_YUV2BGR_UYVY = 108, COLOR_YUV2RGBA_UYVY = 111, COLOR_YUV2BGRA_UYVY = 112, COLOR_YUV2RGB_YUY2 = 115, COLOR_YUV2BGR_YUY2 = 116, COLOR_YUV2RGB_YVYU = 117, COLOR_YUV2BGR_YVYU = 118, COLOR_YUV2RGBA_YUY2 = 119, COLOR_YUV2BGRA_YUY2 = 120, COLOR_YUV2RGBA_YVYU = 121, COLOR_YUV2BGRA_YVYU = 122, COLOR_YUV2GRAY_UYVY = 123, COLOR_YUV2GRAY_YUY2 = 124, COLOR_RGBA2mRGBA = 125, COLOR_mRGBA2RGBA = 126, COLOR_RGB2YUV_I420 = 127, COLOR_BGR2YUV_I420 = 128, COLOR_RGBA2YUV_I420 = 129, COLOR_BGRA2YUV_I420 = 130, COLOR_RGB2YUV_YV12 = 131, COLOR_BGR2YUV_YV12 = 132, COLOR_RGBA2YUV_YV12 = 133, COLOR_BGRA2YUV_YV12 = 134, COLOR_BayerBG2BGR = 46, COLOR_BayerGB2BGR = 47, COLOR_BayerRG2BGR = 48, COLOR_BayerGR2BGR = 49, COLOR_BayerBG2GRAY = 86, COLOR_BayerGB2GRAY = 87, COLOR_BayerRG2GRAY = 88, COLOR_BayerGR2GRAY = 89, COLOR_BayerBG2BGR_VNG = 62, COLOR_BayerGB2BGR_VNG = 63, COLOR_BayerRG2BGR_VNG = 64, COLOR_BayerGR2BGR_VNG = 65, COLOR_BayerBG2BGR_EA = 135, COLOR_BayerGB2BGR_EA = 136, COLOR_BayerRG2BGR_EA = 137, COLOR_BayerGR2BGR_EA = 138, COLOR_BayerBG2BGRA = 139, COLOR_BayerGB2BGRA = 140, COLOR_BayerRG2BGRA = 141, COLOR_BayerGR2BGRA = 142, COLOR_RGB2YUV_UYVY = 143, COLOR_BGR2YUV_UYVY = 144, COLOR_RGBA2YUV_UYVY = 145, COLOR_BGRA2YUV_UYVY = 146, COLOR_RGB2YUV_YUY2 = 147, COLOR_BGR2YUV_YUY2 = 148, COLOR_RGB2YUV_YVYU = 149, COLOR_BGR2YUV_YVYU = 150, COLOR_RGBA2YUV_YUY2 = 151, COLOR_BGRA2YUV_YUY2 = 152, COLOR_RGBA2YUV_YVYU = 153, COLOR_BGRA2YUV_YVYU = 154, COLOR_COLORCVT_MAX = 155,
}
Expand description

the color conversion codes

§See also

[imgproc_color_conversions] @ingroup imgproc_color_conversions

Variants§

§

COLOR_BGR2BGRA = 0

add alpha channel to RGB or BGR image

§

COLOR_BGRA2BGR = 1

remove alpha channel from RGB or BGR image

§

COLOR_BGR2RGBA = 2

convert between RGB and BGR color spaces (with or without alpha channel)

§

COLOR_RGBA2BGR = 3

§

COLOR_BGR2RGB = 4

§

COLOR_BGRA2RGBA = 5

§

COLOR_BGR2GRAY = 6

convert between RGB/BGR and grayscale, [color_convert_rgb_gray] “color conversions”

§

COLOR_RGB2GRAY = 7

§

COLOR_GRAY2BGR = 8

§

COLOR_GRAY2BGRA = 9

§

COLOR_BGRA2GRAY = 10

§

COLOR_RGBA2GRAY = 11

§

COLOR_BGR2BGR565 = 12

convert between RGB/BGR and BGR565 (16-bit images)

§

COLOR_RGB2BGR565 = 13

§

COLOR_BGR5652BGR = 14

§

COLOR_BGR5652RGB = 15

§

COLOR_BGRA2BGR565 = 16

§

COLOR_RGBA2BGR565 = 17

§

COLOR_BGR5652BGRA = 18

§

COLOR_BGR5652RGBA = 19

§

COLOR_GRAY2BGR565 = 20

convert between grayscale to BGR565 (16-bit images)

§

COLOR_BGR5652GRAY = 21

§

COLOR_BGR2BGR555 = 22

convert between RGB/BGR and BGR555 (16-bit images)

§

COLOR_RGB2BGR555 = 23

§

COLOR_BGR5552BGR = 24

§

COLOR_BGR5552RGB = 25

§

COLOR_BGRA2BGR555 = 26

§

COLOR_RGBA2BGR555 = 27

§

COLOR_BGR5552BGRA = 28

§

COLOR_BGR5552RGBA = 29

§

COLOR_GRAY2BGR555 = 30

convert between grayscale and BGR555 (16-bit images)

§

COLOR_BGR5552GRAY = 31

§

COLOR_BGR2XYZ = 32

convert RGB/BGR to CIE XYZ, [color_convert_rgb_xyz] “color conversions”

§

COLOR_RGB2XYZ = 33

§

COLOR_XYZ2BGR = 34

§

COLOR_XYZ2RGB = 35

§

COLOR_BGR2YCrCb = 36

convert RGB/BGR to luma-chroma (aka YCC), [color_convert_rgb_ycrcb] “color conversions”

§

COLOR_RGB2YCrCb = 37

§

COLOR_YCrCb2BGR = 38

§

COLOR_YCrCb2RGB = 39

§

COLOR_BGR2HSV = 40

convert RGB/BGR to HSV (hue saturation value) with H range 0..180 if 8 bit image, [color_convert_rgb_hsv] “color conversions”

§

COLOR_RGB2HSV = 41

§

COLOR_BGR2Lab = 44

convert RGB/BGR to CIE Lab, [color_convert_rgb_lab] “color conversions”

§

COLOR_RGB2Lab = 45

§

COLOR_BGR2Luv = 50

convert RGB/BGR to CIE Luv, [color_convert_rgb_luv] “color conversions”

§

COLOR_RGB2Luv = 51

§

COLOR_BGR2HLS = 52

convert RGB/BGR to HLS (hue lightness saturation) with H range 0..180 if 8 bit image, [color_convert_rgb_hls] “color conversions”

§

COLOR_RGB2HLS = 53

§

COLOR_HSV2BGR = 54

backward conversions HSV to RGB/BGR with H range 0..180 if 8 bit image

§

COLOR_HSV2RGB = 55

§

COLOR_Lab2BGR = 56

§

COLOR_Lab2RGB = 57

§

COLOR_Luv2BGR = 58

§

COLOR_Luv2RGB = 59

§

COLOR_HLS2BGR = 60

backward conversions HLS to RGB/BGR with H range 0..180 if 8 bit image

§

COLOR_HLS2RGB = 61

§

COLOR_BGR2HSV_FULL = 66

convert RGB/BGR to HSV (hue saturation value) with H range 0..255 if 8 bit image, [color_convert_rgb_hsv] “color conversions”

§

COLOR_RGB2HSV_FULL = 67

§

COLOR_BGR2HLS_FULL = 68

convert RGB/BGR to HLS (hue lightness saturation) with H range 0..255 if 8 bit image, [color_convert_rgb_hls] “color conversions”

§

COLOR_RGB2HLS_FULL = 69

§

COLOR_HSV2BGR_FULL = 70

backward conversions HSV to RGB/BGR with H range 0..255 if 8 bit image

§

COLOR_HSV2RGB_FULL = 71

§

COLOR_HLS2BGR_FULL = 72

backward conversions HLS to RGB/BGR with H range 0..255 if 8 bit image

§

COLOR_HLS2RGB_FULL = 73

§

COLOR_LBGR2Lab = 74

§

COLOR_LRGB2Lab = 75

§

COLOR_LBGR2Luv = 76

§

COLOR_LRGB2Luv = 77

§

COLOR_Lab2LBGR = 78

§

COLOR_Lab2LRGB = 79

§

COLOR_Luv2LBGR = 80

§

COLOR_Luv2LRGB = 81

§

COLOR_BGR2YUV = 82

convert between RGB/BGR and YUV

§

COLOR_RGB2YUV = 83

§

COLOR_YUV2BGR = 84

§

COLOR_YUV2RGB = 85

§

COLOR_YUV2RGB_NV12 = 90

YUV 4:2:0 family to RGB

§

COLOR_YUV2BGR_NV12 = 91

YUV 4:2:0 family to RGB

§

COLOR_YUV2RGB_NV21 = 92

YUV 4:2:0 family to RGB

§

COLOR_YUV2BGR_NV21 = 93

YUV 4:2:0 family to RGB

§

COLOR_YUV2RGBA_NV12 = 94

YUV 4:2:0 family to RGB

§

COLOR_YUV2BGRA_NV12 = 95

YUV 4:2:0 family to RGB

§

COLOR_YUV2RGBA_NV21 = 96

YUV 4:2:0 family to RGB

§

COLOR_YUV2BGRA_NV21 = 97

YUV 4:2:0 family to RGB

§

COLOR_YUV2RGB_YV12 = 98

YUV 4:2:0 family to RGB

§

COLOR_YUV2BGR_YV12 = 99

YUV 4:2:0 family to RGB

§

COLOR_YUV2RGB_IYUV = 100

YUV 4:2:0 family to RGB

§

COLOR_YUV2BGR_IYUV = 101

YUV 4:2:0 family to RGB

§

COLOR_YUV2RGBA_YV12 = 102

YUV 4:2:0 family to RGB

§

COLOR_YUV2BGRA_YV12 = 103

YUV 4:2:0 family to RGB

§

COLOR_YUV2RGBA_IYUV = 104

YUV 4:2:0 family to RGB

§

COLOR_YUV2BGRA_IYUV = 105

YUV 4:2:0 family to RGB

§

COLOR_YUV2GRAY_420 = 106

YUV 4:2:0 family to RGB

§

COLOR_YUV2RGB_UYVY = 107

YUV 4:2:2 family to RGB

§

COLOR_YUV2BGR_UYVY = 108

YUV 4:2:2 family to RGB

§

COLOR_YUV2RGBA_UYVY = 111

YUV 4:2:2 family to RGB

§

COLOR_YUV2BGRA_UYVY = 112

YUV 4:2:2 family to RGB

§

COLOR_YUV2RGB_YUY2 = 115

YUV 4:2:2 family to RGB

§

COLOR_YUV2BGR_YUY2 = 116

YUV 4:2:2 family to RGB

§

COLOR_YUV2RGB_YVYU = 117

YUV 4:2:2 family to RGB

§

COLOR_YUV2BGR_YVYU = 118

YUV 4:2:2 family to RGB

§

COLOR_YUV2RGBA_YUY2 = 119

YUV 4:2:2 family to RGB

§

COLOR_YUV2BGRA_YUY2 = 120

YUV 4:2:2 family to RGB

§

COLOR_YUV2RGBA_YVYU = 121

YUV 4:2:2 family to RGB

§

COLOR_YUV2BGRA_YVYU = 122

YUV 4:2:2 family to RGB

§

COLOR_YUV2GRAY_UYVY = 123

YUV 4:2:2 family to RGB

§

COLOR_YUV2GRAY_YUY2 = 124

YUV 4:2:2 family to RGB

§

COLOR_RGBA2mRGBA = 125

alpha premultiplication

§

COLOR_mRGBA2RGBA = 126

alpha premultiplication

§

COLOR_RGB2YUV_I420 = 127

RGB to YUV 4:2:0 family

§

COLOR_BGR2YUV_I420 = 128

RGB to YUV 4:2:0 family

§

COLOR_RGBA2YUV_I420 = 129

RGB to YUV 4:2:0 family

§

COLOR_BGRA2YUV_I420 = 130

RGB to YUV 4:2:0 family

§

COLOR_RGB2YUV_YV12 = 131

RGB to YUV 4:2:0 family

§

COLOR_BGR2YUV_YV12 = 132

RGB to YUV 4:2:0 family

§

COLOR_RGBA2YUV_YV12 = 133

RGB to YUV 4:2:0 family

§

COLOR_BGRA2YUV_YV12 = 134

RGB to YUV 4:2:0 family

§

COLOR_BayerBG2BGR = 46

equivalent to RGGB Bayer pattern

§

COLOR_BayerGB2BGR = 47

equivalent to GRBG Bayer pattern

§

COLOR_BayerRG2BGR = 48

equivalent to BGGR Bayer pattern

§

COLOR_BayerGR2BGR = 49

equivalent to GBRG Bayer pattern

§

COLOR_BayerBG2GRAY = 86

equivalent to RGGB Bayer pattern

§

COLOR_BayerGB2GRAY = 87

equivalent to GRBG Bayer pattern

§

COLOR_BayerRG2GRAY = 88

equivalent to BGGR Bayer pattern

§

COLOR_BayerGR2GRAY = 89

equivalent to GBRG Bayer pattern

§

COLOR_BayerBG2BGR_VNG = 62

equivalent to RGGB Bayer pattern

§

COLOR_BayerGB2BGR_VNG = 63

equivalent to GRBG Bayer pattern

§

COLOR_BayerRG2BGR_VNG = 64

equivalent to BGGR Bayer pattern

§

COLOR_BayerGR2BGR_VNG = 65

equivalent to GBRG Bayer pattern

§

COLOR_BayerBG2BGR_EA = 135

equivalent to RGGB Bayer pattern

§

COLOR_BayerGB2BGR_EA = 136

equivalent to GRBG Bayer pattern

§

COLOR_BayerRG2BGR_EA = 137

equivalent to BGGR Bayer pattern

§

COLOR_BayerGR2BGR_EA = 138

equivalent to GBRG Bayer pattern

§

COLOR_BayerBG2BGRA = 139

equivalent to RGGB Bayer pattern

§

COLOR_BayerGB2BGRA = 140

equivalent to GRBG Bayer pattern

§

COLOR_BayerRG2BGRA = 141

equivalent to BGGR Bayer pattern

§

COLOR_BayerGR2BGRA = 142

equivalent to GBRG Bayer pattern

§

COLOR_RGB2YUV_UYVY = 143

RGB to YUV 4:2:2 family

§

COLOR_BGR2YUV_UYVY = 144

RGB to YUV 4:2:2 family

§

COLOR_RGBA2YUV_UYVY = 145

RGB to YUV 4:2:2 family

§

COLOR_BGRA2YUV_UYVY = 146

RGB to YUV 4:2:2 family

§

COLOR_RGB2YUV_YUY2 = 147

RGB to YUV 4:2:2 family

§

COLOR_BGR2YUV_YUY2 = 148

RGB to YUV 4:2:2 family

§

COLOR_RGB2YUV_YVYU = 149

RGB to YUV 4:2:2 family

§

COLOR_BGR2YUV_YVYU = 150

RGB to YUV 4:2:2 family

§

COLOR_RGBA2YUV_YUY2 = 151

RGB to YUV 4:2:2 family

§

COLOR_BGRA2YUV_YUY2 = 152

RGB to YUV 4:2:2 family

§

COLOR_RGBA2YUV_YVYU = 153

RGB to YUV 4:2:2 family

§

COLOR_BGRA2YUV_YVYU = 154

RGB to YUV 4:2:2 family

§

COLOR_COLORCVT_MAX = 155

RGB to YUV 4:2:2 family

Trait Implementations§

source§

impl Clone for ColorConversionCodes

source§

fn clone(&self) -> ColorConversionCodes

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for ColorConversionCodes

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl From<ColorConversionCodes> for i32

source§

fn from(v: ColorConversionCodes) -> Self

Converts to this type from the input type.
source§

impl PartialEq for ColorConversionCodes

source§

fn eq(&self, other: &ColorConversionCodes) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl TryFrom<i32> for ColorConversionCodes

§

type Error = Error

The type returned in the event of a conversion error.
source§

fn try_from(value: i32) -> Result<Self, Self::Error>

Performs the conversion.
source§

impl Copy for ColorConversionCodes

source§

impl Eq for ColorConversionCodes

source§

impl StructuralPartialEq for ColorConversionCodes

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.