Dutch OCR in C# and .NET

This article was translated from English: Does it need improvement?
Translated
View the article in English
本文件的其他版本:

IronOCR 是一個 C# 軟體元件,讓 .NET 程式設計師能夠從 126 種語言(包括荷蘭語)的圖片和 PDF 文件中讀取文字。

這是 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 語言,並處理輸入的影像檔案。結果即為從檔案中擷取的文字,可依需求在您的應用程式中加以運用。