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);
        }
Beispiel #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);
        }
Beispiel #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);
        }