OcrEngine OcrEngine OcrEngine OcrEngine OcrEngine Class


Provides optical character recognition (OCR) functionality.

public : sealed class OcrEngine : IOcrEngine
struct winrt::Windows::Media::Ocr::OcrEngine : IOcrEngine
public sealed class OcrEngine : IOcrEngine
Public NotInheritable Class OcrEngine Implements IOcrEngine
// This class does not provide a public constructor.
Windows 10 requirements
Device family
Windows 10 (introduced v10.0.10240.0 - for Xbox, see UWP features that aren't yet supported on Xbox)
API contract
Windows.Foundation.UniversalApiContract (introduced v1)


To use the OCR capabilities of the OcrEngine class in your app, call the RecognizeAsync method. When you call the RecognizeAsync method of the OcrEngine class, the method returns an OcrResult object, which contains the recognized text and its size and position. The result is split into lines, and the lines are split into words.

  • The OcrResult contains a collection of OcrLine objects, which you access through the Lines property of the OcrResult.
  • Each OcrLine object contains a collection of OcrWord objects, which you access through the Words property of each OcrLine.
  • Each OcrWord object specifies the text, size, and position information of the word in the image.


AvailableRecognizerLanguages AvailableRecognizerLanguages AvailableRecognizerLanguages AvailableRecognizerLanguages AvailableRecognizerLanguages

Returns a collection of all available OCR languages on the device.

MaxImageDimension MaxImageDimension MaxImageDimension MaxImageDimension MaxImageDimension

Gets the maximum image pixel dimensions supported by the OCR engine.

RecognizerLanguage RecognizerLanguage RecognizerLanguage RecognizerLanguage RecognizerLanguage

Gets the language being used for text recognition.


IsLanguageSupported(Language) IsLanguageSupported(Language) IsLanguageSupported(Language) IsLanguageSupported(Language) IsLanguageSupported(Language)

Returns true if a specified language can be resolved to any of the available OCR languages. See language matching for a further explanation of language resolving.

RecognizeAsync(SoftwareBitmap) RecognizeAsync(SoftwareBitmap) RecognizeAsync(SoftwareBitmap) RecognizeAsync(SoftwareBitmap) RecognizeAsync(SoftwareBitmap)

Scans the specified image for text in the language specified by the RecognizerLanguage property.

TryCreateFromLanguage(Language) TryCreateFromLanguage(Language) TryCreateFromLanguage(Language) TryCreateFromLanguage(Language) TryCreateFromLanguage(Language)

Creates a new instance of the OcrEngine class.

TryCreateFromUserProfileLanguages() TryCreateFromUserProfileLanguages() TryCreateFromUserProfileLanguages() TryCreateFromUserProfileLanguages() TryCreateFromUserProfileLanguages()

Creates a new instance of the OcrEngine class.