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 dahil 126 dilde resimler ve PDF belgeleri üzerinden metin okumasını sağlayan bir C# yazılım bileşenidir.

Tesseract'ın, yalnızca .NET geliştiricileri için özel olarak oluşturulmuş gelişmiş bir dalıdır ve hız ve doğruluk açısı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 dilini içerir:

  • Çekçe
  • ÇekçeEn iyi
  • ÇekçeFast

İndir

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

Kurulum

Yapmamız gereken ilk şey, Çekçe OCR paketimizi .NET projenize yüklemektir.

Install-Package IronOcr.Languages.Czech

Kod Örneği

Bu C# kod örneği, bir resim veya PDF belgesinden Çekçe metni 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 işlemi gerçekleştirmek için IronTesseract sınıfının nasıl yapılandırılacağını ve kullanılacağını göstermektedir.
  • Kodun doğru şekilde çalışması için IronOcr.Languages.Czech paketinin ortamınızda 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.