OCR indonesio en C# y .NET

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

IronOCR es un componente de software en C# que permite a los programadores de .NET leer texto de imágenes y documentos PDF en 126 idiomas, incluido el indonesio. Es una rama avanzada de Tesseract, construida exclusivamente para desarrolladores de .NET y supera regularmente a otros motores de Tesseract tanto en velocidad como en precisión.

Contenido de IronOcr.Languages.Indonesian

Este paquete contiene 55 idiomas OCR para .NET:

  • Indonesio
  • IndonesianBest
  • IndonesianFast

Descargar

Paquete de idioma indonesio [Bahasa Indonesia]

Instalación

Lo primero que debemos hacer es instalar nuestro paquete OCR indonesio en tu proyecto .NET.

Install-Package IronOCR.Languages.Indonesian

Ejemplo de código

Este ejemplo de código en C# lee texto en indonesio de una imagen o documento 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
  • Este script demuestra cómo usar el motor OCR IronTesseract para leer y reconocer texto en indonesio desde una imagen.
  • Utiliza la clase OcrInput para especificar la imagen de origen, y luego Ocr.Read() para procesar la imagen y extraer texto.
  • El texto reconocido se almacena en la variable AllText y se imprime en la consola.