OCR danés en C# y .NET
Other versions of this document:
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 para .NET:
- Danés
- DanésBest
- DanésRápido
- 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.
Install-Package IronOCR.Languages.Danish
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
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);
}
}
}Este ejemplo demuestra la configuración de IronOCR para leer texto danés de un archivo de imagen. El objeto IronTesseract está configurado para usar el idioma danés, y una imagen se carga con OcrInput. Ocr.Read realiza el OCR, y el texto reconocido se extrae e imprime.





