Spanish OCR in C# and .NET
Otras versiones de este documento:
IronOCR es un componente de software C# que permite a los programadores .NET leer texto de imágenes y documentos PDF en 126 idiomas, incluido el español.
Es una rama avanzada de Tesseract, construida exclusivamente para desarrolladores de .NET y supera regularmente a otros motores de Tesseract tanto en velocidad como en precisión.
Contenido de IronOcr.Languages.Spanish
Este paquete contiene varias opciones de idioma OCR for .NET:
- Español
- EspañolBest
- EspañolFast
- EspañolAntiguo
- EspañolAntiguoMejor
- EspañolAntiguoFast
Descargar
Paquete de Idioma Español [español]
Instalación
Lo primero que tenemos que hacer es instalar nuestro paquete OCR en español en tu proyecto .NET.
Ejemplo de código
Este ejemplo de código C# lee texto en español de una imagen o documento PDF.
// Import the IronOcr namespace
using IronOcr;
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the OCR language to Spanish
Ocr.Language = OcrLanguage.Spanish;
// Use a using block to manage the OcrInput resource
using (var Input = new OcrInput(@"images\Spanish.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Extract all text from the OCR result
var AllText = Result.Text;
// The 'AllText' variable now contains the Spanish text
}' Import the IronOcr namespace
Imports IronOcr
' Create a new instance of the IronTesseract class
Dim Ocr As New IronTesseract()
' Set the OCR language to Spanish
Ocr.Language = OcrLanguage.Spanish
' Use a using block to manage the OcrInput resource
Using Input As New OcrInput("images\Spanish.png")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Extract all text from the OCR result
Dim AllText = Result.Text
' The 'AllText' variable now contains the Spanish text
End UsingEl código anterior muestra cómo utilizar la biblioteca IronOCR para leer y extraer texto en español de un archivo de imagen llamado Spanish.png. Asegúrese de incluir los espacios de nombres necesarios y manejar los recursos adecuadamente dentro de bloques using donde sea necesario.

Curtis Chau tiene una licenciatura en Ciencias de la Computación (Carleton University) y se especializa en el desarrollo front-end con experiencia en Node.js, TypeScript, JavaScript y React. Apasionado por crear interfaces de usuario intuitivas y estéticamente agradables, disfruta trabajando con frameworks modernos y creando manuales bien estructurados y visualmente atractivos.