C# 和 .NET 中的韩语 OCR

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 的内容

此软件包包含 108 种适用于 .NET 的 OCR 语言:

  • 韩国语
  • 韩国语Best
  • 韩国语Fast
  • 韩国语Vertical
  • 韩国语VerticalBest
  • 韩国语VerticalFast

下载

韩语语言包[한국어(韩语)]

安装

第一步是将韩语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