Gujarati 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 Gujarati.
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.Gujarati
This package contains 120 OCR languages for .NET:
- Gujarati
- GujaratiBest
- GujaratiFast
- GujaratiAlphabet
- GujaratiAlphabetBest
- GujaratiAlphabetFast
Download
Gujarati Language Pack [ગુજરાતી]
Installation
The first thing we have to do is install our Gujarati OCR package to your .NET project.
Install-Package IronOCR.Languages.Gujarati
Code Example
This C# code example reads Gujarati text from an Image or PDF document.
// Import the IronOcr namespace to access OCR functionality
using IronOcr;
// Create an instance of the IronTesseract class to handle the OCR process
var Ocr = new IronTesseract();
// Set the language to Gujarati
Ocr.Language = OcrLanguage.Gujarati;
// Use the OcrInput class to provide the path to the image or PDF containing Gujarati text
using (var Input = new OcrInput(@"images\Gujarati.png"))
{
// Perform OCR on the input document and obtain the result
var Result = Ocr.Read(Input);
// Extract the recognized text from the OCR result
var AllText = Result.Text;
// Display or use the extracted text as needed
Console.WriteLine(AllText);
}
// Import the IronOcr namespace to access OCR functionality
using IronOcr;
// Create an instance of the IronTesseract class to handle the OCR process
var Ocr = new IronTesseract();
// Set the language to Gujarati
Ocr.Language = OcrLanguage.Gujarati;
// Use the OcrInput class to provide the path to the image or PDF containing Gujarati text
using (var Input = new OcrInput(@"images\Gujarati.png"))
{
// Perform OCR on the input document and obtain the result
var Result = Ocr.Read(Input);
// Extract the recognized text from the OCR result
var AllText = Result.Text;
// Display or use the extracted text as needed
Console.WriteLine(AllText);
}
' Import the IronOcr namespace to access OCR functionality
Imports IronOcr
' Create an instance of the IronTesseract class to handle the OCR process
Private Ocr = New IronTesseract()
' Set the language to Gujarati
Ocr.Language = OcrLanguage.Gujarati
' Use the OcrInput class to provide the path to the image or PDF containing Gujarati text
Using Input = New OcrInput("images\Gujarati.png")
' Perform OCR on the input document and obtain the result
Dim Result = Ocr.Read(Input)
' Extract the recognized text from the OCR result
Dim AllText = Result.Text
' Display or use the extracted text as needed
Console.WriteLine(AllText)
End Using