Galician 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 Galizisch, zu extrahieren.
Es ist ein fortgeschrittener Fork von Tesseract, der speziell for .NET-Entwickler entwickelt wurde und andere Tesseract-Engines in Bezug auf Geschwindigkeit und Genauigkeit konsequent übertrifft.
Inhalte von IronOcr.Languages.Galician
Dieses Paket enthält 49 OCR-Sprachen for .NET, einschließlich:
- Galizisch
- GalizischBest
- GalizischFast
Download
Galizisches Sprachpaket [galego]
Installation
Der erste Schritt zur Nutzung des Galizischen OCR-Pakets in Ihrem .NET-Projekt ist die Installation.
Install-Package IronOcr.Languages.Galician
Beispielcode
Das folgende C#-Codebeispiel zeigt, wie man Galizischen Text aus einem Bild oder PDF-Dokument liest.
// Include the IronOcr library
using IronOcr;
class Program
{
static void Main()
{
// Instantiate the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Specify the language for OCR as Galician
Ocr.Language = OcrLanguage.Galician;
// Define the input source, here it is an image file
using (var Input = new OcrInput(@"images\Galician.png"))
{
// Perform the OCR process on the input image
var Result = Ocr.Read(Input);
// Retrieve the recognized text from the OCR result
var AllText = Result.Text;
// Output the extracted text to the console
Console.WriteLine(AllText);
}
}
}
// Include the IronOcr library
using IronOcr;
class Program
{
static void Main()
{
// Instantiate the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Specify the language for OCR as Galician
Ocr.Language = OcrLanguage.Galician;
// Define the input source, here it is an image file
using (var Input = new OcrInput(@"images\Galician.png"))
{
// Perform the OCR process on the input image
var Result = Ocr.Read(Input);
// Retrieve the recognized text from the OCR result
var AllText = Result.Text;
// Output the extracted text to the console
Console.WriteLine(AllText);
}
}
}
' Include the IronOcr library
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Instantiate the IronTesseract OCR engine
Dim Ocr = New IronTesseract()
' Specify the language for OCR as Galician
Ocr.Language = OcrLanguage.Galician
' Define the input source, here it is an image file
Using Input = New OcrInput("images\Galician.png")
' Perform the OCR process on the input image
Dim Result = Ocr.Read(Input)
' Retrieve the recognized text from the OCR result
Dim AllText = Result.Text
' Output the extracted text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class
Im obigen Code:
- Wir verwenden die IronTesseract-Klasse, um ein OCR-Engine-Objekt zu erstellen.
- Wir setzen die OCR-Sprache auf Galizisch, um sicherzustellen, dass die OCR-Engine Galizischen Text genau verarbeitet.
- Dann lesen wir die Bilddatei unter "images\Galician.png" ein und erhalten den erkannten Text.
- Schließlich drucken wir den erkannten Text auf die Konsole.

