IRONSOFTWAREHOME
过滤器向导
using IronOcr;
using System;

var ocrTesseract = new IronTesseract();

// WIZARD - If you are unsure which filters to use,
// use the debug-wizard to test all combinations:

string codeToRun = OcrInputFilterWizard.Run(@"images\image.png", out double confidence, ocrTesseract);
Console.WriteLine($"Confidence: {confidence}");
Console.WriteLine(codeToRun);
Imports IronOcr
Imports System

Dim ocrTesseract = New IronTesseract()

' WIZARD - If you are unsure which filters to use,
' use the debug-wizard to test all combinations:

Dim confidence As Double
Dim codeToRun As String = OcrInputFilterWizard.Run("images\image.png", confidence, ocrTesseract)
Console.WriteLine($"Confidence: {confidence}")
Console.WriteLine(codeToRun)
NuGet Download
PM > Install-Package IronOcr
过滤器向导

过滤器向导

IronOCR包含一个OcrInputFilterWizard类,可以自动评估预处理过滤器的组合以最大化OCR信心。 如果您不确定哪些过滤器能产生最佳效果,那么这种方法非常理想。 与其手动应用OcrInputFilterWizard.Run(...)进行蛮力扫描以获取最佳设置,并返回最佳过滤器组合或代码片段以重现它。

您可以应用的可选筛选条件

IronOCR 中一些常见的筛选条件,您可能需要手动复制,包括:

  • input.Contrast()
  • input.Sharpen()
  • input.Binarize()
  • input.ToGrayScale()
  • input.Invert()
  • input.Deskew()
  • input.Scale(...)
  • input.Denoise()
  • input.DeepCleanBackgroundNoise()
  • input.EnhanceResolution()
  • input.Dilate(), input.Erode()

在根据向导结果或您自己的测试进行指导时,可以结合使用这些方法手动构建管道。

提升图像质量以获得更好的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
您的资料将始终保密。
深受全球数百万工程师信赖
Iron Software 的客户徽标
立即获取您的免费30 天试用密钥
无需信用卡或创建账户