C# および .NET でのギリシャ文字 OCR
このドキュメントの他のバージョン:
IronOCR は、.NET コーダーがギリシャ文字を含む 126 の言語で画像や PDF ドキュメントからテキストを読み取ることを可能にする C# ソフトウェア コンポーネントです。
これは、特に.NET開発者向けに構築されたTesseractの高度なフォークであり、速度と精度の両方で多くの場合、他のTesseractエンジンを上回ります。
IronOcr.Languages.Greek の内容
このパッケージには、.NET 用の 102 個の OCR 言語が含まれています。
- Greek
- GreekBest
- GreekFast
- GreekAlphabet
- GreekAlphabetBest
- GreekAlphabetFast
ダウンロード
ギリシャ文字言語パック[ελληνικά]
インストール
最初のステップは、ギリシャ文字 OCR パッケージを .NET プロジェクトにインストールすることです。
コード例
この C# コード例は、画像または PDF ドキュメントからギリシャ文字のテキストを読み取ります。
// Import the IronOcr namespace
using IronOcr;
class GreekOcrExample
{
static void Main()
{
// Initialize the IronTesseract OCR engine
var Ocr = new IronTesseract();
// Set the OCR language to Greek
Ocr.Language = OcrLanguage.Greek;
// Load the image or PDF containing Greek text
using (var Input = new OcrInput(@"images\Greek.png"))
{
// Perform OCR and get the result
var Result = Ocr.Read(Input);
// Extract all recognized text
var AllText = Result.Text;
// Output the recognized text
System.Console.WriteLine(AllText);
}
}
}' Import the IronOcr namespace
Imports IronOcr
Class GreekOcrExample
Shared Sub Main()
' Initialize the IronTesseract OCR engine
Dim Ocr As New IronTesseract()
' Set the OCR language to Greek
Ocr.Language = OcrLanguage.Greek
' Load the image or PDF containing Greek text
Using Input As New OcrInput("images\Greek.png")
' Perform OCR and get the result
Dim Result = Ocr.Read(Input)
' Extract all recognized text
Dim AllText = Result.Text
' Output the recognized text
System.Console.WriteLine(AllText)
End Using
End Sub
End Class' Import the IronOcr namespace
Imports IronOcr
Class GreekOcrExample
Shared Sub Main()
' Initialize the IronTesseract OCR engine
Dim Ocr As New IronTesseract()
' Set the OCR language to Greek
Ocr.Language = OcrLanguage.Greek
' Load the image or PDF containing Greek text
Using Input As New OcrInput("images\Greek.png")
' Perform OCR and get the result
Dim Result = Ocr.Read(Input)
' Extract all recognized text
Dim AllText = Result.Text
' Output the recognized text
System.Console.WriteLine(AllText)
End Using
End Sub
End Class- IronTesseract: OCR処理を実行するクラスです。
- OcrInput: このクラスはOCR処理のために画像やPDFファイルを読み込むために使用されます。
Ocr.Read(): 入力データに対してOCRを実行し、認識されたテキストを提供するメソッドです。
このコードを実行する前に、IronOCRライブラリとギリシャ語の言語パックが.NETプロジェクトに正しくインストールされていることを確認してください。 このコードは、images/Greek.png にある画像から抽出したテキストを出力します。
Curtis Chauは、カールトン大学でコンピュータサイエンスの学士号を取得し、Node.js、TypeScript、JavaScript、およびReactに精通したフロントエンド開発を専門としています。直感的で美しいユーザーインターフェースを作成することに情熱を持ち、Curtisは現代のフレームワークを用いた開発や、構造の良い視覚的に魅力的なマニュアルの作成を楽しんでいます。