Czech 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, .NET kodlayıcılarının Çekçe de dahil olmak üzere 126 dildeki görüntü ve PDF belgelerinden metin okumalarına olanak tanıyan bir C# yazılım bileşenidir.

Tesseract'ın geliştirilmiş bir dalıdır, yalnızca .NET geliştiricileri için geliştirilmiştir ve hem hız hem de doğruluk bakımından diğer Tesseract motorlarını düzenli olarak geride bırakır.

IronOcr.Languages.Czech İçeriği

Bu paket, .NET için 40 OCR dili içerir:

  • Çekçe
  • ÇekçeEnIyi
  • ÇekçeHizli

İndirme

Çekçe Dil Paketi [čeština]

Kurulum

Yapmamız gereken ilk şey, .NET projenize Çek OCR paketimizi kurmaktır.

Install-Package IronOcr.Languages.Czech

Kod Örneği

Bu C# kod örneği, bir görüntü veya PDF belgesinden Çekçe metin okur.

// Import the IronOcr namespace
using IronOcr;

class Program
{
    static void Main()
    {
        // Create a new IronTesseract instance
        var Ocr = new IronTesseract();

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

        // Define the input image or PDF and perform OCR
        using (var Input = new OcrInput(@"images\Czech.png"))
        {
            // Read the input and perform OCR
            var Result = Ocr.Read(Input);

            // Extract all recognized text
            var AllText = Result.Text;

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

class Program
{
    static void Main()
    {
        // Create a new IronTesseract instance
        var Ocr = new IronTesseract();

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

        // Define the input image or PDF and perform OCR
        using (var Input = new OcrInput(@"images\Czech.png"))
        {
            // Read the input and perform OCR
            var Result = Ocr.Read(Input);

            // Extract all recognized text
            var AllText = Result.Text;

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

Friend Class Program
	Shared Sub Main()
		' Create a new IronTesseract instance
		Dim Ocr = New IronTesseract()

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

		' Define the input image or PDF and perform OCR
		Using Input = New OcrInput("images\Czech.png")
			' Read the input and perform OCR
			Dim Result = Ocr.Read(Input)

			' Extract all recognized text
			Dim AllText = Result.Text

			' Output the recognized text to the console
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel
  • Yukarıdaki kod, belirli bir görüntü veya PDF üzerinde OCR gerçekleştirmek için IronTesseract sınıfını nasıl yapılandırıp kullanacağınızı gösterir.
  • Kodun doğru çalışması için ortamınıza IronOcr.Languages.Czech paketinin yüklü olduğundan emin olun.
  • OcrInput sınıfı belirtilen yoldan görüntüyü yüklemek için kullanılır ve Ocr.Read() OCR işlemini gerçekleştirir.
  • Result.Text, bu durumda konsola yazdırılan OCR çıktısını içerecektir.