Czech OCR in C# and .NET
Outras versões deste documento:
O IronOCR é um componente de software C# que permite aos programadores .NET ler texto de imagens e documentos PDF em 126 idiomas, incluindo o tcheco.
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.Tcheco
Este pacote contém 40 idiomas de OCR for .NET:
- Tcheco
- TchecoBest
- TchecoFast
Baixar
Pacote de idioma tcheco [čeština]
Instalação
A primeira coisa que precisamos fazer é instalar nosso pacote de OCR tcheco em seu projeto .NET .
Install-Package IronOcr.Languages.Czech
Exemplo de código
Este exemplo de código C# lê texto em tcheco a partir de uma imagem ou documento PDF.
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Create a new IronTesseract instance
var Ocr = new IronTesseract();
// Set the OCR language to Czech
Ocr.Language = OcrLanguage.Czech;
// Define the input image or PDF and perform OCR
using (var Input = new OcrInput(@"images\Czech.png"))
{
// Read the input and perform OCR
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Output the recognized text to the console
Console.WriteLine(AllText);
}
}
}
// Import the IronOcr namespace
using IronOcr;
class Program
{
static void Main()
{
// Create a new IronTesseract instance
var Ocr = new IronTesseract();
// Set the OCR language to Czech
Ocr.Language = OcrLanguage.Czech;
// Define the input image or PDF and perform OCR
using (var Input = new OcrInput(@"images\Czech.png"))
{
// Read the input and perform OCR
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Output the recognized text to the console
Console.WriteLine(AllText);
}
}
}
' Import the IronOcr namespace
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create a new IronTesseract instance
Dim Ocr = New IronTesseract()
' Set the OCR language to Czech
Ocr.Language = OcrLanguage.Czech
' Define the input image or PDF and perform OCR
Using Input = New OcrInput("images\Czech.png")
' Read the input and perform OCR
Dim Result = Ocr.Read(Input)
' Extract all recognized text
Dim AllText = Result.Text
' Output the recognized text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class
- O código acima demonstra como configurar e utilizar a classe
IronTesseractpara realizar OCR em uma imagem ou PDF fornecido. - Certifique-se de que o pacote
IronOcr.Languages.Czechesteja instalado no seu ambiente para que o código seja executado corretamente. - A classe
OcrInputé usada para carregar a imagem do caminho especificado, eOcr.Read()realiza a operação de OCR. Result.Textconterá a saída do OCR que, neste caso, é impressa no console.

