C# 和 .NET 中的北庫德語 OCR
This article was translated from English: Does it need improvement?
TranslatedView the article in English
IronOCR 是一個 C# 軟體元件,允許 .NET 程式設計師從圖像和 PDF 文件中讀取 126 種語言的文本,包括北庫德語。
它是 Tesseract 的一個高級分支,專為 .NET 開發人員構建,在速度和準確性方面通常優於其他 Tesseract 引擎。
IronOcr.Languages.NorthernKurdish 的內容
此軟體包包含 70 種適用於 .NET 的 OCR 語言:
- 北庫德人
- 北庫德人Best
- 北庫德族快速
下載
北庫德語語言包[庫曼吉語]
安裝
我們首先要做的是將北庫德語OCR 套件安裝到您的 .NET 專案中。
Install-Package IronOCR.Languages.NorthernKurdish
程式碼範例
這段 C# 程式碼範例從圖像或 PDF 文件中讀取北庫德語文字。
// Ensure that the IronOCR package and the Northern Kurdish language package are installed
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to Northern Kurdish
Ocr.Language = OcrLanguage.NorthernKurdish;
// Use a using statement to ensure resources are disposed of correctly
// Specify the path to the image or PDF file you want to process
using (var Input = new OcrInput(@"images\NorthernKurdish.png"))
{
// Read the text from the input image or PDF
var Result = Ocr.Read(Input);
// Retrieve the recognized text
var AllText = Result.Text;
// AllText now contains the Northern Kurdish text extracted from the image
}// Ensure that the IronOCR package and the Northern Kurdish language package are installed
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to Northern Kurdish
Ocr.Language = OcrLanguage.NorthernKurdish;
// Use a using statement to ensure resources are disposed of correctly
// Specify the path to the image or PDF file you want to process
using (var Input = new OcrInput(@"images\NorthernKurdish.png"))
{
// Read the text from the input image or PDF
var Result = Ocr.Read(Input);
// Retrieve the recognized text
var AllText = Result.Text;
// AllText now contains the Northern Kurdish text extracted from the image
}' Ensure that the IronOCR package and the Northern Kurdish language package are installed
Imports IronOcr
Private Ocr = New IronTesseract()
' Set the OCR language to Northern Kurdish
Ocr.Language = OcrLanguage.NorthernKurdish
' Use a using statement to ensure resources are disposed of correctly
' Specify the path to the image or PDF file you want to process
Using Input = New OcrInput("images\NorthernKurdish.png")
' Read the text from the input image or PDF
Dim Result = Ocr.Read(Input)
' Retrieve the recognized text
Dim AllText = Result.Text
' AllText now contains the Northern Kurdish text extracted from the image
End Using$vbLabelText $csharpLabel





