在 IronOCR 中处理零号斜线
This article was translated from English: Does it need improvement?
TranslatedView the article in English
斜线零未能正确识别,被识别为g、6或8?
这可能是Tesseract语言包的问题。
以下语言包可能有助于解决带斜杠的零的问题:
https://github.com/yusufuyanik1/SlashedZeroOCR
然后就可以使用 IronOCR 功能加载自定义语言包:
https://ironsoftware.com/csharp/ocr/languages/#custom-language-example
using IronOcr; var Ocr = new IronTesseract();
Ocr.UseCustomTesseractLanguageFile("custom_tesseract_files/custom.traineddata");
using (var Input = new OcrInput(@"images\image.png"))
{
var Result = Ocr.Read(Input);
Console.WriteLine(Result.Text);
}
using IronOcr; var Ocr = new IronTesseract();
Ocr.UseCustomTesseractLanguageFile("custom_tesseract_files/custom.traineddata");
using (var Input = new OcrInput(@"images\image.png"))
{
var Result = Ocr.Read(Input);
Console.WriteLine(Result.Text);
}
Imports IronOcr
Private Ocr = New IronTesseract()
Ocr.UseCustomTesseractLanguageFile("custom_tesseract_files/custom.traineddata")
Using Input = New OcrInput("images\image.png")
Dim Result = Ocr.Read(Input)
Console.WriteLine(Result.Text)
End Using
VB C#