Italian OCR in C# and .NET
Curtis Chau
更新日: 2026年8月2日
このドキュメントの他のバージョン:
IronOCR は、.NET コーダーがイタリア語を含む 126 の言語で画像や PDF ドキュメントからテキストを読み取ることを可能にする C# ソフトウェア コンポーネントです。
これはTesseractの高度なフォークであり、.NET開発者専用に構築され、速度と精度の両方で他のTesseractエンジンを定期的に上回ります。
IronOcr.Languages.Italian の内容
このパッケージには、.NET 用の 6 つの OCR 言語モードが含まれています。
- イタリア語
- イタリアンベスト
- イタリアンファスト
- イタリアンオールド
- イタリアンオールドベスト
- イタリア語オールドファースト
ダウンロード
イタリア語言語パック[italiano]
インストール
最初に、イタリア語のOCR パッケージを .NET プロジェクトにインストールする必要があります。
Code Example
この C# コード例は、画像または PDF ドキュメントからイタリア語のテキストを読み取ります。
// Include IronOcr library
using IronOcr;
class Program
{
static void Main()
{
// Create a new instance of the IronTesseract class
var Ocr = new IronTesseract();
// Set the OCR language to Italian
Ocr.Language = OcrLanguage.Italian;
// Read text from an image file
using (var Input = new OcrInput(@"images\Italian.png"))
{
// Perform OCR to get the text content from the image
var Result = Ocr.Read(Input);
// Get and print all the recognized text
var AllText = Result.Text;
Console.WriteLine(AllText);
}
}
}' Include IronOcr library
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create a new instance of the IronTesseract class
Dim Ocr = New IronTesseract()
' Set the OCR language to Italian
Ocr.Language = OcrLanguage.Italian
' Read text from an image file
Using Input = New OcrInput("images\Italian.png")
' Perform OCR to get the text content from the image
Dim Result = Ocr.Read(Input)
' Get and print all the recognized text
Dim AllText = Result.Text
Console.WriteLine(AllText)
End Using
End Sub
End Class' Include IronOcr library
Imports IronOcr
Friend Class Program
Shared Sub Main()
' Create a new instance of the IronTesseract class
Dim Ocr = New IronTesseract()
' Set the OCR language to Italian
Ocr.Language = OcrLanguage.Italian
' Read text from an image file
Using Input = New OcrInput("images\Italian.png")
' Perform OCR to get the text content from the image
Dim Result = Ocr.Read(Input)
' Get and print all the recognized text
Dim AllText = Result.Text
Console.WriteLine(AllText)
End Using
End Sub
End Class説明:
- IronOCR の使用:
IronOcrライブラリは OCR 機能を利用するために含まれています。 - IronTesseract インスタンスの作成:
IronTesseractは OCR 処理に使用されるコアクラスです。 - 言語の設定: OCR は
Ocr.Language = OcrLanguage.Italianを使用してイタリア語を処理するように設定されています。 - 入力の読み込み: 画像ファイルを指定するために
OcrInputオブジェクトが作成されます。 - OCR の実行:
Ocr.Read(Input)は入力画像に対して OCR を実行し、テキスト結果を返します。 - 出力: 結果のテキストは
AllTextに保存され、コンソールに表示されます。
例が正常に動作するためには images\Italian.png ファイルパスが正しく、ファイルが存在することを確認してください。
テクニカルライター
Curtis Chauは、カールトン大学でコンピュータサイエンスの学士号を取得し、Node.js、TypeScript、JavaScript、およびReactに精通したフロントエンド開発を専門としています。直感的で美しいユーザーインターフェースを作成することに情熱を持ち、Curtisは現代のフレームワークを用いた開発や、構造の良い視覚的に魅力的なマニュアルの作成を楽しんでいます。