DEV Community

IronSoftware
IronSoftware

Posted on • Originally published at ironsoftware.com

2 1

MultiThreaded Tesseract OCR

IronTesseract 2021 used to have a ReadMultithreaded method to allow .NET developers to read images and PDFs more efficiently.

This is no longer needed in 2022. All IronOCR image processing and OCER reading operations are multithreaded and do not require the developer to use a special API.

IronTesseract will automatically attempt to use all threads available on all cores, and will consider responsiveness on the main / GUI thread elegantly.

C#:

using IronOcr;

var Ocr = new IronTesseract();

using (var Input = new OcrInput())
{
    Input.AddPdf("scan.pdf")

    // Image processing is automatically multi-threaded
    Input.Deskew();

    // OCR reading is automatically multi-threaded too
    var Result = Ocr.Read(Input);     
}
Enter fullscreen mode Exit fullscreen mode

VB:

Imports IronOcr

Private Ocr = New IronTesseract()

Using Input = New OcrInput()
    Input.AddPdf("scan.pdf") Input.Deskew()

    ' OCR reading is automatically multi-threaded too
    Dim Result = Ocr.Read(Input)
End Using
Enter fullscreen mode Exit fullscreen mode

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

Billboard image

The Next Generation Developer Platform

Coherence is the first Platform-as-a-Service you can control. Unlike "black-box" platforms that are opinionated about the infra you can deploy, Coherence is powered by CNC, the open-source IaC framework, which offers limitless customization.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay