Gujarati OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Other versions of this document:

IronOCR ist eine C# Softwarekomponente, die .NET Programmierern erlaubt, Text aus Bildern und PDF-Dokumenten in 126 Sprachen zu lesen, einschließlich Gujarati.

Es ist eine fortgeschrittene Abzweigung von Tesseract, die exklusiv für .NET-Entwickler entwickelt wurde und regelmäßig andere Tesseract-Engines sowohl in Geschwindigkeit als auch in Genauigkeit übertrifft.

Inhalt von IronOcr.Languages.Gujarati

Dieses Paket enthält 120 OCR-Sprachen für .NET:

  • Gujarati
  • GujaratiBest
  • GujaratiFast
  • GujaratiAlphabet
  • GujaratiAlphabetBest
  • GujaratiAlphabetFast

Download

Gujarati Sprachpaket style='white-space:default'>[ગરતી]

Installation

Das erste, was wir tun müssen, ist, unser Gujarati OCR-Paket in Ihr .NET-Projekt zu installieren.

Install-Package IronOCR.Languages.Gujarati

Beispielcode

Dieses C# Codebeispiel liest Gujarati-Text aus einem Bild oder PDF-Dokument.

// 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
$vbLabelText   $csharpLabel