Urdu OCR in C# and .NET
Bu belgenin diğer versiyonları:
IronOCR, .NET kodlayıcılarının 126 dilde, Urduca da dahil olmak üzere, resimlerden ve PDF belgelerinden metin okumasını sağlayan bir C# yazılım bileşenidir.
Tesseract'ın ileri düzey bir çatallamasıdır, yalnızca .NET geliştiricileri için oluşturulmuş olup hız ve doğruluk açısından diğer Tesseract motorlarını düzenli olarak geride bırakmaktadır.
IronOcr.Languages.Urdu'nun İçeriği
Bu paket .NET için 37 OCR dilini içerir:
- Urdu
- UrduBest
- UrduFast
İndirme
Urdu Dil Paketi [اردو]
Kurulum
Yapmamız gereken ilk şey, .NET projenize Urduca OCR paketini yüklemektir.
Install-Package IronOcr.Languages.Urdu
Kod Örneği
Bu C# kod örneği, bir resim veya PDF belgesinden Urduca metin okur.
// 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

