Danish OCR in C# and .NET
Otras versiones de este documento:
IronOCR es un componente de software en C# que permite a los programadores .NET leer texto de imágenes y documentos PDF en 126 idiomas, incluido el danés.
Es una bifurcación avanzada de Tesseract, desarrollada exclusivamente para desarrolladores .NET, y supera regularmente a otros motores Tesseract tanto en velocidad como en precisión.
Contenido de IronOcr.Languages.Danish
Este paquete contiene 61 idiomas OCR for .NET:
- Danés
- DanésBest
- DanésFast
- DanésFraktur
Descargar
Paquete de idioma danés [dansk]
Instalación
El primer paso es instalar el paquete OCR danés en tu proyecto .NET.
Ejemplo de código
Este ejemplo de código en C# lee texto en danés de una imagen o documento PDF utilizando IronOCR.
// Import the IronOcr namespace to access OCR functionalities
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract object, which will handle OCR operations
var Ocr = new IronTesseract();
// Set the language for OCR to Danish
Ocr.Language = OcrLanguage.Danish;
// Using a 'using' statement to ensure the OcrInput object is disposed of correctly
using (var Input = new OcrInput(@"images\Danish.png"))
{
// Perform OCR on the input image and store the result
var Result = Ocr.Read(Input);
// Extract the recognized text from the result
var AllText = Result.Text;
// Output the extracted text to the console
Console.WriteLine(AllText);
}
}
}' Import the IronOcr namespace to access OCR functionalities
Imports IronOcr
Module Program
Sub Main()
' Initialize the IronTesseract object, which will handle OCR operations
Dim Ocr As New IronTesseract()
' Set the language for OCR to Danish
Ocr.Language = OcrLanguage.Danish
' Using a 'Using' statement to ensure the OcrInput object is disposed of correctly
Using Input As New OcrInput("images\Danish.png")
' Perform OCR on the input image and store the result
Dim Result = Ocr.Read(Input)
' Extract the recognized text from the result
Dim AllText = Result.Text
' Output the extracted text to the console
Console.WriteLine(AllText)
End Using
End Sub
End ModuleEste ejemplo muestra cómo configurar IronOCR para leer texto en danés a partir de un archivo de imagen. El objeto IronTesseract está configurado para utilizar el idioma danés, y se carga una imagen con OcrInput. Ocr.Read realiza el OCR, y el texto reconocido se extrae y imprime.

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.