Beispiel #1
0
        public bool AcknowledgeStyle(List <List <SubMatrix> > lines)
        {
            var shouldBeCapital = lines.First().First().ToFullMatrix();
            var scale           = ResizeScale(shouldBeCapital);

            Console.WriteLine($"Resize scale received: {scale}");
            recognizer_ = new VaryingLetterRecognizer(font_, 1 / scale);
            return(true);
        }
Beispiel #2
0
        public List <char> ProcessPage(List <List <SubMatrix> > lines)
        {
            if (recognizer_ == null)
            {
                recognizer_ = new VaryingLetterRecognizer(font_, ResizeScale(lines.First().First().ToFullMatrix()));
            }
            List <char> toRet = new List <char>();

            foreach (var line in lines)
            {
                toRet.AddRange(recognizer_.MatchLetters(line.Select(m => m == null ? null : m.ToFullMatrix())));
                toRet.Add('\n');
            }
            return(toRet);
        }