Icelandic 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 Isländisch, zu lesen. Es ist ein fortschrittlicher Fork von Tesseract, der ausschließlich for .NET-Entwickler entwickelt wurde und regelmäßig andere Tesseract-Engines sowohl in Geschwindigkeit als auch Genauigkeit übertrifft.
Inhalt von IronOcr.Languages.Icelandic
Dieses Paket enthält 52 OCR-Sprachen for .NET:
- Isländisch
- IsländischBest
- IsländischFast
Download
Isländisches Sprachpaket [Íslenska]
Installation
Das Erste, was wir tun müssen, ist, unser Isländisches OCR-Paket zu Ihrem .NET-Projekt zu installieren.
Install-Package IronOcr.Languages.Icelandic
Beispielcode
Dieses C# Codebeispiel liest isländischen Text aus einem Bild oder PDF-Dokument.
using IronOcr;
class Program
{
static void Main()
{
// Create an instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Icelandic
Ocr.Language = OcrLanguage.Icelandic;
// Load the image or PDF file to be processed
using (var Input = new OcrInput(@"images\Icelandic.png"))
{
// Perform OCR on the input file
var Result = Ocr.Read(Input);
// Extract all recognized text from the result
var AllText = Result.Text;
// Print the extracted text to the console
System.Console.WriteLine(AllText);
}
}
}
using IronOcr;
class Program
{
static void Main()
{
// Create an instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Icelandic
Ocr.Language = OcrLanguage.Icelandic;
// Load the image or PDF file to be processed
using (var Input = new OcrInput(@"images\Icelandic.png"))
{
// Perform OCR on the input file
var Result = Ocr.Read(Input);
// Extract all recognized text from the result
var AllText = Result.Text;
// Print the extracted text to the console
System.Console.WriteLine(AllText);
}
}
}
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create an instance of the IronTesseract OCR engine
Dim Ocr = New IronTesseract()
' Set the language to Icelandic
Ocr.Language = OcrLanguage.Icelandic
' Load the image or PDF file to be processed
Using Input = New OcrInput("images\Icelandic.png")
' Perform OCR on the input file
Dim Result = Ocr.Read(Input)
' Extract all recognized text from the result
Dim AllText = Result.Text
' Print the extracted text to the console
System.Console.WriteLine(AllText)
End Using
End Sub
End Class
Erklärung
- Die Klasse
IronTesseractist Teil der IronOCR Bibliothek und wurde für die Durchführung von OCR-Operationen entwickelt. Ocr.Language = OcrLanguage.Icelandic;stellt die OCR-Sprache auf Isländisch ein.OcrInputnimmt den Pfad zur Eingabedatei (ein Bild oder eine PDF-Datei) entgegen und bereitet sie für die Verarbeitung vor.Ocr.Read(Input)verarbeitet die Eingabedatei und gibt das OCR-Ergebnis zurück.Result.Textruft den gesamten erkannten Text aus der verarbeiteten Eingabe ab.
Stellen Sie sicher, dass Sie die IronOCR-Bibliothek und ihr isländisches Sprachpaket in Ihrem .NET-Projekt installiert haben, um dieses Beispiel erfolgreich auszuführen.

