Indonesian OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Outras versões deste documento:

IronOCR é um componente de software C# que permite aos programadores .NET ler textos de imagens e documentos PDF em 126 idiomas, incluindo indonésio. Trata-se de uma versão avançada do Tesseract, criada exclusivamente para desenvolvedores .NET e que supera regularmente outros mecanismos do Tesseract em termos de velocidade e precisão.

Conteúdo do IronOcr.Languages.Indonesian

Este pacote contém 55 linguagens OCR for .NET:

  • Indonésio
  • IndonesianBest
  • IndonesianFast

Baixar

Pacote de Idioma Indonésio [Bahasa Indonesia]

Instalação

A primeira coisa que precisamos fazer é instalar nosso pacote OCR Indonésio em seu projeto .NET.

Install-Package IronOcr.Languages.Indonesian

Exemplo de código

Este exemplo de código C# lê texto em indonésio de uma imagem ou 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);
}
$vbLabelText   $csharpLabel
  • Este script demonstra como usar o mecanismo OCR IronTesseract para ler e reconhecer texto em indonésio a partir de uma imagem.
  • Ele utiliza a classe OcrInput para especificar a imagem fonte e, em seguida, Ocr.Read() para processar a imagem e extrair o texto.
  • O texto reconhecido é armazenado na variável AllText e impresso no console.