Class TesseractOcrEngine
- Namespace
- SoftZenPdf.Ocr
- Assembly
- SoftZenPdf.Ocr.dll
Recognises text with Tesseract 5 (the LSTM engine). One instance loads the language data once and can be reused for any number of images; calls are serialised, so create one engine per thread to recognise images in parallel.
public sealed class TesseractOcrEngine : IOcrEngine, IDisposable
- Inheritance
-
TesseractOcrEngine
- Implements
- Inherited Members
- Extension Methods
Remarks
On Windows the native Tesseract and Leptonica libraries ship with the package (x64 and x86). On Linux install them
from the distribution (for example apt install libtesseract5 libleptonica-dev); see the package readme.
Constructors
- TesseractOcrEngine(TesseractOcrOptions)
Loads the language data.
Methods
- Dispose()
Releases the native engine.
- Recognize(PdfImage)
Recognises the text in an image, honouring its EXIF or TIFF orientation.