Urdu 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# umożliwiający programistom .NET odczytywanie tekstu z obrazów i dokumentów PDF w 126 językach, w tym w języku urdu.

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.

Zawartość IronOcr.Languages.Urdu

Ten pakiet zawiera 37 języków OCR dla .NET:

  • Urdu
  • UrduBest
  • UrduFast

Pobieranie

Urdu Language Pack [اردو]

Instalacja

Pierwszą rzeczą, którą musimy zrobić, to zainstalowanie naszego pakietu OCR Urdu w Twoim projekcie .NET.

Install-Package IronOcr.Languages.Urdu

Przyklad kodu

Ten przykład kodu C# odczytuje tekst w języku urdu z obrazu lub dokumentu PDF.

// Install the IronOcr.Languages.Urdu package
using IronOcr;

var Ocr = new IronTesseract(); // Create a new OCR object
Ocr.Language = OcrLanguage.Urdu; // Set the language to Urdu

// Using a block that ensures the Input object gets disposed after use
using (var Input = new OcrInput(@"images\Urdu.png")) 
{
    var Result = Ocr.Read(Input); // Perform OCR on the input
    var AllText = Result.Text; // Extract the recognized text
    // AllText now contains the Urdu text read from the image
}
// Install the IronOcr.Languages.Urdu package
using IronOcr;

var Ocr = new IronTesseract(); // Create a new OCR object
Ocr.Language = OcrLanguage.Urdu; // Set the language to Urdu

// Using a block that ensures the Input object gets disposed after use
using (var Input = new OcrInput(@"images\Urdu.png")) 
{
    var Result = Ocr.Read(Input); // Perform OCR on the input
    var AllText = Result.Text; // Extract the recognized text
    // AllText now contains the Urdu text read from the image
}
' Install the IronOcr.Languages.Urdu package
Imports IronOcr

Private Ocr = New IronTesseract() ' Create a new OCR object
Ocr.Language = OcrLanguage.Urdu ' Set the language to Urdu

' Using a block that ensures the Input object gets disposed after use
Using Input = New OcrInput("images\Urdu.png")
	Dim Result = Ocr.Read(Input) ' Perform OCR on the input
	Dim AllText = Result.Text ' Extract the recognized text
	' AllText now contains the Urdu text read from the image
End Using
$vbLabelText   $csharpLabel