Korean 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 開發人員從圖像和 PDF 文件中讀取包括韓文在內的 126 種語言的文字。

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

IronOcr.Languages.Korean 的內容

此套件包含 .NET 的 108 種 OCR 語言:

  • Korean
  • KoreanBest
  • KoreanFast
  • KoreanVertical
  • KoreanVerticalBest
  • KoreanVerticalFast

下載

韓文語言包 style='white-space:default'>[한국어 (韓國語)]

安裝

第一步是將 韓文 OCR 套件安裝到您的 .NET 專案中。

Install-Package IronOCR.Languages.Korean

代碼示例

此 C# 代碼範例從圖像或 PDF 文件中讀取韓文文字。

// Ensure you have installed the IronOCR Korean language package
using IronOcr;

var Ocr = new IronTesseract();

// Specify that we want to use the Korean OCR capability
Ocr.Language = OcrLanguage.Korean;

// Create an OCR input, loading the image from the specified path
using (var Input = new OcrInput(@"images\Korean.png"))
{
    // Use the OCR engine to read the text from the image
    var Result = Ocr.Read(Input);

    // Once reading is complete, extract the text from the result
    var AllText = Result.Text;
    // AllText now contains the text recognized from the image
}
// Ensure you have installed the IronOCR Korean language package
using IronOcr;

var Ocr = new IronTesseract();

// Specify that we want to use the Korean OCR capability
Ocr.Language = OcrLanguage.Korean;

// Create an OCR input, loading the image from the specified path
using (var Input = new OcrInput(@"images\Korean.png"))
{
    // Use the OCR engine to read the text from the image
    var Result = Ocr.Read(Input);

    // Once reading is complete, extract the text from the result
    var AllText = Result.Text;
    // AllText now contains the text recognized from the image
}
' Ensure you have installed the IronOCR Korean language package
Imports IronOcr

Private Ocr = New IronTesseract()

' Specify that we want to use the Korean OCR capability
Ocr.Language = OcrLanguage.Korean

' Create an OCR input, loading the image from the specified path
Using Input = New OcrInput("images\Korean.png")
	' Use the OCR engine to read the text from the image
	Dim Result = Ocr.Read(Input)

	' Once reading is complete, extract the text from the result
	Dim AllText = Result.Text
	' AllText now contains the text recognized from the image
End Using
$vbLabelText   $csharpLabel