Romanian OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
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 Rumänisch, 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.Romanian

Dieses Paket enthält 49 OCR-Sprachen for .NET:

  • Rumänisch
  • RumänischBest
  • RumänischFast

Download

Rumänisches Sprachpaket [limba română]

Installation

Das erste, was wir tun müssen, ist, unser Rumänisch OCR-Paket in Ihr .NET-Projekt zu installieren.

Install-Package IronOcr.Languages.Romanian

Beispielcode

Dieses C#-Beispiel liest rumänischen Text aus einem Bild oder PDF-Dokument.

// Ensure you have installed the Romanian OCR package using the following NuGet command:
// PM> Install-Package IronOcr.Languages.Romanian

using IronOcr;

var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Romanian;

using (var Input = new OcrInput(@"images\Romanian.png")) 
{
    // Perform OCR on the input image, and store the result
    var Result = Ocr.Read(Input);

    // Extract all recognized text from the OCR result
    var AllText = Result.Text;

    // Display the recognized text
    Console.WriteLine(AllText);
}
// Ensure you have installed the Romanian OCR package using the following NuGet command:
// PM> Install-Package IronOcr.Languages.Romanian

using IronOcr;

var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Romanian;

using (var Input = new OcrInput(@"images\Romanian.png")) 
{
    // Perform OCR on the input image, and store the result
    var Result = Ocr.Read(Input);

    // Extract all recognized text from the OCR result
    var AllText = Result.Text;

    // Display the recognized text
    Console.WriteLine(AllText);
}
Imports IronOcr

' Ensure you have installed the Romanian OCR package using the following NuGet command:
' PM> Install-Package IronOcr.Languages.Romanian

Dim Ocr As New IronTesseract()
Ocr.Language = OcrLanguage.Romanian

Using Input As New OcrInput("images\Romanian.png")
    ' Perform OCR on the input image, and store the result
    Dim Result = Ocr.Read(Input)

    ' Extract all recognized text from the OCR result
    Dim AllText = Result.Text

    ' Display the recognized text
    Console.WriteLine(AllText)
End Using
$vbLabelText   $csharpLabel

Der obige Code zeigt, wie man IronOCR einrichtet, um Text in Rumänisch aus einer Bilddatei zu lesen. IronTesseract() initialisiert eine neue OCR-Engine-Instanz, und OcrInput() lädt das Bild zur Verarbeitung. Die Methode Read() führt den OCR-Vorgang durch. Schließlich wird der erkannte Text in der Variablen AllText gespeichert, die dann auf der Konsole PRINTed wird. Denken Sie daran, "images\Romanian.png" durch den Pfad zu Ihrer Bilddatei zu ersetzen.