Indonesian OCR in C# and .NET
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);
}
' 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
- 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
OcrInputpara especificar a imagem fonte e, em seguida,Ocr.Read()para processar a imagem e extrair o texto. - O texto reconhecido é armazenado na variável
AllTexte impresso no console.

