Handling Slashed Zeros in IronOCR

This article was translated from English: Does it need improvement?
Translated
View the article in English

Slashed zeros are not recognized correctly, identified as g, 6 or 8?

This can be an issue with the Tesseract language packs.

The following language pack may help to address this issue with slashed zeros:
SlashedZeroOCR

This can then be used with the IronOCR feature to load custom language packs:
Custom Language Example in 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
$vbLabelText   $csharpLabel
Curtis Chau
Escritor Técnico

Curtis Chau tiene una licenciatura en Ciencias de la Computación (Carleton University) y se especializa en el desarrollo front-end con experiencia en Node.js, TypeScript, JavaScript y React. Apasionado por crear interfaces de usuario intuitivas y estéticamente agradables, disfruta trabajando con frameworks modernos y creando manuales bien ...

Leer más
¿Listo para empezar?
Nuget Descargas 5,044,537 | Versión: 2025.11 recién lanzado