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

This package contains several Kannada OCR language models for .NET:

  • Kannada
  • KannadaBest
  • KannadaFast
  • KannadaAlphabet
  • KannadaAlphabetBest
  • KannadaAlphabetFast

Download

Kannada Language Pack [ಕನ್ನಡ]

Installation

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

Install-Package IronOCR.Languages.Kannada

Code Example

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

// Make sure to install the IronOcr.Languages.Kannada package via NuGet
using IronOcr;

var Ocr = new IronTesseract
{
    // Set the OCR language to Kannada
    Language = OcrLanguage.Kannada
};

using (var Input = new OcrInput(@"images\Kannada.png"))
{
    // Perform OCR on the input image
    var Result = Ocr.Read(Input);
    // Retrieve all recognized text from the OCR result
    var AllText = Result.Text;
}
// Make sure to install the IronOcr.Languages.Kannada package via NuGet
using IronOcr;

var Ocr = new IronTesseract
{
    // Set the OCR language to Kannada
    Language = OcrLanguage.Kannada
};

using (var Input = new OcrInput(@"images\Kannada.png"))
{
    // Perform OCR on the input image
    var Result = Ocr.Read(Input);
    // Retrieve all recognized text from the OCR result
    var AllText = Result.Text;
}
' Make sure to install the IronOcr.Languages.Kannada package via NuGet
Imports IronOcr

Private Ocr = New IronTesseract With {.Language = OcrLanguage.Kannada}

Using Input = New OcrInput("images\Kannada.png")
	' Perform OCR on the input image
	Dim Result = Ocr.Read(Input)
	' Retrieve all recognized text from the OCR result
	Dim AllText = Result.Text
End Using
$vbLabelText   $csharpLabel
  • IronTesseract is an instance of the OCR engine.
  • OcrLanguage.Kannada specifies that the OCR should specifically target the Kannada language.
  • OcrInput loads the image from the specified path for OCR processing.
  • The Read method processes the input and returns the recognized text.
  • Finally, the recognized text is stored in AllText.