Canadian Aboriginal Alphabet OCR in C# and .NET
IronOCR to komponent oprogramowania C# pozwalający programistom .NET na odczytywanie tekstu z obrazów i dokumentów PDF w 126 językach, w tym kanadyjskiego alfabetu aborygenów.
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.
Zawartość IronOcr.Languages.CanadianAboriginal
Ten pakiet zawiera 103 języki OCR dla .NET:
- CanadianAboriginalAlphabet
- CanadianAboriginalAlphabetBest
- CanadianAboriginalAlphabetFast
Pobieranie
Canadian Aboriginal Alphabet Language Pack [Canadian First Nations]
Instalacja
Pierwszą rzeczą, którą musimy zrobić, jest zainstalowanie naszego pakietu OCR kanadyjskiego alfabetu aborygenów do projektu .NET.
Install-Package IronOcr.Languages.CanadianAboriginal
Przyklad kodu
Ten przykład kodu C# odczytuje tekst w kanadyjskim alfabecie aborygenów z obrazu lub dokumentu PDF. Używa biblioteki IronOCR do przeprowadzania optycznego rozpoznawania znaków.
// Install the IronOCR package via NuGet
// PM> Install-Package IronOcr.Languages.CanadianAboriginal
using IronOcr;
class Program
{
static void Main()
{
// Create an instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Canadian Aboriginal
Ocr.Language = OcrLanguage.CanadianAboriginal;
// Provide the path to the image or PDF for OCR processing
using (var Input = new OcrInput(@"images\CanadianAboriginal.png"))
{
// Perform OCR on the input file
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
// Install the IronOCR package via NuGet
// PM> Install-Package IronOcr.Languages.CanadianAboriginal
using IronOcr;
class Program
{
static void Main()
{
// Create an instance of the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the language to Canadian Aboriginal
Ocr.Language = OcrLanguage.CanadianAboriginal;
// Provide the path to the image or PDF for OCR processing
using (var Input = new OcrInput(@"images\CanadianAboriginal.png"))
{
// Perform OCR on the input file
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Output the recognized text
Console.WriteLine(AllText);
}
}
}
' Install the IronOCR package via NuGet
' PM> Install-Package IronOcr.Languages.CanadianAboriginal
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create an instance of the IronTesseract OCR engine
Dim Ocr = New IronTesseract()
' Set the language to Canadian Aboriginal
Ocr.Language = OcrLanguage.CanadianAboriginal
' Provide the path to the image or PDF for OCR processing
Using Input = New OcrInput("images\CanadianAboriginal.png")
' Perform OCR on the input file
Dim Result = Ocr.Read(Input)
' Extract all recognized text
Dim AllText = Result.Text
' Output the recognized text
Console.WriteLine(AllText)
End Using
End Sub
End Class
- Powyższy kod używa klasy
IronOcr.IronTesseractdo wykonywania OCR. - Ustawia
OcrLanguage.CanadianAboriginal, aby określić model językowy dla tekstu kanadyjskiego aborygena. - Obiekt
OcrInputładuje obraz określony w ścieżce. - Metoda
Ocr.Readprzetwarza obraz i zwraca rozpoznany tekst. - Na koniec wyodrębniony tekst jest drukowany na konsolę.

