Khmer-OCR in C# und .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Other versions of this document:

IronOCR ist eine C# Softwarekomponente, die .NET-Programmierern ermöglicht, Texte aus Bildern und PDF-Dokumenten in 126 Sprachen, einschließlich Khmer, zu lesen.

Es ist ein erweiterter Fork von Tesseract, der ausschließlich für .NET-Entwickler entwickelt wurde und regelmäßig andere Tesseract-Engines sowohl in Bezug auf Geschwindigkeit als auch Genauigkeit übertrifft.

Inhalt von IronOcr.Languages.Khmer

Dieses Paket enthält 102 OCR-Sprachen für .NET:

  • Khmer
  • KhmerBest
  • KhmerFast
  • KhmerAlphabet
  • KhmerAlphabetBest
  • KhmerAlphabetFast

Download

Khmer Sprachpaket [ខមែរ]

Installation

Das Erste, was wir tun müssen, ist das Khmer OCR-Paket für Ihr .NET-Projekt zu installieren.

Install-Package IronOCR.Languages.Khmer

Beispielcode

Dieses C#-Codebeispiel liest Khmer-Text aus einem Bild oder PDF-Dokument.

// Make sure the IronOCR package is installed:
// PM> Install-Package IronOcr.Languages.Khmer
using IronOcr;

class KhmerOcrExample
{
    static void Main(string[] args)
    {
        // Create a new instance of IronTesseract for OCR processes
        var Ocr = new IronTesseract();

        // Specify the language for OCR as Khmer
        Ocr.Language = OcrLanguage.Khmer;

        // Define the path of the image file containing Khmer text
        using (var Input = new OcrInput(@"images\Khmer.png"))
        {
            // Perform OCR on the input image
            var Result = Ocr.Read(Input);

            // Retrieve the recognized text
            var AllText = Result.Text;

            // Output the recognized text to the console
            Console.WriteLine(AllText);
        }
    }
}
// Make sure the IronOCR package is installed:
// PM> Install-Package IronOcr.Languages.Khmer
using IronOcr;

class KhmerOcrExample
{
    static void Main(string[] args)
    {
        // Create a new instance of IronTesseract for OCR processes
        var Ocr = new IronTesseract();

        // Specify the language for OCR as Khmer
        Ocr.Language = OcrLanguage.Khmer;

        // Define the path of the image file containing Khmer text
        using (var Input = new OcrInput(@"images\Khmer.png"))
        {
            // Perform OCR on the input image
            var Result = Ocr.Read(Input);

            // Retrieve the recognized text
            var AllText = Result.Text;

            // Output the recognized text to the console
            Console.WriteLine(AllText);
        }
    }
}
$vbLabelText   $csharpLabel

Dieses Beispiel zeigt, wie man Khmer-Text aus einer Bilddatei unter Verwendung von IronOCR in einer .NET C# Anwendung ausliest.