Handling Slashed Zeros in IronOCR
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);
}
}
}





