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