Tibetan Alphabet OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English

126 wiecej jeżyków

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.

Install-Package IronOcr.Languages.Tibetan

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
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

Friend Class Program
	Shared Sub Main()
		' Initialize a new IronTesseract object for OCR
		Dim Ocr = New IronTesseract()

		' Set the OCR language to Tibetan
		Ocr.Language = OcrLanguage.Tibetan

		' Use a using statement for automatic resource disposal
		Using Input = 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 Class
$vbLabelText   $csharpLabel

Uwagi

  • Biblioteka OCR (IronTesseract) jest skonfigurowana do odczytu języka tybetańskiego z dostarczonego obrazu.
  • OcrInput obsługuje ładowanie obrazu wejściowego i zapewnia właściwe zarządzanie zasobami przy użyciu instrukcji using.
  • Result.Text zawiera przetworzony tekst OCR, który można wydrukować lub użyć w aplikacji.