Cyrillic Alphabet OCR in C
O IronOCR é um componente de software C# que permite aos programadores .NET ler texto de imagens e documentos PDF em 126 idiomas, incluindo o alfabeto cirílico.
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údo de IronOcr.Idiomas.Cirílico
Este pacote contém 73 linguagens OCR for .NET:
- Alfabeto cirílico
- Melhor Alfabeto Cirílico
- AlfabetoCirílicoRápido
Baixar
Pacote de idiomas do alfabeto cirílico [escritas cirílicas]
Instalação
A primeira coisa que você precisa fazer é instalar o pacote OCR do alfabeto cirílico no seu projeto .NET .
Install-Package IronOcr.Languages.Cyrillic
Exemplo de código
Este exemplo de código C# lê texto em alfabeto cirílico de uma imagem ou documento PDF.
using IronOcr;
public class OcrExample
{
public void ReadCyrillicText()
{
// Initialize a new instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR engine to use the Cyrillic language package
Ocr.Language = OcrLanguage.Cyrillic;
// Create a new OCR input from an image file
using (var Input = new OcrInput(@"images\Cyrillic.png"))
{
// Read the image using the OCR engine
var Result = Ocr.Read(Input);
// Retrieve Recognized Text
var AllText = Result.Text;
// Output the recognized text to the console
Console.WriteLine(AllText);
}
}
}
using IronOcr;
public class OcrExample
{
public void ReadCyrillicText()
{
// Initialize a new instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR engine to use the Cyrillic language package
Ocr.Language = OcrLanguage.Cyrillic;
// Create a new OCR input from an image file
using (var Input = new OcrInput(@"images\Cyrillic.png"))
{
// Read the image using the OCR engine
var Result = Ocr.Read(Input);
// Retrieve Recognized Text
var AllText = Result.Text;
// Output the recognized text to the console
Console.WriteLine(AllText);
}
}
}
Imports IronOcr
Public Class OcrExample
Public Sub ReadCyrillicText()
' Initialize a new instance of the IronTesseract OCR engine
Dim Ocr = New IronTesseract()
' Set the OCR engine to use the Cyrillic language package
Ocr.Language = OcrLanguage.Cyrillic
' Create a new OCR input from an image file
Using Input = New OcrInput("images\Cyrillic.png")
' Read the image using the OCR engine
Dim Result = Ocr.Read(Input)
' Retrieve Recognized Text
Dim AllText = Result.Text
' Output the recognized text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class
IronTesseract: Esta é a classe de mecanismo de OCR que você usa para configurar e executar tarefas de OCR.OcrInput: Uma classe que representa a imagem ou documento de entrada no qual você deseja realizar OCR.OcrLanguage.Cyrillic: Especifica que o mecanismo de OCR deve usar o pacote de idioma cirílico para reconhecimento.Result.Text: Acessa o texto reconhecido do objeto de resultado OCR.
Este exemplo demonstra um caso de uso simples onde uma imagem com texto cirílico é processada para extrair o texto.

