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

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

This package contains 40 OCR languages for .NET:

  • Latin
  • LatinBest
  • LatinFast

Download

Latin Language Pack [latine]

Installation

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

Install-Package IronOCR.Languages.Latin

Code Example

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

// Install the IronOcr.Languages.Latin package via NuGet
using IronOcr;

var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Latin;

// Create an OCR input object by specifying the image or PDF file path
using (var Input = new OcrInput(@"images\Latin.png"))
{
    // Perform OCR on the input
    var Result = Ocr.Read(Input);
    // Retrieve the recognized text
    var AllText = Result.Text;
    // Log or process the recognized text
}
// Install the IronOcr.Languages.Latin package via NuGet
using IronOcr;

var Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.Latin;

// Create an OCR input object by specifying the image or PDF file path
using (var Input = new OcrInput(@"images\Latin.png"))
{
    // Perform OCR on the input
    var Result = Ocr.Read(Input);
    // Retrieve the recognized text
    var AllText = Result.Text;
    // Log or process the recognized text
}
' Install the IronOcr.Languages.Latin package via NuGet
Imports IronOcr

Private Ocr = New IronTesseract()
Ocr.Language = OcrLanguage.Latin

' Create an OCR input object by specifying the image or PDF file path
Using Input = New OcrInput("images\Latin.png")
	' Perform OCR on the input
	Dim Result = Ocr.Read(Input)
	' Retrieve the recognized text
	Dim AllText = Result.Text
	' Log or process the recognized text
End Using
$vbLabelText   $csharpLabel
  • This example demonstrates initializing the IronTesseract object and setting the OCR language to Latin.
  • The OcrInput encapsulates the input file, in this case, an image containing Latin text.
  • The Ocr.Read method processes the input and returns an OcrResult object from which you can extract the recognized text.