C# 和 .NET 中的荷蘭語 OCR
This article was translated from English: Does it need improvement?
TranslatedView the article in English
Other versions of this document:
IronOCR 是一個 C# 軟體元件,允許 .NET 程式設計師從圖像和 PDF 文件中讀取 126 種語言(包括荷蘭語)的文字。
它是 Tesseract 的一個高級分支,專為 .NET 開發人員構建,在速度和準確性方面通常優於其他 Tesseract 引擎。
IronOcr.Languages.Dutch 的內容
此軟體包包含 40 種適用於 .NET 的 OCR 語言:
- 荷蘭語
- 荷蘭語Best
- 荷蘭語Fast
下載
荷蘭語語言包[Nederlands]
安裝
我們首先需要做的是將荷蘭語OCR 套件安裝到您的 .NET 專案中。
Install-Package IronOCR.Languages.Dutch
程式碼範例
這段 C# 程式碼範例從圖像或 PDF 文件中讀取荷蘭文文字。
// The first step is to ensure the IronOcr.Languages.Dutch package is installed.
// You can do this from the Package Manager Console with the command:
// PM> Install-Package IronOcr.Languages.Dutch
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to Dutch.
// This is crucial for recognizing text in that language effectively.
Ocr.Language = OcrLanguage.Dutch;
// Use a using statement to manage the OcrInput resource lifecycle.
using (var Input = new OcrInput(@"images\Dutch.png"))
{
// Read the image and perform OCR to extract text.
var Result = Ocr.Read(Input);
// Store the recognized text into a variable.
var AllText = Result.Text;
// You can now use the extracted text stored in AllText.
}// The first step is to ensure the IronOcr.Languages.Dutch package is installed.
// You can do this from the Package Manager Console with the command:
// PM> Install-Package IronOcr.Languages.Dutch
using IronOcr;
var Ocr = new IronTesseract();
// Set the OCR language to Dutch.
// This is crucial for recognizing text in that language effectively.
Ocr.Language = OcrLanguage.Dutch;
// Use a using statement to manage the OcrInput resource lifecycle.
using (var Input = new OcrInput(@"images\Dutch.png"))
{
// Read the image and perform OCR to extract text.
var Result = Ocr.Read(Input);
// Store the recognized text into a variable.
var AllText = Result.Text;
// You can now use the extracted text stored in AllText.
}' The first step is to ensure the IronOcr.Languages.Dutch package is installed.
' You can do this from the Package Manager Console with the command:
' PM> Install-Package IronOcr.Languages.Dutch
Imports IronOcr
Private Ocr = New IronTesseract()
' Set the OCR language to Dutch.
' This is crucial for recognizing text in that language effectively.
Ocr.Language = OcrLanguage.Dutch
' Use a using statement to manage the OcrInput resource lifecycle.
Using Input = New OcrInput("images\Dutch.png")
' Read the image and perform OCR to extract text.
Dim Result = Ocr.Read(Input)
' Store the recognized text into a variable.
Dim AllText = Result.Text
' You can now use the extracted text stored in AllText.
End Using$vbLabelText $csharpLabel
這段代碼在 C# 中設定了一個 OCR 程序,用於讀取荷蘭語文字。 它會初始化 IronTesseract 對象,指定 OCR 語言,並處理輸入的影像檔案。處理結果是從文件中提取的文本,您可以根據需要在應用程式中使用。





