Pashto 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 C#, umozliwiajacy programistom .NET odczytywanie tekstu z obrazow i dokumentow PDF w 126 jezykach, wlaczajac w to Paszto. 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.

Zawartosc IronOcr.Languages.Pashto

Ten pakiet zawiera 43 języki OCR dla .NET:

  • Paszto
  • PasztoBest
  • PasztoFast

Pobieranie

Pashto Language Pack [پښتو]

Instalacja

Pierwsza rzecza, ktora musimy zrobic, jest zainstalowanie naszego pakietu OCR Paszto w Twoim projekcie .NET.

Install-Package IronOcr.Languages.Pashto

Przyklad kodu

Ten przyklad kodu C# odczytuje tekst w jezyku Paszto z obrazu lub dokumentu PDF.

// Import the IronOcr namespace
using IronOcr;

public class PashtoOcrExample
{
    public static void Main()
    {
        // Create an instance of the IronTesseract class
        var Ocr = new IronTesseract();

        // Set the OCR language to Pashto
        Ocr.Language = OcrLanguage.Pashto;

        // Specify the image file containing the Pashto text
        using (var Input = new OcrInput(@"images\Pashto.png"))
        {
            // Perform the OCR operation on the input image
            var Result = Ocr.Read(Input);

            // Store the extracted text from the image in a string variable
            var AllText = Result.Text;
        }
    }
}
// Import the IronOcr namespace
using IronOcr;

public class PashtoOcrExample
{
    public static void Main()
    {
        // Create an instance of the IronTesseract class
        var Ocr = new IronTesseract();

        // Set the OCR language to Pashto
        Ocr.Language = OcrLanguage.Pashto;

        // Specify the image file containing the Pashto text
        using (var Input = new OcrInput(@"images\Pashto.png"))
        {
            // Perform the OCR operation on the input image
            var Result = Ocr.Read(Input);

            // Store the extracted text from the image in a string variable
            var AllText = Result.Text;
        }
    }
}
' Import the IronOcr namespace
Imports IronOcr

Public Class PashtoOcrExample
	Public Shared Sub Main()
		' Create an instance of the IronTesseract class
		Dim Ocr = New IronTesseract()

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

		' Specify the image file containing the Pashto text
		Using Input = New OcrInput("images\Pashto.png")
			' Perform the OCR operation on the input image
			Dim Result = Ocr.Read(Input)

			' Store the extracted text from the image in a string variable
			Dim AllText = Result.Text
		End Using
	End Sub
End Class
$vbLabelText   $csharpLabel
  • Ten fragment kodu pokazuje, jak wykorzystac biblioteke IronOCR do rozpoznawania tekstu w jezyku Paszto.
  • Ustawia klase IronTesseract, wybiera Paszto jako jezyk, i przetwarza plik obrazu (Pashto.png), aby wyodrebnic i wyswietlic tekst.