Maltese 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 Maltesisch, zu lesen.
Es ist eine fortschrittliche Abspaltung von Tesseract, die ausschließlich for .NET-Entwickler gebaut wurde und regelmäßig andere Tesseract-Engines sowohl in Geschwindigkeit als auch Genauigkeit übertrifft.
Inhalte von IronOcr.Languages.Maltese
Dieses Paket enthält 46 OCR-Sprachen for .NET:
- Maltesisch
- MalteseBest
- MalteseFast
Download
Maltesisches Sprachpaket [Malti]
Installation
Das Erste, was wir tun müssen, ist unser Maltesisch OCR-Paket in Ihr .NET-Projekt zu installieren.
Install-Package IronOcr.Languages.Maltese
Beispielcode
Dieses C#-Codebeispiel liest maltesischen Text aus einem Bild oder PDF-Dokument.
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Maltese
Ocr.Language = OcrLanguage.Maltese;
// Define the input image or PDF document
using (var Input = new OcrInput(@"images\Maltese.png"))
{
// Perform OCR on the input and retrieve the result
var Result = Ocr.Read(Input);
// Get all the recognized text
var AllText = Result.Text;
// Output the recognized text to the console
Console.WriteLine(AllText);
}
}
}
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Maltese
Ocr.Language = OcrLanguage.Maltese;
// Define the input image or PDF document
using (var Input = new OcrInput(@"images\Maltese.png"))
{
// Perform OCR on the input and retrieve the result
var Result = Ocr.Read(Input);
// Get all the recognized text
var AllText = Result.Text;
// Output the recognized text to the console
Console.WriteLine(AllText);
}
}
}
' Import the IronOcr namespace
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Initialize the IronTesseract OCR engine
Dim Ocr = New IronTesseract()
' Set the OCR language to Maltese
Ocr.Language = OcrLanguage.Maltese
' Define the input image or PDF document
Using Input = New OcrInput("images\Maltese.png")
' Perform OCR on the input and retrieve the result
Dim Result = Ocr.Read(Input)
' Get all the recognized text
Dim AllText = Result.Text
' Output the recognized text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class
In diesem Beispiel wird die IronTesseract OCR-Engine verwendet, um Text aus einer Bilddatei mit dem Namen Maltese.png zu lesen. Der erkannte Text wird dann auf die Konsole gedruckt. Stellen Sie sicher, dass der Bildpfad korrekt ist und die Bilddatei maltesischen Text enthält, damit das OCR effektiv funktioniert. Die using-Anweisung stellt sicher, dass Ressourcen ordnungsgemäß entsorgt werden, sobald sie nicht mehr benötigt werden.

