public static AwsOcrResponse Get(DetectTextResponse detectTextResponse)
        {
            AwsOcrResponse ocrResponse = new AwsOcrResponse();

            ocrResponse.TextModelVersion = detectTextResponse.TextModelVersion;
            ocrResponse.TextDetections   = detectTextResponse.TextDetections.Select(t => MapDetection(t)).ToList();
            return(ocrResponse);
        }
Esempio n. 2
0
        public static GenericOcrResponse Map(AwsOcrResponse awsResponse)
        {
            var response = new GenericOcrResponse();

            response.SummaryText = string.Join(" ", awsResponse.TextDetections.Select(td => td.DetectedText));

            response.Detections = awsResponse.TextDetections.Select(td => Get(td)).ToList();
            return(response);
        }
Esempio n. 3
0
        public GenericOcrResponse Map(AwsOcrResponse awsResponse)
        {
            using (MagickImage img = new MagickImage(awsResponse.InputImage))
            {
                this.width  = img.Width;
                this.height = img.Height;
            }

            var response = new GenericOcrResponse();

            response.SummaryText = string.Join(" ", awsResponse.TextDetections.Select(td => td.DetectedText));

            response.Detections = awsResponse.TextDetections.Select(td => Get(td)).ToList();
            return(response);
        }