Khmer OCR in C# and .NET
Andere Versionen dieses Dokuments:
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 for .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 for .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);
}
}
}
' Make sure the IronOCR package is installed:
' PM> Install-Package IronOcr.Languages.Khmer
Imports IronOcr
Friend Class KhmerOcrExample
Shared Sub Main(ByVal args() As String)
' Create a new instance of IronTesseract for OCR processes
Dim 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 Input = New OcrInput("images\Khmer.png")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Retrieve the recognized text
Dim AllText = Result.Text
' Output the recognized text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class
Dieses Beispiel zeigt, wie man Khmer-Text aus einer Bilddatei unter Verwendung von IronOCR in einer .NET C# Anwendung ausliest.

