English OCR in C# and .NET
IronOCR est un composant logiciel C# permettant aux programmeurs .NET de lire le texte des images et des documents PDF dans 126 langues, y compris l'anglais.
Il s'agit d'une version avancée de Tesseract, conçue exclusivement pour les développeurs .NET et qui surpasse régulièrement les autres moteurs Tesseract en termes de vitesse et de précision.
Contenu de IronOcr.Languages.English
Ce package contient 64 langues OCR for .NET :
Télécharger
Pack de langue anglaise [Anglais moderne]
- Télécharger en tant que Zip
Exemple de code
Cet exemple de code C# lit le texte anglais à partir d'une image ou d'un document PDF.
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to English
Ocr.Language = OcrLanguage.English;
// Define the input source as an image file
using (var Input = new OcrInput(@"images\English.png"))
{
// Perform OCR to read the text from the input
var Result = Ocr.Read(Input);
// Get all the recognized text
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to English
Ocr.Language = OcrLanguage.English;
// Define the input source as an image file
using (var Input = new OcrInput(@"images\English.png"))
{
// Perform OCR to read the text from the input
var Result = Ocr.Read(Input);
// Get all the recognized text
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
Imports IronOcr
Class Program
Shared Sub Main()
' Initialize the IronTesseract OCR engine
Dim Ocr As New IronTesseract()
' Set the language to English
Ocr.Language = OcrLanguage.English
' Define the input source as an image file
Using Input As New OcrInput("images\English.png")
' Perform OCR to read the text from the input
Dim Result = Ocr.Read(Input)
' Get all the recognized text
Dim AllText = Result.Text
' Output the recognized text
Console.WriteLine(AllText)
End Using
End Sub
End Class
- Assurez-vous d'avoir installé le package IronOCR et le pack de langue approprié.
- Cet exemple initialise le moteur OCR, le configure pour traiter l'anglais, lit le texte d'une image d'entrée, et affiche le texte reconnu.

