コード例 #1
0
ファイル: Bgra.cs プロジェクト: valerysntx/dot-imaging
        /// <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));
 }
コード例 #8
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 Bgra <byte>[,] ToBgra(this Bgr <byte>[,] image, Rectangle area)
 {
     return(image.Convert <Bgr <byte>, Bgra <byte> >(Bgr <byte> .Convert, area));
 }
コード例 #9
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 Bgra <byte>[,] ToBgra(this Bgr <byte>[,] image)
 {
     return(image.Convert <Bgr <byte>, Bgra <byte> >(Bgr <byte> .Convert));
 }