/// <summary>
 /// Converts the source color to the destination color.
 /// </summary>
 /// <param name="grayIm">Source image.</param>
 /// <param name="area">Working area.</param>
 /// <returns>image with converted color.</returns>
 public static Bgr <byte>[,] ToBgr(this Gray <byte>[,] grayIm, Rectangle area)
 {
     return(grayIm.Convert <Gray <byte>, Bgr <byte> >(Gray <byte> .Convert, area));
 }
 /// <summary>
 /// Converts the grayscale image to a complex image where the specified image is taken as a real part.
 /// </summary>
 /// <param name="image">Real part of a complex image.</param>
 /// <returns>Complex image.</returns>
 public static ComplexF[,] ToComplex(this Gray <float>[,] image)
 {
     return(image.Convert <Gray <float>, ComplexF>(convertGrayToComplex));
 }
 /// <summary>
 /// Converts the source color to the destination color.
 /// </summary>
 /// <param name="grayIm">Source image.</param>
 /// <returns>image with converted color.</returns>
 public static Bgr <byte>[,] ToBgr(this Gray <byte>[,] grayIm)
 {
     return(grayIm.Convert <Gray <byte>, Bgr <byte> >(Gray <byte> .Convert));
 }