Khmer OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Bu belgenin diğer versiyonları:

IronOCR, Khmer dahil olmak üzere 126 dildeki metinleri resimlerden ve PDF belgelerinden okutabilen bir C# yazılım bileşenidir.

Bu, .NET geliştiricileri için özel olarak oluşturulmuş Tesseract'ın gelişmiş bir çatısıdır ve hem hız hem de doğruluk açısından diğer Tesseract motorlarını düzenli olarak geride bırakır.

Contents of IronOcr.Languages.Khmer

Bu paket, .NET için 102 OCR dilini içerir:

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

İndir

Khmer Dil Paketi [ខមែរ]

Kurulum

İlk yapmamız gereken şey, Khmer OCR paketini .NET projenize kurmaktır.

Install-Package IronOcr.Languages.Khmer

Kod Örneği

Bu C# kod örneği, bir resimden veya PDF belgesinden Khmer metnini okur.

// 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
$vbLabelText   $csharpLabel

Bu örnek, .NET C# uygulamasında IronOCR kullanarak bir resim dosyasından Khmer metnini nasıl okuyacağınızı gösterir.