Gurmukhi Alphabet OCR in C# and .NET
O IronOCR é um componente de software C# que permite que programadores .NET leiam texto de imagens e documentos PDF em 126 idiomas, incluindo o Alfabeto Gurmukhi.
Trata-se de uma versão avançada do Tesseract, criada exclusivamente para desenvolvedores .NET e que supera regularmente outros mecanismos do Tesseract em termos de velocidade e precisão.
Conteúdos de IronOcr.Languages.Gurmukhi
Este pacote contém 73 linguagens OCR for .NET:
- GurmukhiAlphabet
- GurmukhiAlphabetBest
- GurmukhiAlphabetFast
Baixar
Pacote de Idioma Alfabeto Gurmukhi [Gurmukhī]
Instalação
A primeira coisa que devemos fazer é instalar nosso pacote OCR Alfabeto Gurmukhi no seu projeto .NET.
Install-Package IronOcr.Languages.Gurmukhi
Exemplo de código
Este exemplo de código C# lê texto do Alfabeto Gurmukhi de uma imagem ou documento PDF.
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of IronTesseract
var Ocr = new IronTesseract();
// Set the OCR language to Gurmukhi
Ocr.Language = OcrLanguage.Gurmukhi;
// Define the input source for OCR using an image file path
using (var Input = new OcrInput(@"images\Gurmukhi.png"))
{
// Perform OCR on the input
var Result = Ocr.Read(Input);
// Retrieve the recognized text
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of IronTesseract
var Ocr = new IronTesseract();
// Set the OCR language to Gurmukhi
Ocr.Language = OcrLanguage.Gurmukhi;
// Define the input source for OCR using an image file path
using (var Input = new OcrInput(@"images\Gurmukhi.png"))
{
// Perform OCR on the input
var Result = Ocr.Read(Input);
// Retrieve the recognized text
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
' Import the IronOcr namespace
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create a new instance of IronTesseract
Dim Ocr = New IronTesseract()
' Set the OCR language to Gurmukhi
Ocr.Language = OcrLanguage.Gurmukhi
' Define the input source for OCR using an image file path
Using Input = New OcrInput("images\Gurmukhi.png")
' Perform OCR on the input
Dim Result = Ocr.Read(Input)
' Retrieve the recognized text
Dim AllText = Result.Text
' Output the recognized text
Console.WriteLine(AllText)
End Using
End Sub
End Class
- Certifique-se de que as bibliotecas IronOCR necessárias estejam instaladas no seu projeto para usar o pacote de idioma Gurmukhi.
- Modifique o caminho
"images\Gurmukhi.png"para apontar para o arquivo de imagem real que você deseja processar. - Este programa lê texto da imagem especificada e o exibe no console.

