Aspose.OCR.Examples.CSharp.FormattingAndManipulatingOCR.SettingOcrEngineAutomaticallyDetect.Run C# (CSharp) Метод

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

public static Run ( ) : void
Результат void
        public static void Run()
        {
            // ExStart:SettingOcrEngineAutomaticallyDetect
            // The path to the documents directory.
            string dataDir = RunExamples.GetDataDir_OMR();

            // Create an instance of OcrEngine class
            OcrEngine ocr = new OcrEngine();

            // Set the Image property of OcrEngine by reading an image file
            ocr.Image = ImageStream.FromFile(dataDir+ "Sampleocr.bmp");

            // Set the DetectReadingOrder to true
            ocr.Config.DetectReadingOrder = true;

            // Perform OCR operation
            if (ocr.Process())
            {
                // Display results
                Console.WriteLine(ocr.Text);
            }
            // ExEnd:SettingOcrEngineAutomaticallyDetect
        }
    }
SettingOcrEngineAutomaticallyDetect