Esempio n. 1
0
        internal static AzureOcrWord FromDynamic(dynamic word)
        {
            AzureOcrWord azureOcrWord = new AzureOcrWord();

            azureOcrWord.BoundingBox = word.boundingBox;
            azureOcrWord.Text        = word.text;
            return(azureOcrWord);
        }
Esempio n. 2
0
        public static AzureOcrLine FromDynamic(dynamic line)
        {
            AzureOcrLine azureOcrLine = new AzureOcrLine();

            azureOcrLine.BoundingBox = line.boundingBox;
            azureOcrLine.Words       = new List <AzureOcrWord>();
            foreach (var word in line.words)
            {
                azureOcrLine.Words.Add(AzureOcrWord.FromDynamic(word));
            }
            return(azureOcrLine);
        }
Esempio n. 3
0
 private static GenericBoxDetection Get(AzureOcrWord word)
 {
     return(new GenericBoxDetection
     {
         DetectedText = word.Text,
         BoundingBox = new GenericBoundingBox
         {
             Height = word.BoundingBox[0],
             Width = word.BoundingBox[1],
             Left = word.BoundingBox[2],
             Top = word.BoundingBox[3],
         }
     });
 }