Hungarian OCR in C# and .NET
Inne wersje tego dokumentu:
IronOCR to komponent oprogramowania C#, ktory pozwala programistom .NET odczytywac tekst z obrazow i dokumentow PDF w 126 jezykach, w tym po wegiersku.
Jest to zaawansowany fork Tesseracta, zbudowany wyłącznie dla deweloperów .NET i regularnie przewyższający inne silniki Tesseract pod względem szybkości i dokładności.
Zawartosc IronOcr.Languages.Hungarian
Pakiet ten zawiera 52 języki OCR dla .NET:
- Wegrzyski
- WegrzyskiBest
- WegrzyskiFast
Pobieranie
Hungarian Language Pack [magyar]
Instalacja
Pierwszym krokiem jest zainstalowanie naszego pakietu OCR Wegrzyski w Twoim projekcie .NET.
Install-Package IronOcr.Languages.Hungarian
Przyklad kodu
Ten przyklad kodu C# odczytuje tekst wegierski z obrazu lub dokumentu PDF.
// First, ensure you have installed the Hungarian OCR language pack
// via NuGet: Install-Package IronOcr.Languages.Hungarian
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to Hungarian.
Ocr.Language = OcrLanguage.Hungarian;
// Load the image file containing Hungarian text
using (var Input = new OcrInput(@"images\Hungarian.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Retrieve and store the recognized text
var AllText = Result.Text;
// Output the recognized text to the console (for debugging purposes)
Console.WriteLine(AllText);
}
// First, ensure you have installed the Hungarian OCR language pack
// via NuGet: Install-Package IronOcr.Languages.Hungarian
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to Hungarian.
Ocr.Language = OcrLanguage.Hungarian;
// Load the image file containing Hungarian text
using (var Input = new OcrInput(@"images\Hungarian.png"))
{
// Perform OCR on the input image
var Result = Ocr.Read(Input);
// Retrieve and store the recognized text
var AllText = Result.Text;
// Output the recognized text to the console (for debugging purposes)
Console.WriteLine(AllText);
}
' First, ensure you have installed the Hungarian OCR language pack
' via NuGet: Install-Package IronOcr.Languages.Hungarian
Imports IronOcr
Private Ocr = New IronTesseract()
' Set the OCR language to Hungarian.
Ocr.Language = OcrLanguage.Hungarian
' Load the image file containing Hungarian text
Using Input = New OcrInput("images\Hungarian.png")
' Perform OCR on the input image
Dim Result = Ocr.Read(Input)
' Retrieve and store the recognized text
Dim AllText = Result.Text
' Output the recognized text to the console (for debugging purposes)
Console.WriteLine(AllText)
End Using
Ten fragment kodu pokazuje, jak skonfigurowac czytnik OCR za pomoca biblioteki IronOCR, aby rozpoznawac tekst wegierski z okreslonego pliku obrazu. Wydobyty tekst jest przechowywany w zmiennej AllText i moze byc uzywany wedle potrzeb w Twojej aplikacji. Przyklad zawiera rowniez opcjonalne wyjscie konsolowe do weryfikacji wynikow OCR podczas testowania.

