OCR croata en C# y .NET
Other versions of this document:
IronOCR es un componente de software C# que permite a los desarrolladores de .NET leer texto de imágenes y documentos PDF en 126 idiomas, incluido el croata. Es una bifurcación avanzada de Tesseract, construida exclusivamente para desarrolladores .NET, y regularmente supera a otros motores Tesseract tanto en velocidad como en precisión.
Contenido de IronOcr.Languages.Croatian
Este paquete contiene soporte para 49 idiomas OCR para .NET, incluyendo:
- Croata
- CroatianBest
- CroatianFast
Descargar
Paquete de idioma croata [hrvatski jezik]
Instalación
El primer paso es instalar el paquete OCR de Croata en su proyecto .NET usando NuGet.
Install-Package IronOCR.Languages.Croatian
Ejemplo de código
Este ejemplo de código C# lee texto en croata de una imagen o documento PDF.
// Add the required namespace for IronOCR
using IronOcr;
class OCRExample
{
public static void Main()
{
// Create a new IronTesseract instance
var Ocr = new IronTesseract();
// Set the OCR language to Croatian
Ocr.Language = OcrLanguage.Croatian;
// Define the input image or PDF containing Croatian text
using (var Input = new OcrInput(@"images\Croatian.png"))
{
// Perform OCR on the input
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Output the recognized text to the console
System.Console.WriteLine(AllText);
}
}
}// Add the required namespace for IronOCR
using IronOcr;
class OCRExample
{
public static void Main()
{
// Create a new IronTesseract instance
var Ocr = new IronTesseract();
// Set the OCR language to Croatian
Ocr.Language = OcrLanguage.Croatian;
// Define the input image or PDF containing Croatian text
using (var Input = new OcrInput(@"images\Croatian.png"))
{
// Perform OCR on the input
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Output the recognized text to the console
System.Console.WriteLine(AllText);
}
}
}' Add the required namespace for IronOCR
Imports IronOcr
Friend Class OCRExample
Public Shared Sub Main()
' Create a new IronTesseract instance
Dim Ocr = New IronTesseract()
' Set the OCR language to Croatian
Ocr.Language = OcrLanguage.Croatian
' Define the input image or PDF containing Croatian text
Using Input = New OcrInput("images\Croatian.png")
' Perform OCR on the input
Dim Result = Ocr.Read(Input)
' Extract all recognized text
Dim AllText = Result.Text
' Output the recognized text to the console
System.Console.WriteLine(AllText)
End Using
End Sub
End ClassExplicación
- IronTesseract: Esta es la clase principal utilizada para realizar operaciones OCR. Lee texto de imágenes o PDFs y soporta múltiples idiomas.
- OcrInput: Representa la fuente de entrada para OCR, que puede ser un archivo de imagen o PDF.
- Ocr.Read: Ejecuta el proceso de OCR en la entrada especificada.
- Result.Text: Contiene el texto extraído de la entrada, que luego se imprime en la consola.





