Tibetan Alphabet OCR in C# and .NET
IronOCR to komponent oprogramowania C#, który pozwala programistom .NET czytać tekst z obrazów i dokumentów PDF w 126 językach, w tym alfabecie tybetańskim.
Jest to zaawansowany fork Tesseract, zbudowany 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.Tibetan
Ten pakiet zawiera 114 języków OCR dla .NET:
- Tibetan
- TibetanBest
- TibetanFast
- TibetanAlphabet
- TibetanAlphabetBest
- TibetanAlphabetFast
Pobieranie
Pakiet językowy alfabetu tybetańskiego [Tibetan Standard]
Instalacja
Pierwszą rzeczą, którą należy zrobić, jest zainstalowanie pakietu OCR Tibetan Alphabet do swojego projektu .NET.
Przyklad kodu
Ten przykład kodu C# odczytuje tekst alfabetu tybetańskiego z obrazu lub dokumentu PDF.
// Import the IronOcr namespace to use its components
using IronOcr;
class Program
{
static void Main()
{
// Initialize a new IronTesseract object for OCR
var Ocr = new IronTesseract();
// Set the OCR language to Tibetan
Ocr.Language = OcrLanguage.Tibetan;
// Use a using statement for automatic resource disposal
using (var Input = new OcrInput(@"images\Tibetan.png"))
{
// Perform OCR to read text from the input image
var Result = Ocr.Read(Input);
// Retrieve all recognized text from the OCR Result
var AllText = Result.Text;
// Output the recognized text to the console
// Note: Ensure that the console supports Tibetan script for correct display
Console.WriteLine(AllText);
}
}
}' Import the IronOcr namespace to use its components
Imports IronOcr
Module Program
Sub Main()
' Initialize a new IronTesseract object for OCR
Dim Ocr As New IronTesseract()
' Set the OCR language to Tibetan
Ocr.Language = OcrLanguage.Tibetan
' Use a Using statement for automatic resource disposal
Using Input As New OcrInput("images\Tibetan.png")
' Perform OCR to read text from the input image
Dim Result = Ocr.Read(Input)
' Retrieve all recognized text from the OCR Result
Dim AllText = Result.Text
' Output the recognized text to the console
' Note: Ensure that the console supports Tibetan script for correct display
Console.WriteLine(AllText)
End Using
End Sub
End Module' Import the IronOcr namespace to use its components
Imports IronOcr
Module Program
Sub Main()
' Initialize a new IronTesseract object for OCR
Dim Ocr As New IronTesseract()
' Set the OCR language to Tibetan
Ocr.Language = OcrLanguage.Tibetan
' Use a Using statement for automatic resource disposal
Using Input As New OcrInput("images\Tibetan.png")
' Perform OCR to read text from the input image
Dim Result = Ocr.Read(Input)
' Retrieve all recognized text from the OCR Result
Dim AllText = Result.Text
' Output the recognized text to the console
' Note: Ensure that the console supports Tibetan script for correct display
Console.WriteLine(AllText)
End Using
End Sub
End ModuleUwagi
- Biblioteka OCR (
IronTesseract) jest skonfigurowana do odczytu języka tybetańskiego z dostarczonego obrazu. OcrInputobsługuje ładowanie obrazu wejściowego i zapewnia właściwe zwolnienie zasobów przy użyciu instrukcjiusing.Result.Textzawiera tekst przetworzony przez OCR, który można wydrukować lub wykorzystać w aplikacji.
Curtis Chau posiada tytuł licencjata z informatyki (Uniwersytet Carleton) i specjalizuje się w front-endowym rozwoju, z ekspertką w Node.js, TypeScript, JavaScript i React. Pasjonuje się tworzeniem intuicyjnych i estetycznie przyjemnych interfejsów użytkownika, Curtis cieszy się pracą z nowoczesnymi frameworkami i tworzeniem dobrze zorganizowanych, atrakcyjnych wizualnie podręczników.