Esempio n. 1
0
        private void Analyze()
        {
            //var dic = GetEulerContainer(@"..\..\..\Qocr.Dics\RU-ru.bin");
            var dic = GetEulerContainer(@"..\..\Qocr.Dics\EN-en.bin");

            DateTime nowInit = DateTime.Now;

            // ИСПОЛЬЗУЙ Gen.bin
            _recognizer = _recognizer ?? new TextRecognizer(dic);

            DateTime nowRecognition = DateTime.Now;
            var      bitmap         = BitmapUtils.BitmapFromSource((BitmapSource)ApproximatedImage);
            var      report         = _recognizer.Recognize(bitmap);

            MessageBox.Show(
                $"Init time: {nowRecognition - nowInit}\n\rRecognition time: {DateTime.Now - nowRecognition}");

            RecognitionVisualizerUtils.Visualize(bitmap, report);
            ApproximatedImage = BitmapUtils.SourceFromBitmap(bitmap);
        }