pub fn red_channel<I, C>(image: &I) -> Image<Luma<C>>
Expand description
Creates a grayscale image by extracting the red channel of an RGB image.
ยงExamples
use image::Luma;
use imageproc::map::red_channel;
let image = rgb_image!(
[1, 2, 3], [2, 4, 6];
[3, 6, 9], [4, 8, 12]);
let expected = gray_image!(
1, 2;
3, 4);
let actual = red_channel(&image);
assert_pixels_eq!(actual, expected);