Dutch OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
Other versions of this document:

IronOCR 是一個 C# 軟體元件,允許 .NET 編程人員用 126 種語言(包括荷蘭語)從圖像和 PDF 文件中閱讀文本。

它是一個專為 .NET 開發者設計的 Tesseract 高級分支,在速度和準確性方面經常優於其他 Tesseract 引擎。

IronOcr.Languages.Dutch 的內容

此包包含 40 種 .NET 的 OCR 語言:

  • 荷蘭語
  • 荷蘭語Best
  • 荷蘭語Fast

下載

荷蘭語語言包 style='white-space:default'>[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 語言,並處理輸入圖像文件。結果是從文件中提取的文本,可以根據需要在您的應用程序中使用。