Tesseract详细配置
IronTesseract.Configuration "对象提供了对 C# / .NET 中底层 Tesseract API 的访问,以便为高级用户配置设置。
using IronOcr; using System; var ocrTesseract = new IronTesseract() { Language = OcrLanguage.EnglishBest, Configuration = new TesseractConfiguration() { ReadBarCodes = false, RenderHocr = true, BlackListCharacters = "`ë|^", PageSegmentationMode = TesseractPageSegmentationMode.AutoOsd, } }; using var ocrInput = new OcrInput(); ocrInput.LoadImage(@"images\image.png"); var ocrResult = ocrTesseract.Read(ocrInput); Console.WriteLine(ocrResult.Text);
Imports IronOcr Imports System Private ocrTesseract = New IronTesseract() With { .Language = OcrLanguage.EnglishBest, .Configuration = New TesseractConfiguration() With { .ReadBarCodes = False, .RenderHocr = True, .BlackListCharacters = "`ë|^", .PageSegmentationMode = TesseractPageSegmentationMode.AutoOsd } } Private ocrInput = New OcrInput() ocrInput.LoadImage("images\image.png") Dim ocrResult = ocrTesseract.Read(ocrInput) Console.WriteLine(ocrResult.Text)
Install-Package IronOcr
IronTesseract.Configuration "对象提供了对 C# / .NET 中底层 Tesseract API 的访问,以便为高级用户配置设置。