Tigrinya OCR in C# and .NET
IronOCR ist eine C#-Softwarekomponente, die .NET-Entwicklern das Lesen von Text aus Bildern und PDF-Dokumenten in 126 Sprachen, einschließlich Tigrinya, ermöglicht. 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.
Inhalte von IronOcr.Languages.Tigrinya
Dieses Paket enthält 49 OCR-Sprachen for .NET:
- Tigrinya
- TigrinyaBest
- TigrinyaFast
Download
Tigrinya Sprachpaket [ትግርኛ]
Installation
Das erste, was wir tun müssen, ist das Tigrinya OCR-Paket in Ihr .NET-Projekt zu installieren.
Install-Package IronOcr.Languages.Tigrinya
Beispielcode
Dieses C#-Codebeispiel liest Tigrinya-Text aus einem Bild oder PDF-Dokument.
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of IronTesseract to perform OCR
var Ocr = new IronTesseract();
// Set the OCR language to Tigrinya
Ocr.Language = OcrLanguage.Tigrinya;
// Using statement ensures the OcrInput object is disposed of after use
using (var Input = new OcrInput(@"images\Tigrinya.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract all text recognized in the image and store it in a variable
var AllText = Result.Text;
// Output the extracted text
Console.WriteLine(AllText);
}
}
}
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of IronTesseract to perform OCR
var Ocr = new IronTesseract();
// Set the OCR language to Tigrinya
Ocr.Language = OcrLanguage.Tigrinya;
// Using statement ensures the OcrInput object is disposed of after use
using (var Input = new OcrInput(@"images\Tigrinya.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract all text recognized in the image and store it in a variable
var AllText = Result.Text;
// Output the extracted text
Console.WriteLine(AllText);
}
}
}
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create a new instance of IronTesseract to perform OCR
Dim Ocr = New IronTesseract()
' Set the OCR language to Tigrinya
Ocr.Language = OcrLanguage.Tigrinya
' Using statement ensures the OcrInput object is disposed of after use
Using Input = New OcrInput("images\Tigrinya.png")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Extract all text recognized in the image and store it in a variable
Dim AllText = Result.Text
' Output the extracted text
Console.WriteLine(AllText)
End Using
End Sub
End Class
Erklärung
- IronTesseract: Dies ist eine spezialisierte Klasse von IronOCR, die zur Texterkennung verwendet wird.
- Ocr.Language: Legt die vom OCR-Engine verwendete Sprache fest. In diesem Fall ist es auf Tigrinya eingestellt.
- OcrInput: Repräsentiert die Eingabequelle, in diesem Fall ein Bild, das in Text umgewandelt wird.
- Ocr.Read(Input): Führt OCR auf der angegebenen Eingabe aus und gibt die Ergebnisse zurück.
- Result.Text: Enthält den Text, der aus dem Eingabebild nach dem OCR-Prozess extrahiert wurde.
- Console.WriteLine(AllText): Gibt den extrahierten Text auf der Konsole aus. Diese Zeile ist optional und kann entfernt werden, wenn keine Konsolenausgabe benötigt wird.

