Bosnian OCR in C# and .NET
Andere Versionen dieses Dokuments:
IronOCR ist eine C#-Softwarekomponente, die es .NET-Entwicklern ermöglicht, Text aus Bildern und PDF-Dokumenten in 126 Sprachen, inklusive Bosnisch, zu lesen.
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.
Inhalt von IronOcr.Languages.Bosnian
Dieses Paket enthält 46 OCR-Sprachen for .NET:
- Bosnisch
- BosnianBest
- BosnianFast
Download
Bosnisches Sprachpaket [bosanski jezik]
Installation
Das erste, was wir tun müssen, ist, unser bosnisches OCR-Paket in Ihr .NET-Projekt zu installieren.
Install-Package IronOcr.Languages.Bosnian
Beispielcode
Dieses C#-Codebeispiel liest bosnischen Text aus einem Bild oder PDF-Dokument.
// Ensure the IronOCR library is included
using IronOcr;
class Program
{
static void Main()
{
// Initialize an instance of IronTesseract
var Ocr = new IronTesseract();
// Set the OCR language to Bosnian
Ocr.Language = OcrLanguage.Bosnian;
// Use OcrInput to specify the input file path for OCR
using (var Input = new OcrInput(@"images\Bosnian.png"))
{
// Perform OCR on the input image or PDF
var Result = Ocr.Read(Input);
// Extract the recognized text from the result
var AllText = Result.Text;
// Output the recognized text to the console
Console.WriteLine(AllText);
}
}
}
// Ensure the IronOCR library is included
using IronOcr;
class Program
{
static void Main()
{
// Initialize an instance of IronTesseract
var Ocr = new IronTesseract();
// Set the OCR language to Bosnian
Ocr.Language = OcrLanguage.Bosnian;
// Use OcrInput to specify the input file path for OCR
using (var Input = new OcrInput(@"images\Bosnian.png"))
{
// Perform OCR on the input image or PDF
var Result = Ocr.Read(Input);
// Extract the recognized text from the result
var AllText = Result.Text;
// Output the recognized text to the console
Console.WriteLine(AllText);
}
}
}
' Ensure the IronOCR library is included
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Initialize an instance of IronTesseract
Dim Ocr = New IronTesseract()
' Set the OCR language to Bosnian
Ocr.Language = OcrLanguage.Bosnian
' Use OcrInput to specify the input file path for OCR
Using Input = New OcrInput("images\Bosnian.png")
' Perform OCR on the input image or PDF
Dim Result = Ocr.Read(Input)
' Extract the recognized text from the result
Dim AllText = Result.Text
' Output the recognized text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class
- Der obige Code demonstriert, wie man OCR auf einem bosnischen Textbild mit IronOCR durchführt.
Die Klasse
IronTesseractdient zur Konfiguration und Ausführung von OCR-Aufgaben. - Die Klasse
OcrInputdient zur Angabe der Eingabebilddatei, aus der Text extrahiert werden soll. - Schließlich wird der erkannte Text in der Konsole ausgegeben.

