Khmer OCR in C# and .NET
Autres versions de ce document :
IronOCR est un composant logiciel C# permettant aux développeurs .NET de lire du texte à partir d'images et de documents PDF dans 126 langues, dont le khmer.
Il s'agit d'une version avancée de Tesseract, conçue exclusivement pour les développeurs .NET et qui surpasse régulièrement les autres moteurs Tesseract en termes de vitesse et de précision.
Contenu de IronOcr.Languages.Khmer
Ce package contient 102 langues OCR for .NET :
- Khmer
- KhmerMeilleur
- KhmerRapide
- Alphabet khmer
- Meilleur alphabet khmer
- Alphabet khmer rapide
Télécharger
Pack de langue khmère [Khmer]
Installation
La première chose à faire est d'installer le package OCR khmer sur votre projet .NET.
Install-Package IronOcr.Languages.Khmer
Exemple de code
Cet exemple de code C# lit du texte khmer à partir d'une image ou d'un document PDF.
// 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
Cet exemple montre comment lire du texte khmer à partir d'un fichier image en utilisant IronOCR dans une application .NET C#.

