Czech OCR in C# and .NET
Otras versiones de este documento:
IronOCR es un componente de software C# que permite a los programadores de .NET leer texto de imágenes y documentos PDF en 126 idiomas, incluyendo el checo.
Es una versión avanzada de Tesseract, construida exclusivamente para desarrolladores de .NET y que supera regularmente a otros motores Tesseract tanto en velocidad como en precisión.
Contenido de IronOcr.Languages.Czech
Este paquete contiene 40 idiomas OCR for .NET:
- Checo
- ChecoMejor
- ChecoRápido
Descargar
Paquete de idioma checo [čeština]
Instalación
Lo primero que tenemos que hacer es instalar nuestro paquete de OCR Checo en tu proyecto .NET.
Install-Package IronOcr.Languages.Czech
Ejemplo de código
Este ejemplo de código C# lee texto checo de una imagen o 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
- El código anterior demuestra cómo configurar y utilizar la clase
IronTesseractpara realizar OCR en una imagen o PDF determinado. - Asegúrese de que el paquete
IronOcr.Languages.Czechesté instalado en su entorno para que el código se ejecute correctamente. - La clase
OcrInputse utiliza para cargar la imagen desde la ruta especificada yOcr.Read()realiza la operación de OCR. Result.Textcontendrá la salida de OCR que en este caso se imprime en la consola.

