Indonesian OCR in C# and .NET
Inne wersje tego dokumentu:
IronOCR to komponent oprogramowania C#, który pozwala programistom .NET na odczytywanie tekstu z obrazów i dokumentów PDF w 126 językach, w tym po indonezyjsku. Jest to zaawansowany fork Tesseracta, zbudowany wyłącznie dla deweloperów .NET i regularnie przewyższający inne silniki Tesseract pod względem szybkości i dokładności.
Zawartość IronOcr.Languages.Indonesian
Ten pakiet zawiera 55 języków OCR dla .NET:
- Indonesian
- IndonesianBest
- IndonesianFast
Pobieranie
Pakiet języka indonezyjskiego [Bahasa Indonesia]
Instalacja
Pierwszą rzeczą, którą musimy zrobić, to zainstalować nasz pakiet Indonesian OCR w twoim projekcie .NET.
Install-Package IronOcr.Languages.Indonesian
Przyklad kodu
Ten przykład kodu C# odczytuje tekst w języku indonezyjskim z obrazu lub dokumentu 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
- Ten skrypt demonstruje, jak używać silnika OCR IronTesseract do odczytywania i rozpoznawania tekstu w języku indonezyjskim z obrazu.
- Używa klasy
OcrInput, aby określić źródłowy obraz, a następnieOcr.Read()do przetwarzania obrazu i wyodrębniania tekstu. - Rozpoznany tekst jest przechowywany w zmiennej
AllTexti drukowany na konsolę.

