Breton OCR in C# and .NET
IronOCR ist eine C#-Softwarekomponente, die es .NET-Entwicklern ermöglicht, Text aus Bildern und PDF-Dokumenten in 126 Sprachen, einschließlich Bretonisch, zu lesen. Es ist ein erweiterter Fork von Tesseract, der ausschließlich for .NET-Entwickler entwickelt wurde und regelmäßig andere Tesseract-Engines sowohl in Bezug auf Geschwindigkeit als auch Genauigkeit übertrifft.
Inhalt von IronOcr.Languages.Breton
Dieses Paket enthält 43 OCR-Sprachen for .NET:
- Bretonisch
- BretonischBest
- BretonischFast
Download
Bretonisches Sprachpaket [brezhoneg]
Installation
Das Erste, was wir tun müssen, ist unser Breton OCR-Paket in Ihr .NET-Projekt zu installieren.
Install-Package IronOcr.Languages.Breton
Beispielcode
Dieses C#-Codebeispiel liest bretonischen Text aus einem Bild- oder PDF-Dokument.
// Import the IronOCR namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Breton
Ocr.Language = OcrLanguage.Breton;
// Read text from a Breton image or PDF document
using (var Input = new OcrInput(@"images\Breton.png"))
{
// Perform OCR on the input
var Result = Ocr.Read(Input);
// Extract text from the OCR result
var AllText = Result.Text;
// Output the extracted text
Console.WriteLine(AllText);
}
}
}
// Import the IronOCR namespace
using IronOcr;
class Program
{
static void Main()
{
// Initialize the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Breton
Ocr.Language = OcrLanguage.Breton;
// Read text from a Breton image or PDF document
using (var Input = new OcrInput(@"images\Breton.png"))
{
// Perform OCR on the input
var Result = Ocr.Read(Input);
// Extract text from the OCR result
var AllText = Result.Text;
// Output the extracted text
Console.WriteLine(AllText);
}
}
}
' Import the IronOCR namespace
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Initialize the IronTesseract OCR engine
Dim Ocr = New IronTesseract()
' Set the OCR language to Breton
Ocr.Language = OcrLanguage.Breton
' Read text from a Breton image or PDF document
Using Input = New OcrInput("images\Breton.png")
' Perform OCR on the input
Dim Result = Ocr.Read(Input)
' Extract text from the OCR result
Dim AllText = Result.Text
' Output the extracted text
Console.WriteLine(AllText)
End Using
End Sub
End Class
- Dieses Beispiel zeigt, wie man die IronOCR-Bibliothek verwendet, um OCR auf einem bretonischen Textbild durchzuführen.
IronTesseractstellt die Kernfunktionalität der OCR bereit.- Der Code
OcrInputwird mit dem Pfad zu dem Bild erstellt, das bretonischen Text enthält. Die MethodeReadverarbeitet das Eingabebild und extrahiert Text, der dann auf der Konsole ausgegeben wird.

