예제 #1
0
        /// <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);
        }
예제 #2
0
        public static Hsv <byte> ToHsv(this Bgr <byte> bgr)
        {
            Hsv <byte> hsv = default(Hsv <byte>);

            Bgr <byte> .Convert(bgr, ref hsv);

            return(hsv);
        }
예제 #3
0
        public static Gray <byte> ToGray(this Bgr <byte> bgr)
        {
            Gray <byte> gray = default(Gray <byte>);

            Bgr <byte> .Convert(bgr, ref gray);

            return(gray);
        }
예제 #4
0
 /// <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));
 }
예제 #5
0
 /// <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));
 }
예제 #6
0
 /// <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));
 }
예제 #7
0
 /// <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));
 }