opencv::gapi

Function rgb2_gray_1

source
pub fn rgb2_gray_1(
    src: &impl GMatTraitConst,
    r_y: f32,
    g_y: f32,
    b_y: f32,
) -> Result<GMat>
Expand description

Converts an image from RGB color space to gray-scaled.

The conventional ranges for R, G, and B channel values are 0 to 255. Resulting gray color value computed as block formula

Note: Function textual ID is “org.opencv.imgproc.colorconvert.rgb2gray”

§Parameters

  • src: input image: 8-bit unsigned 3-channel image [CV_8UC1].

§See also

RGB2YUV

§Overloaded parameters

Resulting gray color value computed as block formula

Note: Function textual ID is “org.opencv.imgproc.colorconvert.rgb2graycustom”

  • src: input image: 8-bit unsigned 3-channel image [CV_8UC1].
  • rY: float multiplier for R channel.
  • gY: float multiplier for G channel.
  • bY: float multiplier for B channel. RGB2YUV