Haitian OCR in C# and .NET
Inne wersje tego dokumentu:
IronOCR to komponent oprogramowania C#, pozwalajacy programistom .NET na odczytywanie tekstu z obrazow i dokumentow PDF w 126 jezykach, w tym po haitańsku.
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.Haitian
Ten pakiet zawiera 46 języków OCR dla .NET:
- Haitian
- HaitianBest
- HaitianFast
Pobieranie
Haitian Language Pack [Kreyòl ayisyen]
Instalacja
Pierwsza rzecza, ktora musimy zrobic, jest zainstalowanie naszego pakietu haitanskiego OCR w twoim projekcie .NET.
Install-Package IronOcr.Languages.Haitian
Przyklad kodu
Ten przyklad kodu C# odczytuje tekst po haitansku z obrazu lub dokumentu PDF.
// Install the required IronOcr package
// PM> Install-Package IronOcr.Languages.Haitian
using IronOcr;
class HaitianOcrExample
{
static void Main()
{
// Initialize the IronTesseract object
var Ocr = new IronTesseract();
// Set the OCR language to Haitian
Ocr.Language = OcrLanguage.Haitian;
// Using the OcrInput class, define the path to the image or PDF
using (var Input = new OcrInput(@"images\Haitian.png"))
{
// Read the text from the image
var Result = Ocr.Read(Input);
// Extract the text found in the image
var AllText = Result.Text;
// Output the extracted text to the console
Console.WriteLine(AllText);
}
}
}
// Install the required IronOcr package
// PM> Install-Package IronOcr.Languages.Haitian
using IronOcr;
class HaitianOcrExample
{
static void Main()
{
// Initialize the IronTesseract object
var Ocr = new IronTesseract();
// Set the OCR language to Haitian
Ocr.Language = OcrLanguage.Haitian;
// Using the OcrInput class, define the path to the image or PDF
using (var Input = new OcrInput(@"images\Haitian.png"))
{
// Read the text from the image
var Result = Ocr.Read(Input);
// Extract the text found in the image
var AllText = Result.Text;
// Output the extracted text to the console
Console.WriteLine(AllText);
}
}
}
' Install the required IronOcr package
' PM> Install-Package IronOcr.Languages.Haitian
Imports IronOcr
Friend Class HaitianOcrExample
Shared Sub Main()
' Initialize the IronTesseract object
Dim Ocr = New IronTesseract()
' Set the OCR language to Haitian
Ocr.Language = OcrLanguage.Haitian
' Using the OcrInput class, define the path to the image or PDF
Using Input = New OcrInput("images\Haitian.png")
' Read the text from the image
Dim Result = Ocr.Read(Input)
' Extract the text found in the image
Dim AllText = Result.Text
' Output the extracted text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class
- Ten fragment kodu ilustruje, jak zaimplementowac OCR przy uzyciu biblioteki IronTesseract do odczytywania tekstu po haitansku z obrazow lub dokumentow PDF.
- Upewnij sie, ze obraz lub PDF znajduje sie w okreslonej sciezce.
- Ten przyklad zaklada, ze pracujesz w srodowisku deweloperskim kompatybilnym z .NET.

