| | 1 | | // <auto-generated> |
| | 2 | | // Copyright (c) Microsoft Corporation. All rights reserved. |
| | 3 | | // Licensed under the MIT License. See License.txt in the project root for |
| | 4 | | // license information. |
| | 5 | | // |
| | 6 | | // Code generated by Microsoft (R) AutoRest Code Generator. |
| | 7 | | // Changes may cause incorrect behavior and will be lost if the code is |
| | 8 | | // regenerated. |
| | 9 | | // </auto-generated> |
| | 10 | |
|
| | 11 | | namespace Microsoft.Azure.CognitiveServices.Vision.ComputerVision.Models |
| | 12 | | { |
| | 13 | | using Newtonsoft.Json; |
| | 14 | | using System.Collections; |
| | 15 | | using System.Collections.Generic; |
| | 16 | | using System.Linq; |
| | 17 | |
|
| | 18 | | public partial class OcrResult |
| | 19 | | { |
| | 20 | | /// <summary> |
| | 21 | | /// Initializes a new instance of the OcrResult class. |
| | 22 | | /// </summary> |
| 4 | 23 | | public OcrResult() |
| | 24 | | { |
| | 25 | | CustomInit(); |
| 4 | 26 | | } |
| | 27 | |
|
| | 28 | | /// <summary> |
| | 29 | | /// Initializes a new instance of the OcrResult class. |
| | 30 | | /// </summary> |
| | 31 | | /// <param name="language">The BCP-47 language code of the text in the |
| | 32 | | /// image.</param> |
| | 33 | | /// <param name="textAngle">The angle, in radians, of the detected text |
| | 34 | | /// with respect to the closest horizontal or vertical direction. After |
| | 35 | | /// rotating the input image clockwise by this angle, the recognized |
| | 36 | | /// text lines become horizontal or vertical. In combination with the |
| | 37 | | /// orientation property it can be used to overlay recognition results |
| | 38 | | /// correctly on the original image, by rotating either the original |
| | 39 | | /// image or recognition results by a suitable angle around the center |
| | 40 | | /// of the original image. If the angle cannot be confidently detected, |
| | 41 | | /// this property is not present. If the image contains text at |
| | 42 | | /// different angles, only part of the text will be recognized |
| | 43 | | /// correctly.</param> |
| | 44 | | /// <param name="orientation">Orientation of the text recognized in the |
| | 45 | | /// image, if requested. The value (up, down, left, or right) refers to |
| | 46 | | /// the direction that the top of the recognized text is facing, after |
| | 47 | | /// the image has been rotated around its center according to the |
| | 48 | | /// detected text angle (see textAngle property). |
| | 49 | | /// If detection of the orientation was not requested, or no text is |
| | 50 | | /// detected, the value is 'NotDetected'.</param> |
| | 51 | | /// <param name="regions">An array of objects, where each object |
| | 52 | | /// represents a region of recognized text.</param> |
| 0 | 53 | | public OcrResult(string language = default(string), double textAngle = default(double), string orientation = def |
| | 54 | | { |
| 0 | 55 | | Language = language; |
| 0 | 56 | | TextAngle = textAngle; |
| 0 | 57 | | Orientation = orientation; |
| 0 | 58 | | Regions = regions; |
| | 59 | | CustomInit(); |
| 0 | 60 | | } |
| | 61 | |
|
| | 62 | | /// <summary> |
| | 63 | | /// An initialization method that performs custom operations like setting defaults |
| | 64 | | /// </summary> |
| | 65 | | partial void CustomInit(); |
| | 66 | |
|
| | 67 | | /// <summary> |
| | 68 | | /// Gets or sets the BCP-47 language code of the text in the image. |
| | 69 | | /// </summary> |
| | 70 | | [JsonProperty(PropertyName = "language")] |
| 8 | 71 | | public string Language { get; set; } |
| | 72 | |
|
| | 73 | | /// <summary> |
| | 74 | | /// Gets or sets the angle, in radians, of the detected text with |
| | 75 | | /// respect to the closest horizontal or vertical direction. After |
| | 76 | | /// rotating the input image clockwise by this angle, the recognized |
| | 77 | | /// text lines become horizontal or vertical. In combination with the |
| | 78 | | /// orientation property it can be used to overlay recognition results |
| | 79 | | /// correctly on the original image, by rotating either the original |
| | 80 | | /// image or recognition results by a suitable angle around the center |
| | 81 | | /// of the original image. If the angle cannot be confidently detected, |
| | 82 | | /// this property is not present. If the image contains text at |
| | 83 | | /// different angles, only part of the text will be recognized |
| | 84 | | /// correctly. |
| | 85 | | /// </summary> |
| | 86 | | [JsonProperty(PropertyName = "textAngle")] |
| 8 | 87 | | public double TextAngle { get; set; } |
| | 88 | |
|
| | 89 | | /// <summary> |
| | 90 | | /// Gets or sets orientation of the text recognized in the image, if |
| | 91 | | /// requested. The value (up, down, left, or right) refers to the |
| | 92 | | /// direction that the top of the recognized text is facing, after the |
| | 93 | | /// image has been rotated around its center according to the detected |
| | 94 | | /// text angle (see textAngle property). |
| | 95 | | /// If detection of the orientation was not requested, or no text is |
| | 96 | | /// detected, the value is 'NotDetected'. |
| | 97 | | /// </summary> |
| | 98 | | [JsonProperty(PropertyName = "orientation")] |
| 8 | 99 | | public string Orientation { get; set; } |
| | 100 | |
|
| | 101 | | /// <summary> |
| | 102 | | /// Gets or sets an array of objects, where each object represents a |
| | 103 | | /// region of recognized text. |
| | 104 | | /// </summary> |
| | 105 | | [JsonProperty(PropertyName = "regions")] |
| 32 | 106 | | public IList<OcrRegion> Regions { get; set; } |
| | 107 | |
|
| | 108 | | } |
| | 109 | | } |