Hoby
Hoby

Reputation: 1077

How to use OCR in Windows 10 apps (UWP)?

How do you use OCR in UWP? In previous windows 8.1 apps the OcrEngine initialization was like this:

OcrEngine ocrEngine = new OcrEngine(OcrLanguage.English);

but when in UWP it doesn't work. So how do you use OCR in windows 10 apps?

Thanks in advance.

Upvotes: 2

Views: 2367

Answers (1)

jicler
jicler

Reputation: 823

You can find OcrEngine class in Windows.Media.Ocr namespace, use TryCreateFromLanguage method to create a new OcrEngine instance.

Language ocrLanguage = new Language("en");
OcrEngine ocrEngine = OcrEngine.TryCreateFromLanguage(ocrLanguage);

Upvotes: 4

Related Questions