Platforms to show: All Mac Windows Linux Cross-Platform

WindowsOCREngineMBS class

Type Topic Plugin Version macOS Windows Linux iOS Targets
class Windows OCR MBS WinFrameworks Plugin 23.1 ❌ No ✅ Yes ❌ No ❌ No Desktop, Console & Web
Provides optical character recognition (OCR) functionality.
Example
// recognize text in an image file on Windows 10 and newer
If Not WindowsOCREngineMBS.Available Then
MessageBox "OCR is not available."
Return
End If

Var engine As New WindowsOCREngineMBS // uses the user's languages
Var file As FolderItem = SpecialFolder.Desktop.Child("scan.png")
Var result As WindowsOCRResultMBS = engine.RecognizeSync(file)

If result <> Nil Then
MessageBox result.Text
End If

Requires Windows 10 (introduced in 10.0.10240.0)

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

Our plugin class allows you to run the OCR operation either synchronously or asynchronously. The asynchronous operation runs in the background on a separated preemptive thread, so your application GUI is not blocked and this is the preferred way.

Alternatively, you can use the synchronous versions, which block the GUI.

This class has no subclasses.

Blog Entries

Xojo Developer Magazine

Release notes

Some examples using this class:

Some related classes:


The items on this page are in the following plugins: MBS WinFrameworks Plugin.


WindowsMutexMBS   -   WindowsOCRExceptionMBS


The biggest plugin in space...