BuildIt.CognitiveServices.ComputerVisionAPIV10Extensions.OCRAsync C# (CSharp) Метод

OCRAsync() публичный статический Метод

Optical Character Recognition (OCR) detects text in an image and extracts the recognized characters into a machine-usable character stream. <p/> Upon success, the OCR results will be returned. <p/> Upon failure, the error code together with an error message will be returned. The error code can be one of InvalidImageUrl, InvalidImageFormat, InvalidImageSize, NotSupportedImage, NotSupportedLanguage, or InternalServerError. <h4>Http Method</h4> POST
public static OCRAsync ( this operations, string language = "unk", bool detectOrientation = true, string subscriptionKey = default(string), string ocpApimSubscriptionKey = default(string), System cancellationToken = default(System.Threading.CancellationToken) ) : System.Threading.Tasks.Task
operations this /// The operations group for this extension method. ///
language string /// The BCP-47 language code of the text to be detected in the image.The /// default value is &quot;unk&quot;, then the service will auto /// detect the language of the text in the image.<br /> /// <br /> /// Supported languages: /// <ul style="margin-left:.375in;direction:ltr;unicode-bidi:embed; /// margin-top:0in;margin-bottom:0in" type="disc"> /// <li>unk (AutoDetect)</li> /// <li>zh-Hans (ChineseSimplified)</li> /// <li>zh-Hant (ChineseTraditional)</li> /// <li>cs (Czech)</li> /// <li>da (Danish)</li> /// <li>nl (Dutch)</li> /// <li>en (English)</li> /// <li>fi (Finnish)</li> /// <li>fr (French)</li> /// <li>de (German)</li> /// <li>el (Greek)</li> /// <li>hu (Hungarian)</li> /// <li>it (Italian)</li> /// <li>Ja (Japanese)</li> /// <li>ko (Korean)</li> /// <li>nb (Norwegian)</li> /// <li>pl (Polish)</li> /// <li>pt (Portuguese,</li> /// <li>ru (Russian)</li> /// <li>es (Spanish)</li> /// <li>sv (Swedish)</li> /// <li>tr (Turkish)</li> /// </ul>. Possible values include: 'unk', 'zh-Hans', ' zh-Hant', /// 'cs', 'da', 'nl', 'en', 'fi', 'fr', 'de', 'el', 'hu', 'it', 'ja', 'ko', /// 'nb', 'pl', 'pt', 'ru', 'es', 'sv', 'tr' ///
detectOrientation bool /// Whether detect the text orientation in the image. With /// detectOrientation=true the OCR service tries to detect the image /// orientation and correct it before further processing (e.g. if it's /// upside-down). ///
subscriptionKey string /// subscription key in url ///
ocpApimSubscriptionKey string /// subscription key in header ///
cancellationToken System /// The cancellation token. ///
Результат System.Threading.Tasks.Task
            public static async System.Threading.Tasks.Task OCRAsync(this IComputerVisionAPIV10 operations, string language = "unk", bool? detectOrientation = true, string subscriptionKey = default(string), string ocpApimSubscriptionKey = default(string), System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken))
            {
                await operations.OCRWithHttpMessagesAsync(language, detectOrientation, subscriptionKey, ocpApimSubscriptionKey, null, cancellationToken).ConfigureAwait(false);
            }