OCR del alfabeto griego en C# y .NET
Other versions of this document:
IronOCR es un componente de software C# que permite a los codificadores .NET leer texto de imágenes y documentos PDF en 126 idiomas, incluido el Alfabeto Griego.
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.Greek
Este paquete contiene 102 idiomas OCR para .NET:
- Griego
- GriegoMejor
- GriegoRápido
- AlfabetoGriego
- AlfabetoGriegoMejor
- AlfabetoGriegoRápido
Descargar
Paquete de Idioma del Alfabeto Griego [ελληνικά]
Instalación
El primer paso es instalar el paquete OCR Alfabeto Griego en tu proyecto .NET.
Install-Package IronOCR.Languages.Greek
Ejemplo de código
Este ejemplo de código C# lee texto del Alfabeto Griego de una imagen o documento PDF.
// Import the IronOcr namespace
using IronOcr;
class GreekOcrExample
{
static void Main()
{
// Initialize the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Greek
Ocr.Language = OcrLanguage.Greek;
// Load the image or PDF containing Greek text
using (var Input = new OcrInput(@"images\Greek.png"))
{
// Perform OCR and get the result
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Output the recognized text
System.Console.WriteLine(AllText);
}
}
}// Import the IronOcr namespace
using IronOcr;
class GreekOcrExample
{
static void Main()
{
// Initialize the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Greek
Ocr.Language = OcrLanguage.Greek;
// Load the image or PDF containing Greek text
using (var Input = new OcrInput(@"images\Greek.png"))
{
// Perform OCR and get the result
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Output the recognized text
System.Console.WriteLine(AllText);
}
}
}' Import the IronOcr namespace
Imports IronOcr
Friend Class GreekOcrExample
Shared Sub Main()
' Initialize the IronTesseract OCR engine
Dim Ocr = New IronTesseract()
' Set the OCR language to Greek
Ocr.Language = OcrLanguage.Greek
' Load the image or PDF containing Greek text
Using Input = New OcrInput("images\Greek.png")
' Perform OCR and get the result
Dim Result = Ocr.Read(Input)
' Extract all recognized text
Dim AllText = Result.Text
' Output the recognized text
System.Console.WriteLine(AllText)
End Using
End Sub
End Class- IronTesseract: Esta clase es responsable de realizar la operación OCR.
- OcrInput: Esta clase se utiliza para cargar las imágenes o archivos PDF para el procesamiento OCR.
- Ocr.Read(): Método para realizar el OCR en los datos de entrada y proporcionar el texto reconocido.
Antes de ejecutar este código, asegúrate de que la biblioteca IronOcr y el paquete de idioma griego estén correctamente instalados en tu proyecto .NET. Este código generará el texto extraído de la imagen ubicada en images/Greek.png.





