using IronOcr;
using System;
var ocrTesseract = new IronTesseract();
// Fast Dictionary
ocrTesseract.Language = OcrLanguage.EnglishFast;
// Turn off unneeded options
ocrTesseract.Configuration.ReadBarCodes = false;
ocrTesseract.Configuration.RenderSearchablePdfsAndHocr = false;
// Assume text is laid out neatly in an orthogonal document
ocrTesseract.Configuration.PageSegmentationMode = TesseractPageSegmentationMode.Auto;
using (var ocrInput = new OcrInput(@"images\image.png"))
{
var ocrResult = ocrTesseract.Read(ocrInput);
Console.WriteLine(ocrResult.Text);
}
Imports IronOcr
Imports System
Private ocrTesseract = New IronTesseract()
' Fast Dictionary
ocrTesseract.Language = OcrLanguage.EnglishFast
' Turn off unneeded options
ocrTesseract.Configuration.ReadBarCodes = False
ocrTesseract.Configuration.RenderSearchablePdfsAndHocr = False
' Assume text is laid out neatly in an orthogonal document
ocrTesseract.Configuration.PageSegmentationMode = TesseractPageSegmentationMode.Auto
Using ocrInput As New OcrInput("images\image.png")
Dim ocrResult = ocrTesseract.Read(ocrInput)
Console.WriteLine(ocrResult.Text)
End Using