#[repr(C)]
pub enum ColorConversionCodes {
Show 138 variants COLOR_BGR2BGRA, COLOR_BGRA2BGR, COLOR_BGR2RGBA, COLOR_RGBA2BGR, COLOR_BGR2RGB, COLOR_BGRA2RGBA, COLOR_BGR2GRAY, COLOR_RGB2GRAY, COLOR_GRAY2BGR, COLOR_GRAY2BGRA, COLOR_BGRA2GRAY, COLOR_RGBA2GRAY, COLOR_BGR2BGR565, COLOR_RGB2BGR565, COLOR_BGR5652BGR, COLOR_BGR5652RGB, COLOR_BGRA2BGR565, COLOR_RGBA2BGR565, COLOR_BGR5652BGRA, COLOR_BGR5652RGBA, COLOR_GRAY2BGR565, COLOR_BGR5652GRAY, COLOR_BGR2BGR555, COLOR_RGB2BGR555, COLOR_BGR5552BGR, COLOR_BGR5552RGB, COLOR_BGRA2BGR555, COLOR_RGBA2BGR555, COLOR_BGR5552BGRA, COLOR_BGR5552RGBA, COLOR_GRAY2BGR555, COLOR_BGR5552GRAY, COLOR_BGR2XYZ, COLOR_RGB2XYZ, COLOR_XYZ2BGR, COLOR_XYZ2RGB, COLOR_BGR2YCrCb, COLOR_RGB2YCrCb, COLOR_YCrCb2BGR, COLOR_YCrCb2RGB, COLOR_BGR2HSV, COLOR_RGB2HSV, COLOR_BGR2Lab, COLOR_RGB2Lab, COLOR_BGR2Luv, COLOR_RGB2Luv, COLOR_BGR2HLS, COLOR_RGB2HLS, COLOR_HSV2BGR, COLOR_HSV2RGB, COLOR_Lab2BGR, COLOR_Lab2RGB, COLOR_Luv2BGR, COLOR_Luv2RGB, COLOR_HLS2BGR, COLOR_HLS2RGB, COLOR_BGR2HSV_FULL, COLOR_RGB2HSV_FULL, COLOR_BGR2HLS_FULL, COLOR_RGB2HLS_FULL, COLOR_HSV2BGR_FULL, COLOR_HSV2RGB_FULL, COLOR_HLS2BGR_FULL, COLOR_HLS2RGB_FULL, COLOR_LBGR2Lab, COLOR_LRGB2Lab, COLOR_LBGR2Luv, COLOR_LRGB2Luv, COLOR_Lab2LBGR, COLOR_Lab2LRGB, COLOR_Luv2LBGR, COLOR_Luv2LRGB, COLOR_BGR2YUV, COLOR_RGB2YUV, COLOR_YUV2BGR, COLOR_YUV2RGB, COLOR_YUV2RGB_NV12, COLOR_YUV2BGR_NV12, COLOR_YUV2RGB_NV21, COLOR_YUV2BGR_NV21, COLOR_YUV2RGBA_NV12, COLOR_YUV2BGRA_NV12, COLOR_YUV2RGBA_NV21, COLOR_YUV2BGRA_NV21, COLOR_YUV2RGB_YV12, COLOR_YUV2BGR_YV12, COLOR_YUV2RGB_IYUV, COLOR_YUV2BGR_IYUV, COLOR_YUV2RGBA_YV12, COLOR_YUV2BGRA_YV12, COLOR_YUV2RGBA_IYUV, COLOR_YUV2BGRA_IYUV, COLOR_YUV2GRAY_420, COLOR_YUV2RGB_UYVY, COLOR_YUV2BGR_UYVY, COLOR_YUV2RGBA_UYVY, COLOR_YUV2BGRA_UYVY, COLOR_YUV2RGB_YUY2, COLOR_YUV2BGR_YUY2, COLOR_YUV2RGB_YVYU, COLOR_YUV2BGR_YVYU, COLOR_YUV2RGBA_YUY2, COLOR_YUV2BGRA_YUY2, COLOR_YUV2RGBA_YVYU, COLOR_YUV2BGRA_YVYU, COLOR_YUV2GRAY_UYVY, COLOR_YUV2GRAY_YUY2, COLOR_RGBA2mRGBA, COLOR_mRGBA2RGBA, COLOR_RGB2YUV_I420, COLOR_BGR2YUV_I420, COLOR_RGBA2YUV_I420, COLOR_BGRA2YUV_I420, COLOR_RGB2YUV_YV12, COLOR_BGR2YUV_YV12, COLOR_RGBA2YUV_YV12, COLOR_BGRA2YUV_YV12, COLOR_BayerBG2BGR, COLOR_BayerGB2BGR, COLOR_BayerRG2BGR, COLOR_BayerGR2BGR, COLOR_BayerBG2GRAY, COLOR_BayerGB2GRAY, COLOR_BayerRG2GRAY, COLOR_BayerGR2GRAY, COLOR_BayerBG2BGR_VNG, COLOR_BayerGB2BGR_VNG, COLOR_BayerRG2BGR_VNG, COLOR_BayerGR2BGR_VNG, COLOR_BayerBG2BGR_EA, COLOR_BayerGB2BGR_EA, COLOR_BayerRG2BGR_EA, COLOR_BayerGR2BGR_EA, COLOR_BayerBG2BGRA, COLOR_BayerGB2BGRA, COLOR_BayerRG2BGRA, COLOR_BayerGR2BGRA, COLOR_COLORCVT_MAX,
}
Expand description

the color conversion codes

See also

@ref imgproc_color_conversions @ingroup imgproc_color_conversions

Variants

COLOR_BGR2BGRA

add alpha channel to RGB or BGR image

COLOR_BGRA2BGR

remove alpha channel from RGB or BGR image

COLOR_BGR2RGBA

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

COLOR_RGBA2BGR

COLOR_BGR2RGB

COLOR_BGRA2RGBA

COLOR_BGR2GRAY

convert between RGB/BGR and grayscale, @ref color_convert_rgb_gray “color conversions”

COLOR_RGB2GRAY

COLOR_GRAY2BGR

COLOR_GRAY2BGRA

COLOR_BGRA2GRAY

COLOR_RGBA2GRAY

COLOR_BGR2BGR565

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

COLOR_RGB2BGR565

COLOR_BGR5652BGR

COLOR_BGR5652RGB

COLOR_BGRA2BGR565

COLOR_RGBA2BGR565

COLOR_BGR5652BGRA

COLOR_BGR5652RGBA

COLOR_GRAY2BGR565

convert between grayscale to BGR565 (16-bit images)

COLOR_BGR5652GRAY

COLOR_BGR2BGR555

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

COLOR_RGB2BGR555

COLOR_BGR5552BGR

COLOR_BGR5552RGB

COLOR_BGRA2BGR555

COLOR_RGBA2BGR555

COLOR_BGR5552BGRA

COLOR_BGR5552RGBA

COLOR_GRAY2BGR555

convert between grayscale and BGR555 (16-bit images)

COLOR_BGR5552GRAY

COLOR_BGR2XYZ

convert RGB/BGR to CIE XYZ, @ref color_convert_rgb_xyz “color conversions”

COLOR_RGB2XYZ

COLOR_XYZ2BGR

COLOR_XYZ2RGB

COLOR_BGR2YCrCb

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

COLOR_RGB2YCrCb

COLOR_YCrCb2BGR

COLOR_YCrCb2RGB

COLOR_BGR2HSV

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

COLOR_RGB2HSV

COLOR_BGR2Lab

convert RGB/BGR to CIE Lab, @ref color_convert_rgb_lab “color conversions”

COLOR_RGB2Lab

COLOR_BGR2Luv

convert RGB/BGR to CIE Luv, @ref color_convert_rgb_luv “color conversions”

COLOR_RGB2Luv

COLOR_BGR2HLS

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

COLOR_RGB2HLS

COLOR_HSV2BGR

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

COLOR_HSV2RGB

COLOR_Lab2BGR

COLOR_Lab2RGB

COLOR_Luv2BGR

COLOR_Luv2RGB

COLOR_HLS2BGR

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

COLOR_HLS2RGB

COLOR_BGR2HSV_FULL

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

COLOR_RGB2HSV_FULL

COLOR_BGR2HLS_FULL

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

COLOR_RGB2HLS_FULL

COLOR_HSV2BGR_FULL

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

COLOR_HSV2RGB_FULL

COLOR_HLS2BGR_FULL

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

COLOR_HLS2RGB_FULL

COLOR_LBGR2Lab

COLOR_LRGB2Lab

COLOR_LBGR2Luv

COLOR_LRGB2Luv

COLOR_Lab2LBGR

COLOR_Lab2LRGB

COLOR_Luv2LBGR

COLOR_Luv2LRGB

COLOR_BGR2YUV

convert between RGB/BGR and YUV

COLOR_RGB2YUV

COLOR_YUV2BGR

COLOR_YUV2RGB

COLOR_YUV2RGB_NV12

YUV 4:2:0 family to RGB

COLOR_YUV2BGR_NV12

YUV 4:2:0 family to RGB

COLOR_YUV2RGB_NV21

YUV 4:2:0 family to RGB

COLOR_YUV2BGR_NV21

YUV 4:2:0 family to RGB

COLOR_YUV2RGBA_NV12

YUV 4:2:0 family to RGB

COLOR_YUV2BGRA_NV12

YUV 4:2:0 family to RGB

COLOR_YUV2RGBA_NV21

YUV 4:2:0 family to RGB

COLOR_YUV2BGRA_NV21

YUV 4:2:0 family to RGB

COLOR_YUV2RGB_YV12

YUV 4:2:0 family to RGB

COLOR_YUV2BGR_YV12

YUV 4:2:0 family to RGB

COLOR_YUV2RGB_IYUV

YUV 4:2:0 family to RGB

COLOR_YUV2BGR_IYUV

YUV 4:2:0 family to RGB

COLOR_YUV2RGBA_YV12

YUV 4:2:0 family to RGB

COLOR_YUV2BGRA_YV12

YUV 4:2:0 family to RGB

COLOR_YUV2RGBA_IYUV

YUV 4:2:0 family to RGB

COLOR_YUV2BGRA_IYUV

YUV 4:2:0 family to RGB

COLOR_YUV2GRAY_420

YUV 4:2:0 family to RGB

COLOR_YUV2RGB_UYVY

YUV 4:2:2 family to RGB

COLOR_YUV2BGR_UYVY

YUV 4:2:2 family to RGB

COLOR_YUV2RGBA_UYVY

YUV 4:2:2 family to RGB

COLOR_YUV2BGRA_UYVY

YUV 4:2:2 family to RGB

COLOR_YUV2RGB_YUY2

YUV 4:2:2 family to RGB

COLOR_YUV2BGR_YUY2

YUV 4:2:2 family to RGB

COLOR_YUV2RGB_YVYU

YUV 4:2:2 family to RGB

COLOR_YUV2BGR_YVYU

YUV 4:2:2 family to RGB

COLOR_YUV2RGBA_YUY2

YUV 4:2:2 family to RGB

COLOR_YUV2BGRA_YUY2

YUV 4:2:2 family to RGB

COLOR_YUV2RGBA_YVYU

YUV 4:2:2 family to RGB

COLOR_YUV2BGRA_YVYU

YUV 4:2:2 family to RGB

COLOR_YUV2GRAY_UYVY

YUV 4:2:2 family to RGB

COLOR_YUV2GRAY_YUY2

YUV 4:2:2 family to RGB

COLOR_RGBA2mRGBA

alpha premultiplication

COLOR_mRGBA2RGBA

alpha premultiplication

COLOR_RGB2YUV_I420

RGB to YUV 4:2:0 family

COLOR_BGR2YUV_I420

RGB to YUV 4:2:0 family

COLOR_RGBA2YUV_I420

RGB to YUV 4:2:0 family

COLOR_BGRA2YUV_I420

RGB to YUV 4:2:0 family

COLOR_RGB2YUV_YV12

RGB to YUV 4:2:0 family

COLOR_BGR2YUV_YV12

RGB to YUV 4:2:0 family

COLOR_RGBA2YUV_YV12

RGB to YUV 4:2:0 family

COLOR_BGRA2YUV_YV12

RGB to YUV 4:2:0 family

COLOR_BayerBG2BGR

equivalent to RGGB Bayer pattern

COLOR_BayerGB2BGR

equivalent to GRBG Bayer pattern

COLOR_BayerRG2BGR

equivalent to BGGR Bayer pattern

COLOR_BayerGR2BGR

equivalent to GBRG Bayer pattern

COLOR_BayerBG2GRAY

equivalent to RGGB Bayer pattern

COLOR_BayerGB2GRAY

equivalent to GRBG Bayer pattern

COLOR_BayerRG2GRAY

equivalent to BGGR Bayer pattern

COLOR_BayerGR2GRAY

equivalent to GBRG Bayer pattern

COLOR_BayerBG2BGR_VNG

equivalent to RGGB Bayer pattern

COLOR_BayerGB2BGR_VNG

equivalent to GRBG Bayer pattern

COLOR_BayerRG2BGR_VNG

equivalent to BGGR Bayer pattern

COLOR_BayerGR2BGR_VNG

equivalent to GBRG Bayer pattern

COLOR_BayerBG2BGR_EA

equivalent to RGGB Bayer pattern

COLOR_BayerGB2BGR_EA

equivalent to GRBG Bayer pattern

COLOR_BayerRG2BGR_EA

equivalent to BGGR Bayer pattern

COLOR_BayerGR2BGR_EA

equivalent to GBRG Bayer pattern

COLOR_BayerBG2BGRA

equivalent to RGGB Bayer pattern

COLOR_BayerGB2BGRA

equivalent to GRBG Bayer pattern

COLOR_BayerRG2BGRA

equivalent to BGGR Bayer pattern

COLOR_BayerGR2BGRA

equivalent to GBRG Bayer pattern

COLOR_COLORCVT_MAX

Trait Implementations

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

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

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.