Tigrinya OCR in C# and .NET

126 More Languages

IronOCR is a C# software component allowing .NET coders to read text from images and PDF documents in 126 languages, including Tigrinya. It is an advanced fork of Tesseract, built exclusively for .NET developers and regularly outperforms other Tesseract engines for both speed and accuracy.

Contents of IronOcr.Languages.Tigrinya

This package contains 49 OCR languages for .NET:

  • Tigrinya
  • TigrinyaBest
  • TigrinyaFast

Download

Tigrinya Language Pack [ትግርኛ]

Installation

The first thing we have to do is install the Tigrinya OCR package to your .NET project.

Install-Package IronOCR.Languages.Tigrinya

Code Example

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

using IronOcr;

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

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

        // Using statement ensures the OcrInput object is disposed of after use
        using (var Input = new OcrInput(@"images\Tigrinya.png"))
        {
            // Perform OCR on the input image
            var Result = Ocr.Read(Input);

            // Extract all text recognized in the image and store it in a variable
            var AllText = Result.Text;

            // Output the extracted text
            Console.WriteLine(AllText);
        }
    }
}
using IronOcr;

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

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

        // Using statement ensures the OcrInput object is disposed of after use
        using (var Input = new OcrInput(@"images\Tigrinya.png"))
        {
            // Perform OCR on the input image
            var Result = Ocr.Read(Input);

            // Extract all text recognized in the image and store it in a variable
            var AllText = Result.Text;

            // Output the extracted text
            Console.WriteLine(AllText);
        }
    }
}
Imports IronOcr

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

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

		' Using statement ensures the OcrInput object is disposed of after use
		Using Input = New OcrInput("images\Tigrinya.png")
			' Perform OCR on the input image
			Dim Result = Ocr.Read(Input)

			' Extract all text recognized in the image and store it in a variable
			Dim AllText = Result.Text

			' Output the extracted text
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel

Explanation

  • IronTesseract: This is a specialized class from IronOCR used to perform text recognition.
  • Ocr.Language: Sets the language used by the OCR engine. For this instance, it is set to Tigrinya.
  • OcrInput: Represents the input source, an image in this case, which will be converted to text.
  • Ocr.Read(Input): Executes OCR on the specified input and returns the results.
  • Result.Text: Contains the text extracted from the input image after the OCR process.
  • Console.WriteLine(AllText): Outputs the extracted text to the console. This line is optional and can be removed if console output is not needed.