Breton OCR in C# and .NET
IronOCR to komponent oprogramowania C# pozwalający programistom .NET odczytywać tekst z obrazów i dokumentów PDF w 126 językach, w tym w języku bretońskim. Jest to zaawansowany fork Tesseract, stworzony wyłącznie dla programistów .NET i regularnie przewyższa inne silniki Tesseract zarówno pod względem szybkości, jak i dokładności.
Zawartość IronOcr.Languages.Breton
Ten pakiet zawiera 43 języki OCR dla .NET:
- Breton
- BretonBest
- BretonFast
Pobieranie
Paczka językowa bretońska [brezhoneg]
Instalacja
Pierwszą rzeczą, którą musimy zrobić, jest zainstalowanie naszego pakietu OCR Breton w projekcie .NET.
Install-Package IronOcr.Languages.Breton
Przyklad kodu
Ten przykład kodu C# odczytuje tekst bretoński z obrazu lub dokumentu PDF.
// 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
- Ten przykład demonstruje, jak używać biblioteki IronOCR do wykonywania OCR na obrazie tekstu bretońskiego.
IronTesseractdostarcza podstawową funkcjonalność OCR.OcrInputjest tworzony ze ścieżką do obrazu, który zawiera tekst w języku bretońskim.- Metoda
Readprzetwarza obraz wejściowy i wyodrębnia tekst, który następnie jest wyprowadzany na konsolę.

