Greek Alphabet 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 yazılımcılarının, Yunan Alfabesi de dahil olmak üzere 126 dildeki görüntü ve PDF belgelerinden metin okumasına izin veren 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.Greek İçeriği

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

  • Yunanca
  • GreekBest
  • GreekFast
  • GreekAlphabet
  • GreekAlphabetBest
  • GreekAlphabetFast

İndirme

Yunan Alfabesi Dil Paketi [ελληνικά]

Kurulum

İlk adım, Yunan Alfabesi OCR paketini .NET projenize kurmaktır.

Install-Package IronOcr.Languages.Greek

Kod Örneği

Bu C# kod örneği, bir görüntü veya PDF belgesinden Yunan Alfabesi metni okur.

// Import the IronOcr namespace
using IronOcr;

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

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

        // Load the image or PDF containing Greek text
        using (var Input = new OcrInput(@"images\Greek.png"))
        {
            // Perform OCR and get the result
            var Result = Ocr.Read(Input);

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

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

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

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

        // Load the image or PDF containing Greek text
        using (var Input = new OcrInput(@"images\Greek.png"))
        {
            // Perform OCR and get the result
            var Result = Ocr.Read(Input);

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

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

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

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

		' Load the image or PDF containing Greek text
		Using Input = New OcrInput("images\Greek.png")
			' Perform OCR and get the result
			Dim Result = Ocr.Read(Input)

			' Extract all recognized text
			Dim AllText = Result.Text

			' Output the recognized text
			System.Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel
  • IronTesseract: Bu sınıf, OCR işlemini gerçekleştirmekten sorumludur.
  • OcrInput: Bu sınıf, OCR işleme için görüntü veya PDF dosyalarını yüklemek için kullanılır.
  • Ocr.Read(): Giriş verileri üzerinde OCR gerçekleştirmek ve tanınan metni sağlamak için kullanılan metod.

Bu kodu çalıştırmadan önce, IronOcr kütüphanesinin ve Yunanca dil paketinin .NET projenize düzgün şekilde yüklendiğinden emin olun. Bu kod, images/Greek.png konumundaki görüntüden çıkarılan metni çıktılar.