Optical Character Recognition (OCR) for Windows 10

Windows

Windows
Optical Character Recognition (OCR) is part of the Universal Windows Platform (UWP), which means that it can be used in all apps targeting Windows 10. With OCR you can extract text and text layout information from images. It’s designed to handle various types of images, from scanned documents to photos. At the same time, it is highly optimized and runs entirely on the device without requiring an Internet connection. The Windows 10 November update enables OCR for four new languages, bringing the total number of supported languages to 25.

This technology has been heavily tested inside Microsoft for years. It’s used in major products like Word, OneNote, OneDrive, Bing,
Please, Log in or Register to view URLs content!
, and
Please, Log in or Register to view URLs content!
for various scenarios, including image indexing, document reconstruction, and augmented reality.

Using the OCR API is very simple, as demonstrated by this code snippet:




SoftwareBitmap bitmap;

// ...
// Acquire bitmap from file, camera, ...
// ...

OcrEngine ocrEngine = OcrEngine.TryCreateFromUserProfileLanguages();
OcrResult ocrResult = await ocrEngine.RecognizeAsync(bitmap);

string extractedText = ocrResult.Text;




Running the code on the image below extracts the following text:

“TRAVEL THE WORLD SEE THE SIGHTS HAVE GREAT DAYS AND BETTER NIGHTS”

img-1024x659.jpg


OcrResult can be also used to retrieve text line by line or find position of each individual word. For more information, please check out the
Please, Log in or Register to view URLs content!
at GitHub and
Please, Log in or Register to view URLs content!
.

This work is the evolution of
Please, Log in or Register to view URLs content!
, released on NuGet in 2014. If you used this library in an app for Windows/Windows Phone 8.1, moving to the new OCR API in Windows 10 will be straightforward.

In case you need to use OCR as a service, we’ve got you covered as well. The same technology is released as part of
Please, Log in or Register to view URLs content!
(a set of services for natural data understanding—we recommend you check it out as it brings a number of possibilities for your apps). Compared to the
Please, Log in or Register to view URLs content!
, the service has additional features such as language detection and text orientation detection. Try experimenting with the
Please, Log in or Register to view URLs content!
and get detailed info in the
Please, Log in or Register to view URLs content!
.

We’re looking forward to your new, amazing OCR-powered apps in the Windows Store. If you’d like to share feedback, ask a question, or start a discussion, please post on
Please, Log in or Register to view URLs content!
. We’ll be eagerly waiting to hear back from you!

Written by Pavle Josipovic, a Software Engineer on the Analog team

Please, Log in or Register to view URLs content!
 

Users who are viewing this thread

Top