Croatian OCR in C# and .NET
Andere Versionen dieses Dokuments:
IronOCR ist eine C# Softwarekomponente, die .NET Entwicklern ermöglicht, Text aus Bildern und PDF-Dokumenten in 126 Sprachen zu lesen, einschließlich Kroatisch. Es ist ein fortgeschrittener Fork von Tesseract, der ausschließlich for .NET-Entwickler entwickelt wurde und sowohl in der Geschwindigkeit als auch in der Genauigkeit regelmäßig andere Tesseract-Engines übertrifft.
Inhalte von IronOcr.Languages.Croatian
Dieses Paket enthält Unterstützung für 49 OCR-Sprachen for .NET, einschließlich:
- Kroatisch
- CroatianBest
- CroatianFast
Download
Kroatisches Sprachpaket [hrvatski jezik]
Installation
Der erste Schritt ist, das Kroatische OCR-Paket in Ihr .NET-Projekt mit NuGet zu installieren.
Install-Package IronOcr.Languages.Croatian
Beispielcode
Dieses C# Code-Beispiel liest kroatischen Text aus einem Bild oder PDF-Dokument.
// 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 Class
Erklärung
- IronTesseract: Dies ist die Hauptklasse, die für die Ausführung von OCR-Operationen verwendet wird. Es liest Text aus Bildern oder PDFs und unterstützt mehrere Sprachen.
- OcrInput: Repräsentiert die Eingabequelle für OCR, die ein Bild oder eine PDF-Datei sein kann.
- Ocr.Read: Führt den OCR-Prozess auf der angegebenen Eingabe aus.
- Result.Text: Enthält den aus der Eingabe extrahierten Text, der dann zur Konsole ausgegeben wird.

