Sundanese OCR in C# and .NET
Andere Versionen dieses Dokuments:
IronOCR ist eine C#-Softwarekomponente, die es .NET-Entwicklern ermöglicht, Text aus Bildern und PDF-Dokumenten in 126 Sprachen, einschließlich Sundanesisch, zu lesen.
Es ist eine erweiterte Abspaltung von Tesseract, die exklusiv for .NET-Entwickler entwickelt wurde und regelmäßig andere Tesseract-Engines sowohl in Bezug auf Geschwindigkeit als auch Genauigkeit übertrifft.
Inhalt von IronOcr.Languages.Sundanese
Dieses Paket enthält 52 OCR-Sprachen for .NET:
- Sundanesisch
- SundanesischBest
- SundanesischFast
Download
Sundanese Sprachpaket [Basa Sunda]
Installation
Das erste, was wir tun müssen, ist, unser Sundanese OCR-Paket in Ihr .NET-Projekt zu installieren.
Install-Package IronOcr.Languages.Sundanese
Beispielcode
Dieses C#-Codebeispiel liest Sundanesischen Text aus einem Bild oder PDF-Dokument.
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Specify the language the OCR engine should use
Ocr.Language = OcrLanguage.Sundanese;
// Initialize the OCR input with an image file containing Sundanese text
using (var Input = new OcrInput(@"images\Sundanese.png"))
{
// Process the input and get the result
var Result = Ocr.Read(Input);
// Extract all recognized text from the result
var AllText = Result.Text;
// Output the recognized text
System.Console.WriteLine(AllText);
}
}
}
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Specify the language the OCR engine should use
Ocr.Language = OcrLanguage.Sundanese;
// Initialize the OCR input with an image file containing Sundanese text
using (var Input = new OcrInput(@"images\Sundanese.png"))
{
// Process the input and get the result
var Result = Ocr.Read(Input);
// Extract all recognized text from the result
var AllText = Result.Text;
// Output the recognized text
System.Console.WriteLine(AllText);
}
}
}
' Import the IronOcr namespace
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create a new instance of the IronTesseract class
Dim Ocr = New IronTesseract()
' Specify the language the OCR engine should use
Ocr.Language = OcrLanguage.Sundanese
' Initialize the OCR input with an image file containing Sundanese text
Using Input = New OcrInput("images\Sundanese.png")
' Process the input and get the result
Dim Result = Ocr.Read(Input)
' Extract all recognized text from the result
Dim AllText = Result.Text
' Output the recognized text
System.Console.WriteLine(AllText)
End Using
End Sub
End Class
Erklärung
- Zunächst importieren wir den Namespace
IronOcr, um dessen OCR-Funktionalität zu nutzen. - Es wird eine Instanz von
IronTesseracterstellt, die als unsere Haupt-OCR-Engine fungiert. - Wir setzen die Eigenschaft
LanguageaufOcrLanguage.Sundanese, um anzugeben, dass die Engine davon ausgehen soll, sundanesischen Text zu lesen. - Wir erstellen ein
OcrInput-Objekt, um die Bilddateiquelle für unsere OCR-Engine anzugeben. - Die
Read-Methode verarbeitet die Eingabe und versucht, Text zu erkennen. - Der erkannte Text wird in der Variablen
AllTextgespeichert und anschließend auf der Konsole PRINTed.
Dieses Setup ermöglicht die robuste Erkennung sundanesischer Sprachtexte aus Bildern mit der IronOCR-Bibliothek in einer .NET-Umgebung.

