OCR indonésien 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'indonésien. 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 d'IronOcr.Languages.Indonésien

Ce package contient 55 langues OCR pour .NET :

  • Indonésien
  • IndonesianBest
  • IndonesianFast

Télécharger

Pack de langue indonésienne [Bahasa Indonesia]

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

Installation

La première chose à faire est d'installer notre package OCR indonésien sur votre projet .NET.

Install-Package IronOCR.Languages.Indonesian

Exemple de code

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

// Ensure the IronOCR package is installed:
// PM> Install-Package IronOcr.Languages.Indonesian

using IronOcr;

var Ocr = new IronTesseract();
// Set the OCR language to Indonesian
Ocr.Language = OcrLanguage.Indonesian;

// Use the OCR engine to read text from an image
using (var Input = new OcrInput(@"images\Indonesian.png"))
{
    // Perform OCR on the given input
    var Result = Ocr.Read(Input);

    // Retrieve all recognized text
    var AllText = Result.Text;

    // Print the recognized text to the console
    Console.WriteLine(AllText);
}
// Ensure the IronOCR package is installed:
// PM> Install-Package IronOcr.Languages.Indonesian

using IronOcr;

var Ocr = new IronTesseract();
// Set the OCR language to Indonesian
Ocr.Language = OcrLanguage.Indonesian;

// Use the OCR engine to read text from an image
using (var Input = new OcrInput(@"images\Indonesian.png"))
{
    // Perform OCR on the given input
    var Result = Ocr.Read(Input);

    // Retrieve all recognized text
    var AllText = Result.Text;

    // Print the recognized text to the console
    Console.WriteLine(AllText);
}
' Ensure the IronOCR package is installed:
' PM> Install-Package IronOcr.Languages.Indonesian

Imports IronOcr

Private Ocr = New IronTesseract()
' Set the OCR language to Indonesian
Ocr.Language = OcrLanguage.Indonesian

' Use the OCR engine to read text from an image
Using Input = New OcrInput("images\Indonesian.png")
	' Perform OCR on the given input
	Dim Result = Ocr.Read(Input)

	' Retrieve all recognized text
	Dim AllText = Result.Text

	' Print the recognized text to the console
	Console.WriteLine(AllText)
End Using
$vbLabelText   $csharpLabel
  • Ce script montre comment utiliser le moteur OCR IronTesseract pour lire et reconnaître du texte indonésien à partir d'une image.
  • Elle utilise la classe OcrInput pour spécifier l'image source, puis Ocr.Read() pour traiter l'image et extraire le texte.
  • Le texte reconnu est stocké dans la variable AllText et affiché dans la console.