Lithuanian 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 Lithuanian.

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.Lithuanian

This package contains 55 OCR languages for .NET:

  • Lithuanian
  • LithuanianBest
  • LithuanianFast

Download

Lithuanian Language Pack [lietuvių kalba]

Installation

The first thing we have to do is install our Lithuanian OCR package to your .NET project.

Install-Package IronOCR.Languages.Lithuanian

Code Example

This C# code example reads Lithuanian text from an Image or PDF document.

// Include the IronOcr namespace to use OCR features
using IronOcr;

class Program
{
    static void Main(string[] args)
    {
        // Create a new instance of the IronTesseract class
        var Ocr = new IronTesseract();

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

        // Use a using statement to ensure that the OcrInput object is disposed of properly
        using (var Input = new OcrInput(@"images\Lithuanian.png"))
        {
            // Perform OCR on the input image and store the result
            var Result = Ocr.Read(Input);

            // Extract the text from the OCR result
            var AllText = Result.Text;

            // For demonstration purposes, output the extracted text to the console
            Console.WriteLine(AllText);
        }
    }
}
// Include the IronOcr namespace to use OCR features
using IronOcr;

class Program
{
    static void Main(string[] args)
    {
        // Create a new instance of the IronTesseract class
        var Ocr = new IronTesseract();

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

        // Use a using statement to ensure that the OcrInput object is disposed of properly
        using (var Input = new OcrInput(@"images\Lithuanian.png"))
        {
            // Perform OCR on the input image and store the result
            var Result = Ocr.Read(Input);

            // Extract the text from the OCR result
            var AllText = Result.Text;

            // For demonstration purposes, output the extracted text to the console
            Console.WriteLine(AllText);
        }
    }
}
' Include the IronOcr namespace to use OCR features
Imports IronOcr

Friend Class Program
	Shared Sub Main(ByVal args() As String)
		' Create a new instance of the IronTesseract class
		Dim Ocr = New IronTesseract()

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

		' Use a using statement to ensure that the OcrInput object is disposed of properly
		Using Input = New OcrInput("images\Lithuanian.png")
			' Perform OCR on the input image and store the result
			Dim Result = Ocr.Read(Input)

			' Extract the text from the OCR result
			Dim AllText = Result.Text

			' For demonstration purposes, output the extracted text to the console
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel