TextRecognizer Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Represents an object that can perform AI-based optical character recognition (OCR) within an image and detect, extract, and convert text into a character stream.
public ref class TextRecognizer sealed : IClosable
/// [Windows.Foundation.Metadata.ContractVersion(Microsoft.Windows.AI.Imaging.TextRecognitionContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class TextRecognizer final : IClosable
[Windows.Foundation.Metadata.ContractVersion(typeof(Microsoft.Windows.AI.Imaging.TextRecognitionContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class TextRecognizer : System.IDisposable
Public NotInheritable Class TextRecognizer
Implements IDisposable
- Inheritance
- Attributes
- Implements
Remarks
Can be used to identify characters, words, lines, polygonal text boundaries, and provide confidence levels for each match.
Methods
| Name | Description |
|---|---|
| Close() |
Disposes of the object and associated resources. |
| CreateAsync() |
Asynchronously creates a new instance of the TextRecognizer class. |
| Dispose() |
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
| EnsureReadyAsync() |
Ensures that the TextRecognizer is ready for use by downloading and installing any required components. |
| GetReadyState() |
Retrieves the state of the underlying language model. |
| RecognizeTextFromImage(ImageBuffer, TextRecognizerOptions) | |
| RecognizeTextFromImage(ImageBuffer) |
Recognize text in an image. |
| RecognizeTextFromImageAsync(ImageBuffer, TextRecognizerOptions) | |
| RecognizeTextFromImageAsync(ImageBuffer) |
Asynchronously recognize text in an image. |