Urdu OCR in C# and .NET
Curtis Chau
Updated: 2026年5月9日
此文件的其他版本:
IronOCR是一個C#軟體元件,允許.NET程式員從圖像和PDF文件中讀取126種語言的文字,包括烏爾都語。
它是Tesseract的一個高級派生版本,專為.NET開發人員打造,並且在速度和準確性方面經常超越其他Tesseract引擎。
IronOcr.Languages.Urdu的內容
此配套程式包含37種適用於.NET的OCR語言:
- 烏爾都語
- 烏爾都語Best
- 烏爾都語Fast
下載
烏爾都語語言包 [اردو]
安裝
我們必須做的第一件事是在您的.NET專案中安裝我們的烏爾都語OCR配套程式。
程式碼範例
此C#程式碼範例從圖像或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
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
技術作家
Curtis Chau擁有Carleton大學的電腦科學學士學位,專精於前端開發,擁有Node.js、TypeScript、JavaScript和React的專業知識。Curtis熱衷於建立直觀且美觀的使用者介面,喜愛使用現代框架並建立結構良好、視覺吸引力的手冊。
...
閱讀更多