Exemple #1
0
        public static OcrLine FromDynamic(dynamic ocrLine)
        {
            OcrLine line = new OcrLine();

            line.Text  = ocrLine.Text;
            line.Words = new List <Word>();
            foreach (var word in ocrLine.Words)
            {
                line.Words.Add(Word.FromDynamic(word));
            }
            return(line);
        }
        public static OcrResult FromDynamic(dynamic ocrResult)
        {
            var result = new OcrResult();

            result.Text  = ocrResult.Text;
            result.Lines = new List <OcrLine>();
            foreach (var line in ocrResult.Lines)
            {
                result.Lines.Add(OcrLine.FromDynamic(line));
            }
            return(result);
        }