private static AwsTextDetection MapDetection(TextDetection t) { AwsTextDetection awsTextDetection = new AwsTextDetection(); awsTextDetection.Confidence = t.Confidence; awsTextDetection.DetectedText = t.DetectedText; awsTextDetection.Geometry = GetGeometry(t.Geometry); awsTextDetection.Type = t.Type.Value; return(awsTextDetection); }
private GenericBoxDetection Get(AwsTextDetection awsGeometry) { return(new GenericBoxDetection { DetectedText = awsGeometry.DetectedText, Confidence = awsGeometry.Confidence, BoundingBox = new GenericBoundingBox { Left = (int)(awsGeometry.Geometry.BoundingBox.Left * width), Top = (int)(awsGeometry.Geometry.BoundingBox.Top * height), Width = (int)(awsGeometry.Geometry.BoundingBox.Width * width), Height = (int)(awsGeometry.Geometry.BoundingBox.Height * height) } }); }
private static GenericBoxDetection Get(AwsTextDetection awsGeometry) { return(new GenericBoxDetection { DetectedText = awsGeometry.DetectedText, Confidence = awsGeometry.Confidence, BoundingBox = new GenericBoundingBox { Height = awsGeometry.Geometry.BoundingBox.Height, Width = awsGeometry.Geometry.BoundingBox.Width, Left = awsGeometry.Geometry.BoundingBox.Left, Top = awsGeometry.Geometry.BoundingBox.Top } }); }