OCR húngaro en C# y .NET
Other versions of this document:
IronOCR es un componente de software en C# que permite a los programadores de .NET leer texto de imágenes y documentos PDF en 126 idiomas, incluido el húngaro.
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.Hungarian
Este paquete contiene 52 idiomas de OCR para .NET:
- Húngaro
- HungarianBest
- HungarianFast
Descargar
Paquete de idioma húngaro [magyar]
Instalación
Lo primero que tenemos que hacer es instalar nuestro paquete OCR en húngaro en tu proyecto .NET.
Install-Package IronOCR.Languages.Hungarian
Ejemplo de código
Este ejemplo de código en C# lee texto en húngaro de una imagen o documento PDF.
// First, ensure you have installed the Hungarian OCR language pack
// via NuGet: Install-Package IronOcr.Languages.Hungarian
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to Hungarian.
Ocr.Language = OcrLanguage.Hungarian;
// Load the image file containing Hungarian text
using (var Input = new OcrInput(@"images\Hungarian.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Retrieve and store the recognized text
var AllText = Result.Text;
// Output the recognized text to the console (for debugging purposes)
Console.WriteLine(AllText);
}// First, ensure you have installed the Hungarian OCR language pack
// via NuGet: Install-Package IronOcr.Languages.Hungarian
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to Hungarian.
Ocr.Language = OcrLanguage.Hungarian;
// Load the image file containing Hungarian text
using (var Input = new OcrInput(@"images\Hungarian.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Retrieve and store the recognized text
var AllText = Result.Text;
// Output the recognized text to the console (for debugging purposes)
Console.WriteLine(AllText);
}' First, ensure you have installed the Hungarian OCR language pack
' via NuGet: Install-Package IronOcr.Languages.Hungarian
Imports IronOcr
Private Ocr = New IronTesseract()
' Set the OCR language to Hungarian.
Ocr.Language = OcrLanguage.Hungarian
' Load the image file containing Hungarian text
Using Input = New OcrInput("images\Hungarian.png")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Retrieve and store the recognized text
Dim AllText = Result.Text
' Output the recognized text to the console (for debugging purposes)
Console.WriteLine(AllText)
End UsingEste fragmento de código demuestra cómo configurar un lector OCR usando la biblioteca de IronOCR para reconocer texto en húngaro de un archivo de imagen especificado. El texto extraído se almacena en la variable AllText, y puede usarse según sea necesario en tu aplicación. El ejemplo también incluye una salida opcional en la consola para verificar los resultados del OCR durante las pruebas.





