/// <summary>
        /// Rectification filter for projective transformation.
        /// <para>Accord.NET internal call. Please see: <see cref="Accord.Imaging.Filters.Rectification"/> for details.</para>
        /// </summary>
        /// <param name="img">Image.</param>
        /// <param name="homography">The homography matrix used to map a image passed to the filter to the overlay image.</param>
        /// <param name="fillColor">The filling color used to fill blank spaces.</param>
        /// <returns>Rectified image.</returns>
        public static Gray <byte>[,] Rectification(this Gray <byte>[,] img, double[,] homography, Gray <byte> fillColor)
        {
            Rectification r = new Rectification(homography);

            r.FillColor = fillColor.ToColor();

            return(img.ApplyBaseTransformationFilter(r));
        }