/// <summary> /// Converts 8-bit Bgra to 8-bit Gray. /// </summary> /// <param name="bgra">Source color.</param> /// <param name="gray">Destination color.</param> public static void Convert(Bgra <byte> bgra, ref Gray <byte> gray) { Bgr <byte> bgr = default(Bgr <byte>); Convert(bgra, ref bgr); Bgr <byte> .Convert(bgr, ref gray); }
public static Hsv <byte> ToHsv(this Bgr <byte> bgr) { Hsv <byte> hsv = default(Hsv <byte>); Bgr <byte> .Convert(bgr, ref hsv); return(hsv); }
public static Gray <byte> ToGray(this Bgr <byte> bgr) { Gray <byte> gray = default(Gray <byte>); Bgr <byte> .Convert(bgr, ref gray); return(gray); }
/// <summary> /// Converts the source color to the destination color. /// </summary> /// <param name="image">Source image.</param> /// <param name="area">Working area.</param> /// <returns>image with converted color.</returns> public static Hsv <byte>[,] ToHsv(this Bgr <byte>[,] image, Rectangle area) { return(image.Convert <Bgr <byte>, Hsv <byte> >(Bgr <byte> .Convert, area)); }
/// <summary> /// Converts the source color to the destination color. /// </summary> /// <param name="image">Source image.</param> /// <returns>image with converted color.</returns> public static Hsv <byte>[,] ToHsv(this Bgr <byte>[,] image) { return(image.Convert <Bgr <byte>, Hsv <byte> >(Bgr <byte> .Convert)); }
/// <summary> /// Converts the source color to the destination color. /// </summary> /// <param name="image">Source image.</param> /// <param name="area">Working area.</param> /// <returns>image with converted color.</returns> public static Gray <byte>[,] ToGray(this Bgr <byte>[,] image, Rectangle area) { return(image.Convert <Bgr <byte>, Gray <byte> >(Bgr <byte> .Convert, area)); }
/// <summary> /// Converts the source color to the destination color. /// </summary> /// <param name="image">Source image.</param> /// <returns>image with converted color.</returns> public static Gray <byte>[,] ToGray(this Bgr <byte>[,] image) { return(image.Convert <Bgr <byte>, Gray <byte> >(Bgr <byte> .Convert)); }
/// <summary> /// Converts the source color to the destination color. /// </summary> /// <param name="image">Source image.</param> /// <param name="area">Working area.</param> /// <returns>image with converted color.</returns> public static Bgra <byte>[,] ToBgra(this Bgr <byte>[,] image, Rectangle area) { return(image.Convert <Bgr <byte>, Bgra <byte> >(Bgr <byte> .Convert, area)); }
/// <summary> /// Converts the source color to the destination color. /// </summary> /// <param name="image">Source image.</param> /// <returns>image with converted color.</returns> public static Bgra <byte>[,] ToBgra(this Bgr <byte>[,] image) { return(image.Convert <Bgr <byte>, Bgra <byte> >(Bgr <byte> .Convert)); }