Obsługa przekreślonych zer w IronOCR
Przekreślone zera nie są poprawnie rozpoznawane, identyfikowane jako g, 6 lub 8?
Może to być problem z pakietami językowymi Tesseract.
Następujący pakiet językowy może pomóc w rozwiązaniu problemu z przekreślonymi zerami: SlashedZeroOCR
Można go następnie użyć z funkcją IronOCR do ładowania niestandardowych pakietów językowych: Przykład niestandardowego języka w IronOCR
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main(string[] args)
{
// Initialize IronTesseract class
var Ocr = new IronTesseract();
// Use a custom Tesseract language file, which may help with recognizing slashed zeros
Ocr.UseCustomTesseractLanguageFile("custom_tesseract_files/custom.traineddata");
// Specify the OCR input image
using (var Input = new OcrInput(@"images\image.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Output the recognized text to the console
Console.WriteLine(Result.Text);
}
}
}
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main(string[] args)
{
// Initialize IronTesseract class
var Ocr = new IronTesseract();
// Use a custom Tesseract language file, which may help with recognizing slashed zeros
Ocr.UseCustomTesseractLanguageFile("custom_tesseract_files/custom.traineddata");
// Specify the OCR input image
using (var Input = new OcrInput(@"images\image.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Output the recognized text to the console
Console.WriteLine(Result.Text);
}
}
}
' Import the IronOcr namespace
Imports IronOcr
Friend Class Program
Shared Sub Main(ByVal args() As String)
' Initialize IronTesseract class
Dim Ocr = New IronTesseract()
' Use a custom Tesseract language file, which may help with recognizing slashed zeros
Ocr.UseCustomTesseractLanguageFile("custom_tesseract_files/custom.traineddata")
' Specify the OCR input image
Using Input = New OcrInput("images\image.png")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Output the recognized text to the console
Console.WriteLine(Result.Text)
End Using
End Sub
End Class

