Greek Alphabet OCR in C# and .NET

Other versions of this document:

IronOCR is a C# software component allowing .NET coders to read text from images and PDF documents in 126 languages, including the Greek Alphabet.

It is an advanced fork of Tesseract, built exclusively for .NET developers and regularly outperforms other Tesseract engines in both speed and accuracy.

Contents of IronOcr.Languages.Greek

This package contains 102 OCR languages for .NET:

  • Greek
  • GreekBest
  • GreekFast
  • GreekAlphabet
  • GreekAlphabetBest
  • GreekAlphabetFast

Download

Greek Alphabet Language Pack [ελληνικά]

Installation

The first step is to install the Greek Alphabet OCR package to your .NET project.

Install-Package IronOCR.Languages.Greek

Code Example

This C# code example reads Greek Alphabet text from an image or PDF document.

// 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: This class is responsible for performing the OCR operation.
  • OcrInput: This class is used to load the images or PDF files for OCR processing.
  • Ocr.Read(): Method to perform the OCR on input data and provide the recognized text.

Before running this code, ensure that the IronOcr library and the Greek language pack are properly installed in your .NET project. This code will output the text extracted from the image located at images/Greek.png.