Algorithmix.Preprocessing.Preprocessing.Orient_Hough C# (CSharp) Метод

Orient_Hough() публичный статический Метод

public static Orient_Hough ( Bitmap blob ) : Bitmap
blob System.Drawing.Bitmap
Результат System.Drawing.Bitmap
        public static Bitmap Orient_Hough(Bitmap blob)
        {
            GC.Collect();
            Grayscale filter = new Grayscale(0.2125, 0.7154, 0.0721);
            Bitmap documentImage = filter.Apply(blob);
            //Bitmap documentImage =  AForge.Imaging.Image.Clone(blob, PixelFormat.Format16bppGrayScale); //force the jpgs
            // create instance of skew checker
            DocumentSkewChecker skewChecker = new DocumentSkewChecker();
            // get documents skew angle
            double angle = skewChecker.GetSkewAngle(documentImage);
            // rotate image applying the filter
            return RotateImg(blob, (int)-angle, Color.Transparent);
        }