Mongolian OCR in C# and .NET

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

IronOCR to komponent oprogramowania w C#, który pozwala programistom .NET odczytywać tekst z obrazów i dokumentów PDF w 126 językach, w tym po mongolsku.

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.

Zawartość IronOcr.Languages.Mongolian

Pakiet ten zawiera 52 języki OCR dla .NET:

  • Mongolski
  • MongolskiBest
  • MongolskiFast

Pobieranie

Mongolian Language Pack [монгол]

Instalacja

Pierwszym krokiem jest zainstalowanie pakietu OCR Mongolian w swoim projekcie .NET.

Install-Package IronOcr.Languages.Mongolian

Przyklad kodu

Ten przykład kodu C# odczytuje tekst mongolski z obrazu lub dokumentu PDF.

using IronOcr;

class Program
{
    static void Main()
    {
        // Create a new instance of IronTesseract
        var Ocr = new IronTesseract();

        // Set the language to Mongolian
        Ocr.Language = OcrLanguage.Mongolian;

        // Define the input as an image located in the "images" directory
        using (var Input = new OcrInput(@"images\Mongolian.png"))
        {
            // Perform OCR on the input image
            var Result = Ocr.Read(Input);

            // Extract all recognized text
            var AllText = Result.Text;

            // Output the recognized text to the console
            Console.WriteLine(AllText);
        }
    }
}
using IronOcr;

class Program
{
    static void Main()
    {
        // Create a new instance of IronTesseract
        var Ocr = new IronTesseract();

        // Set the language to Mongolian
        Ocr.Language = OcrLanguage.Mongolian;

        // Define the input as an image located in the "images" directory
        using (var Input = new OcrInput(@"images\Mongolian.png"))
        {
            // Perform OCR on the input image
            var Result = Ocr.Read(Input);

            // Extract all recognized text
            var AllText = Result.Text;

            // Output the recognized text to the console
            Console.WriteLine(AllText);
        }
    }
}
Imports IronOcr

Friend Class Program
	Shared Sub Main()
		' Create a new instance of IronTesseract
		Dim Ocr = New IronTesseract()

		' Set the language to Mongolian
		Ocr.Language = OcrLanguage.Mongolian

		' Define the input as an image located in the "images" directory
		Using Input = New OcrInput("images\Mongolian.png")
			' Perform OCR on the input image
			Dim Result = Ocr.Read(Input)

			' Extract all recognized text
			Dim AllText = Result.Text

			' Output the recognized text to the console
			Console.WriteLine(AllText)
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel

Ten przykład pokazuje, jak używać IronOCR do przeprowadzania rozpoznawania tekstu na obrazie tekstu mongolskiego. Inicjuje silnik OCR, ustawia język i przetwarza wejściowy obraz, aby odzyskać i wyświetlić rozpoznany tekst.