Gestion des zéros barrés pour la reconnaissance de texte dans IronOCR
Les zéros barrés ne sont pas correctement reconnus, identifiés comme g, 6 ou 8 ?
La reconnaissance de texte des zéros barrés peut poser problème avec les packs de langue Tesseract de ce logiciel OCR.
Le pack de langue suivant peut aider à résoudre ce problème avec les zéros barrés :
SlashedZeroOCR
Cette fonctionnalité peut ensuite être utilisée avec IronOCR pour charger des packs de langue personnalisés :
Exemple de langue personnalisée dans 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

