C# と .NET でのポルトガル語 OCR
Other versions of this document:
IronOCR は、.NET コーダーがポルトガル語を含む 126 の言語で画像や PDF ドキュメントからテキストを読み取ることを可能にする C# ソフトウェア コンポーネントです。
これは、特に.NET開発者向けに構築されたTesseractの高度なフォークであり、速度と精度の両方で他のTesseractエンジンを定期的に上回ります。
IronOcr.Languages.Portuguese の内容
このパッケージには、.NET 用の 55 個の OCR 言語が含まれています。
- ポルトガル語
- ポルトガル語ベスト
- PortugueseFast
ダウンロード
ポルトガル語パック [português]
インストール
最初に、ポルトガル語OCR パッケージを .NET プロジェクトにインストールする必要があります。
Install-Package IronOCR.Languages.Portuguese
Code Example
この C# コード例は、画像または PDF ドキュメントからポルトガル語のテキストを読み取ります。
// Required using directive for IronOcr
using IronOcr;
var Ocr = new IronTesseract();
// Specify the language for OCR as Portuguese
Ocr.Language = OcrLanguage.Portuguese;
// Load the image or PDF from which to read the text
using (var Input = new OcrInput(@"images\Portuguese.png"))
{
// Perform OCR on the input
var Result = Ocr.Read(Input);
// Retrieve the recognized text
var AllText = Result.Text;
// Output the extracted text
Console.WriteLine(AllText);
}// Required using directive for IronOcr
using IronOcr;
var Ocr = new IronTesseract();
// Specify the language for OCR as Portuguese
Ocr.Language = OcrLanguage.Portuguese;
// Load the image or PDF from which to read the text
using (var Input = new OcrInput(@"images\Portuguese.png"))
{
// Perform OCR on the input
var Result = Ocr.Read(Input);
// Retrieve the recognized text
var AllText = Result.Text;
// Output the extracted text
Console.WriteLine(AllText);
}' Required using directive for IronOcr
Imports IronOcr
Private Ocr = New IronTesseract()
' Specify the language for OCR as Portuguese
Ocr.Language = OcrLanguage.Portuguese
' Load the image or PDF from which to read the text
Using Input = New OcrInput("images\Portuguese.png")
' Perform OCR on the input
Dim Result = Ocr.Read(Input)
' Retrieve the recognized text
Dim AllText = Result.Text
' Output the extracted text
Console.WriteLine(AllText)
End Usingこのコードは、IronOCR ライブラリを設定して使用し、画像からポルトガル語のテキストを読み取る方法を示しています。 画像または PDF ドキュメントへのパスが正しいことを確認してください。 認識されたテキストはAllText変数に保存され、コンソールに出力されます。





