Thaana Alphabet OCR in C
IronOCR to komponent oprogramowania C#, ktory pozwala programistom .NET czytac tekst z obrazow i dokumentow PDF w 126 jezykach, w tym w alfabecie Thaana.
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.
Zawartosc IronOcr.Languages.Thaana
Ten pakiet zawiera 67 języków OCR dla .NET:
- ThaanaAlphabet
- ThaanaAlphabetBest
- ThaanaAlphabetFast
Pobieranie
Thaana Alphabet Language Pack [Thaana]
Instalacja
Pierwsza rzecz, ktora musimy zrobic, to zainstalowac nasz pakiet OCR dla alfabetu Thaana do projektu .NET.
Install-Package IronOcr.Languages.Thaana
Przyklad kodu
Ten przyklad kodu C# czyta tekst w alfabecie Thaana z obrazu lub dokumentu PDF.
// Import the IronOcr namespace
using IronOcr;
// Create a new IronTesseract OCR object
var Ocr = new IronTesseract();
// Set the language to Thaana for OCR processing
Ocr.Language = OcrLanguage.Thaana;
// Create an OcrInput object with the path to the image
using (var Input = new OcrInput(@"images\Thaana.png"))
{
// Perform OCR on the input image to extract text
var Result = Ocr.Read(Input);
// Store the recognized text from the image in a variable
var AllText = Result.Text;
// Output the recognized text to the console or any other use
Console.WriteLine(AllText);
}
// Import the IronOcr namespace
using IronOcr;
// Create a new IronTesseract OCR object
var Ocr = new IronTesseract();
// Set the language to Thaana for OCR processing
Ocr.Language = OcrLanguage.Thaana;
// Create an OcrInput object with the path to the image
using (var Input = new OcrInput(@"images\Thaana.png"))
{
// Perform OCR on the input image to extract text
var Result = Ocr.Read(Input);
// Store the recognized text from the image in a variable
var AllText = Result.Text;
// Output the recognized text to the console or any other use
Console.WriteLine(AllText);
}
' Import the IronOcr namespace
Imports IronOcr
' Create a new IronTesseract OCR object
Private Ocr = New IronTesseract()
' Set the language to Thaana for OCR processing
Ocr.Language = OcrLanguage.Thaana
' Create an OcrInput object with the path to the image
Using Input = New OcrInput("images\Thaana.png")
' Perform OCR on the input image to extract text
Dim Result = Ocr.Read(Input)
' Store the recognized text from the image in a variable
Dim AllText = Result.Text
' Output the recognized text to the console or any other use
Console.WriteLine(AllText)
End Using
- Powyzej przedstawiono, jak uzyc IronOCR do wykonania OCR na obrazie zawierajacym skrypt Thaana.
- Konfiguruje obiekt OCR, ustala jezyk i odczytuje tekst z okreslonego pliku obrazu.
- Wyodrebniony tekst moze byc nastepnie uzyty zgodnie z potrzebami w twojej aplikacji.

