Cyrillic Alphabet OCR in C

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

126 Daha Fazla Dil

IronOCR, .NET kodlayıcılarının Kiril Alfabeleri 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.Cyrillic İçeriği

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

  • KirilAlfabesi
  • KirilAlfabesiEnIyi
  • KirilAlfabesiHizli

İndirme

Kiril Alfabesi Dil Paketi [Kiril yazıları]

Kurulum

Yapmanız gereken ilk şey, .NET projenize Kiril Alfabesi OCR paketini kurmaktır.

Install-Package IronOcr.Languages.Cyrillic

Kod Örneği

Bu C# kod örneği, bir Görüntü veya PDF belgesinden Kiril Alphabet metni okur.

using IronOcr;

public class OcrExample
{
    public void ReadCyrillicText()
    {
        // Initialize a new instance of the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the OCR engine to use the Cyrillic language package
        Ocr.Language = OcrLanguage.Cyrillic;

        // Create a new OCR input from an image file
        using (var Input = new OcrInput(@"images\Cyrillic.png"))
        {
            // Read the image using the OCR engine
            var Result = Ocr.Read(Input);

            // Retrieve Recognized Text
            var AllText = Result.Text;

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

public class OcrExample
{
    public void ReadCyrillicText()
    {
        // Initialize a new instance of the IronTesseract OCR engine
        var Ocr = new IronTesseract();

        // Set the OCR engine to use the Cyrillic language package
        Ocr.Language = OcrLanguage.Cyrillic;

        // Create a new OCR input from an image file
        using (var Input = new OcrInput(@"images\Cyrillic.png"))
        {
            // Read the image using the OCR engine
            var Result = Ocr.Read(Input);

            // Retrieve Recognized Text
            var AllText = Result.Text;

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

Public Class OcrExample
	Public Sub ReadCyrillicText()
		' Initialize a new instance of the IronTesseract OCR engine
		Dim Ocr = New IronTesseract()

		' Set the OCR engine to use the Cyrillic language package
		Ocr.Language = OcrLanguage.Cyrillic

		' Create a new OCR input from an image file
		Using Input = New OcrInput("images\Cyrillic.png")
			' Read the image using the OCR engine
			Dim Result = Ocr.Read(Input)

			' Retrieve Recognized Text
			Dim AllText = Result.Text

			' Output the recognized text to the console
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel
  • IronTesseract: Bu, OCR görevlerini yapılandırmak ve yürütmek için kullandığınız OCR motoru sınıfıdır.
  • OcrInput: OCR uygulamak istediğiniz giriş resmi veya belgeyi temsil eden bir sınıf.
  • OcrLanguage.Cyrillic: OCR motorunun tanıma için Kiril dili paketini kullanması gerektiğini belirtir.
  • Result.Text: OCR sonuç nesnesinden tanınan metne erişir.

Bu örnek, Kiril metni içeren bir görüntüyü işlemek ve metni çıkarmak için basit bir kullanım durumunu gösterir.