Myanmar OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English

126 Daha Fazla Dil

IronOCR, .NET geliştiricilerinin 126 dilde, Myanmarca dahil olmak üzere, resimlerden ve PDF belgelerinden metin okumasını sağlayan bir C# yazılım bileşenidir. Bu, Tesseract'ın gelişmiş bir sürümüdür ve yalnızca .NET geliştiricileri için geliştirilmiştir. Hem hız hem de doğruluk açısından diğer Tesseract motorlarını düzenli olarak aşmaktadır.

IronOcr.Languages.Myanmar İçeriği

Bu paket, Myanmar'a özgü 114 dil için OCR desteği içermektedir:

  • Myanmar
  • MyanmarBest
  • MyanmarFast
  • MyanmarAlphabet
  • MyanmarAlphabetBest
  • MyanmarAlfabesiHızlı

İndir

Myanmar Dil Paketi [Burmese]

Kurulum

İlk olarak, NuGet ile .NET projenize Myanmar OCR paketini yükleyin:

Install-Package IronOcr.Languages.Myanmar

Kod Örneği

Bu C# kod örneği, bir görüntü veya PDF belgesinden Myanmar metnini okumaktadır.

// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Initialize the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the OCR language to Myanmar
        Ocr.Language = OcrLanguage.Myanmar;

        // Define input source - image or PDF containing Myanmar text
        using (var Input = new OcrInput(@"images\Myanmar.png"))
        {
            // Perform OCR on the input and obtain the result
            var Result = Ocr.Read(Input);

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

            // Output the recognized Myanmar text
            Console.WriteLine(AllText);
        }
    }
}
// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Initialize the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the OCR language to Myanmar
        Ocr.Language = OcrLanguage.Myanmar;

        // Define input source - image or PDF containing Myanmar text
        using (var Input = new OcrInput(@"images\Myanmar.png"))
        {
            // Perform OCR on the input and obtain the result
            var Result = Ocr.Read(Input);

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

            // Output the recognized Myanmar text
            Console.WriteLine(AllText);
        }
    }
}
' Import the IronOcr namespace
Imports IronOcr

Friend Class Program
	Shared Sub Main()
		' Initialize the IronTesseract OCR engine
		Dim Ocr = New IronTesseract()

		' Set the OCR language to Myanmar
		Ocr.Language = OcrLanguage.Myanmar

		' Define input source - image or PDF containing Myanmar text
		Using Input = New OcrInput("images\Myanmar.png")
			' Perform OCR on the input and obtain the result
			Dim Result = Ocr.Read(Input)

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

			' Output the recognized Myanmar text
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel

Açıklama

  • IronTesseract: IronOCR kütüphanesi tarafından sağlanan, OCR görevlerini yerine getiren ana sınıftır.
  • Ocr.Language: OCR için dili ayarlar; Bu örnek OcrLanguage.Myanmar olarak ayarlanmıştır.
  • OcrInput: Giriş kaynağını belirtmek için kullanılır, bu bir görüntü veya PDF dosyası olabilir.
  • Ocr.Read: OCR işlemini gerçekleştirir ve bir OcrResult nesnesi döndürür.
  • Result.Text: Görüntü veya PDF belgesinden çıkarılan metni içerir.