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 WindowsOcrResult FromDynamic(dynamic ocrResult) { var result = new WindowsOcrResult(); result.Lines = new List <OcrLine>(); foreach (var line in ocrResult.Lines) { result.Lines.Add(OcrLine.FromDynamic(line)); } result.Text = ocrResult.Text; return(result); }