C# と .NET でのハングル文字 OCR
IronOCR は、.NET コーダーがハングル文字を含む 126 の言語で画像や PDF ドキュメントからテキストを読み取ることを可能にする C# ソフトウェア コンポーネントです。
これは、特に.NET開発者向けに構築されたTesseractの高度なフォークであり、速度と精度の両方で他のTesseractエンジンを定期的に上回ります。
IronOcr.Languages.Hangul の内容
このパッケージには、.NET 用の 156 個の OCR 言語が含まれています。
- ハングル文字
- ハングルアルファベットベスト
- ハングルアルファベット高速
- ハングル縦書きアルファベット
- ハングル縦書きアルファベットベスト
- ハングル縦書きアルファベット高速
ダウンロード
ハングル文字言語パック [韓国語アルファベット]
インストール
最初のステップは、ハングル アルファベットOCR パッケージを .NET プロジェクトにインストールすることです。
Install-Package IronOCR.Languages.Hangul
Code Example
この C# コード例は、画像または PDF ドキュメントからハングル文字のテキストを読み取ります。
// Ensure the IronOCR library is installed
// PM> Install-Package IronOcr.Languages.Hangul
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of IronTesseract for performing OCR
var Ocr = new IronTesseract();
// Specify the Hangul language pack for better accuracy with Korean texts
Ocr.Language = OcrLanguage.Hangul;
// Load the image or PDF you want to read
using (var Input = new OcrInput(@"images\Hangul.png"))
{
// Perform OCR to read the text from the image
var Result = Ocr.Read(Input);
// Extract the recognized text
var AllText = Result.Text;
// Output the text to the console
Console.WriteLine(AllText);
}
}
}// Ensure the IronOCR library is installed
// PM> Install-Package IronOcr.Languages.Hangul
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of IronTesseract for performing OCR
var Ocr = new IronTesseract();
// Specify the Hangul language pack for better accuracy with Korean texts
Ocr.Language = OcrLanguage.Hangul;
// Load the image or PDF you want to read
using (var Input = new OcrInput(@"images\Hangul.png"))
{
// Perform OCR to read the text from the image
var Result = Ocr.Read(Input);
// Extract the recognized text
var AllText = Result.Text;
// Output the text to the console
Console.WriteLine(AllText);
}
}
}' Ensure the IronOCR library is installed
' PM> Install-Package IronOcr.Languages.Hangul
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create a new instance of IronTesseract for performing OCR
Dim Ocr = New IronTesseract()
' Specify the Hangul language pack for better accuracy with Korean texts
Ocr.Language = OcrLanguage.Hangul
' Load the image or PDF you want to read
Using Input = New OcrInput("images\Hangul.png")
' Perform OCR to read the text from the image
Dim Result = Ocr.Read(Input)
' Extract the recognized text
Dim AllText = Result.Text
' Output the text to the console
Console.WriteLine(AllText)
End Using
End Sub
End Class説明:
- IronTesseract : これは OCR 操作を実行するために使用されるメイン クラスです。
- OcrLanguage.Hangul : OCR エンジンがハングル言語パックを使用することを指定します。これにより、エンジンが韓国語のテキスト認識用に最適化されます。
- OcrInput : 処理する画像または PDF を格納するコンテナーです。
- Ocr.Read() : このメソッドは OCR 操作を実行し、認識されたテキストを含む結果オブジェクトを返します。





