Thaana Alphabet OCR in C#
IronOCR is a C# software component allowing .NET coders to read text from images and PDF documents in 126 languages, including the Thaana 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.Thaana
This package contains 67 OCR languages for .NET:
- ThaanaAlphabet
- ThaanaAlphabetBest
- ThaanaAlphabetFast
Download
Thaana Alphabet Language Pack [Thaana]
Installation
The first thing we have to do is install our Thaana Alphabet OCR package to your .NET project.
Install-Package IronOCR.Languages.Thaana
Code Example
This C# code example reads Thaana Alphabet text from an Image or PDF document.
// Import the IronOcr namespace
using IronOcr;
// Create a new IronTesseract OCR object
var Ocr = new IronTesseract();
// Set the language to Thaana for OCR processing
Ocr.Language = OcrLanguage.Thaana;
// Create an OcrInput object with the path to the image
using (var Input = new OcrInput(@"images\Thaana.png"))
{
// Perform OCR on the input image to extract text
var Result = Ocr.Read(Input);
// Store the recognized text from the image in a variable
var AllText = Result.Text;
// Output the recognized text to the console or any other use
Console.WriteLine(AllText);
}
// Import the IronOcr namespace
using IronOcr;
// Create a new IronTesseract OCR object
var Ocr = new IronTesseract();
// Set the language to Thaana for OCR processing
Ocr.Language = OcrLanguage.Thaana;
// Create an OcrInput object with the path to the image
using (var Input = new OcrInput(@"images\Thaana.png"))
{
// Perform OCR on the input image to extract text
var Result = Ocr.Read(Input);
// Store the recognized text from the image in a variable
var AllText = Result.Text;
// Output the recognized text to the console or any other use
Console.WriteLine(AllText);
}
' Import the IronOcr namespace
Imports IronOcr
' Create a new IronTesseract OCR object
Private Ocr = New IronTesseract()
' Set the language to Thaana for OCR processing
Ocr.Language = OcrLanguage.Thaana
' Create an OcrInput object with the path to the image
Using Input = New OcrInput("images\Thaana.png")
' Perform OCR on the input image to extract text
Dim Result = Ocr.Read(Input)
' Store the recognized text from the image in a variable
Dim AllText = Result.Text
' Output the recognized text to the console or any other use
Console.WriteLine(AllText)
End Using
- The above code demonstrates how to use IronOCR to perform OCR on an image containing Thaana script.
- It sets up an OCR object, specifies the language, and reads text from the specified image file.
- The extracted text can then be used as needed in your application.