Korean 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.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

