Manejo de ceros con barra en IronOCR
Los ceros con barra no se reconocen correctamente, ¿se identifican como g, 6 u 8?
Esto puede ser un problema con los paquetes de idioma de Tesseract.
El siguiente paquete de idioma puede ayudar a abordar este problema con ceros tachados: SlashedZeroOCR
Esto se puede usar con la función de IronOCR para cargar paquetes de idioma personalizados: Ejemplo de idioma personalizado en 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





