IRONSOFTWAREHOME
OCR画像最適化フィルター
using IronOcr;
using System;

var ocrTesseract = new IronTesseract();
using var ocrInput = new OcrInput();
// First load all image(s)
ocrInput.LoadImage(@"images\image.png");

// Note: You don't need all of them; most users only need Deskew() and occasionally DeNoise()
ocrInput.WithTitle("My Document");
ocrInput.Binarize();
ocrInput.Contrast();
ocrInput.Deskew();
ocrInput.DeNoise();
ocrInput.Despeckle();
ocrInput.Dilate();
ocrInput.EnhanceResolution(300);
ocrInput.Invert();
ocrInput.Rotate(90);
ocrInput.Scale(150);
ocrInput.Sharpen();
ocrInput.ToGrayScale();
ocrInput.Erode();

// WIZARD - If you are unsure use the debug-wizard to test all combinations:
string codeToRun = OcrInputFilterWizard.Run(@"images\image.png", out double confidence, ocrTesseract);
Console.WriteLine(codeToRun);

// Optional: Export modified images so you can view them.
foreach (var page in ocrInput.GetPages())
{
    page.SaveAsImage($"filtered_{page.Index}.bmp");
}

var ocrResult = ocrTesseract.Read(ocrInput);
Console.WriteLine(ocrResult.Text);
Imports IronOcr
Imports System

Dim ocrTesseract = New IronTesseract()
Using ocrInput = New OcrInput()
    ' First load all image(s)
    ocrInput.LoadImage("images\image.png")

    ' Note: You don't need all of them; most users only need Deskew() and occasionally DeNoise()
    ocrInput.WithTitle("My Document")
    ocrInput.Binarize()
    ocrInput.Contrast()
    ocrInput.Deskew()
    ocrInput.DeNoise()
    ocrInput.Despeckle()
    ocrInput.Dilate()
    ocrInput.EnhanceResolution(300)
    ocrInput.Invert()
    ocrInput.Rotate(90)
    ocrInput.Scale(150)
    ocrInput.Sharpen()
    ocrInput.ToGrayScale()
    ocrInput.Erode()

    ' WIZARD - If you are unsure use the debug-wizard to test all combinations:
    Dim codeToRun As String = OcrInputFilterWizard.Run("images\image.png", confidence:=Nothing, ocrTesseract)
    Console.WriteLine(codeToRun)

    ' Optional: Export modified images so you can view them.
    For Each page In ocrInput.GetPages()
        page.SaveAsImage($"filtered_{page.Index}.bmp")
    Next

    Dim ocrResult = ocrTesseract.Read(ocrInput)
    Console.WriteLine(ocrResult.Text)
End Using
NuGet Download
PM > Install-Package IronOcr
OCR画像最適化フィルター

OCR画像最適化フィルター

OcrInput クラスは、C# および .NET 開発者に、OCR 処理の前に画像入力を高速かつ正確に前処理するための詳細な制御を提供します。 これにより、Photoshop バッチ スクリプトまたは ImageMagick を使用して OCR 用の画像を準備するという一般的な方法が無効になります。

以下に、IronOCR と C# で OcrInput クラスを使用する方法を示す例を示します。

ガイドを使ってOCRの画像品質を向上させる
GitHubで見る

準備はできましたか?

Nuget Downloads 6,236,385バージョン:2026.9リリースされたばかり

Key in blue circle

無料の30日間トライアルキーをすぐに入手してください。

Your trial license will be sent to your email address

制限なし。100% ロック解除済み。クレジットカード不要。

bullet_checkedクレジットカードやアカウントの作成は不要です。制限なし。100% ロック解除済み。クレジットカード不要。
  • Logo Aetna
  • Logo NASA
  • Logo GE
  • Logo Porsche
  • Logo USDA
  • Logo Qatar
Join Millions of Engineers who’ve tried IronPDF
義務のない相談を受ける
下記のフォームを記入するか、sales@ironsoftware.comにメールしてください。
あなたの詳細は常に守秘されます。
世界中の数百万人のエンジニアから信頼されています。
ライセンスはより安く
あなたの無料30日間の試用キーをすぐに入手。
クレジットカードやアカウントの作成は不要です。