OCR estonien en C# et .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Other versions of this document:

IronOCR est un composant logiciel C# permettant aux développeurs .NET de lire du texte à partir d'images et de documents PDF dans 126 langues, dont l'estonien. 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.Estonien

Ce package contient les langages OCR suivants pour .NET :

  • Estonien
  • EstonianBest
  • EstonianFast

Télécharger

Pack de langue estonienne [Estonien]

  • Télécharger au format Zip
  • Installer avec NuGet

Installation

La première chose à faire est d'installer notre package OCR estonien dans votre projet .NET.

Install-Package IronOCR.Languages.Estonian

Exemple de code

Cet exemple de code C# lit du texte estonien à partir d'une image ou d'un document PDF.

// Import the IronOcr namespace
using IronOcr;

// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();

// Set the OCR language to Estonian
Ocr.Language = OcrLanguage.Estonian;

// Load the image or PDF from which text needs to be extracted
using (var Input = new OcrInput(@"images\Estonian.png"))
{
    // Perform OCR to read text from the specified input
    var Result = Ocr.Read(Input);

    // Extract all the recognized text from the OCR result
    var AllText = Result.Text;
}
// Import the IronOcr namespace
using IronOcr;

// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();

// Set the OCR language to Estonian
Ocr.Language = OcrLanguage.Estonian;

// Load the image or PDF from which text needs to be extracted
using (var Input = new OcrInput(@"images\Estonian.png"))
{
    // Perform OCR to read text from the specified input
    var Result = Ocr.Read(Input);

    // Extract all the recognized text from the OCR result
    var AllText = Result.Text;
}
' Import the IronOcr namespace
Imports IronOcr

' Create a new instance of the IronTesseract class
Private Ocr = New IronTesseract()

' Set the OCR language to Estonian
Ocr.Language = OcrLanguage.Estonian

' Load the image or PDF from which text needs to be extracted
Using Input = New OcrInput("images\Estonian.png")
	' Perform OCR to read text from the specified input
	Dim Result = Ocr.Read(Input)

	' Extract all the recognized text from the OCR result
	Dim AllText = Result.Text
End Using
$vbLabelText   $csharpLabel

Explication du code :

  • IronTesseract : Il s'agit d'une classe principale fournie par IronOCR pour effectuer des opérations OCR.
  • Ocr.Language : En définissant cette propriété, nous spécifions la langue à utiliser lors de la reconnaissance optique de caractères (OCR). Ici, le réglage est en estonien.
  • OcrInput : Ceci permet de spécifier l'image ou le document PDF que nous souhaitons lire. Il prend un chemin de fichier en entrée.
  • Ocr.Read(Input) : Cette méthode traite l'entrée spécifiée et effectue une reconnaissance optique de caractères (OCR) sur celle-ci.
  • Result.Text : Cette propriété contient tout le texte qui a été correctement reconnu et extrait de l'image ou du document PDF.