在生产环境中测试,没有水印。
在您需要的地方使用。
使用功能齐全的产品30天。
几分钟内即可启动和运行。
在产品试用期间,全面访问我们的支持工程团队
改进来自低质量扫描和照片的输入。使用我们的预处理滤波器清理、拉直和增强困难图像,以获得最佳OCR准确性。
直接在 IronOCR 中轻松对输入内容进行二值化处理,将图像转化为清晰的黑白版本。该过滤器能有效地将文本从复杂的背景中分离出来,减少噪点,使文本提取更容易、更可靠。
了解如何:在 .NET C# 中修复图像颜色以便阅读using IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Add image
using var imageInput = new OcrImageInput("sample.jpg");
// Apply binarize affect
imageInput.Binarize();
// Export the modified image
imageInput.SaveAsImages("binarize.jpg");将彩色图像转换为灰度图像--这是为更高级的预处理过滤器准备图像的关键步骤。
了解如何:在 .NET C# 中修复图像颜色以便阅读using IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Add image
using var imageInput = new OcrImageInput("sample.jpg");
// Apply grayscale affect
imageInput.ToGrayScale();
// Export the modified image
imageInput.SaveAsImages("grayscale.jpg");替换图像中的特定颜色范围,允许您在 OCR 之前去除水印、彩色背景或其他干扰元素。
了解如何:在 .NET C# 中修复图像颜色以便阅读using IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Add image
using var imageInput = new OcrImageInput("sample.jpg");
IronSoftware.Drawing.Color currentColor = new IronSoftware.Drawing.Color("#DB645C");
IronSoftware.Drawing.Color newColor = IronSoftware.Drawing.Color.DarkCyan;
// Replace color
imageInput.ReplaceColor(currentColor, newColor, 80);
// Export the modified image
imageInput.SaveAsImages("replaceColor");加粗图像中的字符,这有助于连接文本中的断线,提高对模糊或细小字体的识别能力。
了解如何:使用阅读过滤器纠正图像using IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Add image
using var imageInput = new OcrImageInput("sample.jpg");
// Apply Dilate filter
imageInput.Dilate();
// Export filtered image
imageInput.SaveAsImages("dilate.jpg");将图像中的字符变细,用于分隔相互接触或融合在一起的字符。
了解如何:使用阅读过滤器纠正图像using IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Add image
using var imageInput = new OcrImageInput("sample.jpg");
// Apply Erode filter
imageInput.Erode();
// Export filtered image
imageInput.SaveAsImages("erode.jpg");替换图像中的特定颜色范围,允许您在 OCR 之前去除水印、彩色背景或其他干扰元素。
了解如何:在 .NET C# 中修复图像颜色以便阅读using IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Add image
using var imageInput = new OcrImageInput("sample.jpg");
IronSoftware.Drawing.Color currentColor = new IronSoftware.Drawing.Color("#DB645C");
IronSoftware.Drawing.Color newColor = IronSoftware.Drawing.Color.DarkCyan;
// Replace color
imageInput.ReplaceColor(currentColor, newColor, 80);
// Export the modified image
imageInput.SaveAsImages("replaceColor");自动检测和校正倾斜的图像,大幅提高不完美扫描图像的 OCR 精确度。
了解如何:在.NET C#中为阅读修正图像方向using IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Add image
using var imageInput = new OcrImageInput("paragraph_skewed.png");
// Apply Deskew filter
imageInput.Deskew();以编程方式任意旋转图像,以确保文本在 OCR 引擎中的正确方向。
了解如何:在.NET C#中为阅读修正图像方向using IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Add image
using var imageInput = new OcrImageInput("paragraph_skewed.png");
// Rotate the image 180 degrees clockwise
imageInput.Rotate(180);
// Export the modified image
imageInput.SaveAsImages("rotate");自动确定页面方向(0、90、180、270 度),有助于在 OCR 之前进行方向校正。即使文档被颠倒扫描,也能确保高准确性。
了解如何:检测页面旋转using IronOcr;
using var input = new OcrInput();
// Load PDF document
input.LoadPdf("Clockwise90.pdf");
// Detect page rotation
var results = input.DetectPageOrientation();
// Ouput result
foreach(var result in results)
{
Console.WriteLine(result.PageNumber);
Console.WriteLine(result.HighConfidence);
Console.WriteLine(result.RotationAngle);
}将图像调整到 OCR 的最佳分辨率,显著提高低分辨率源文件的准确性。
了解如何:在.NET C#中为阅读修正图像方向using IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Add image
using var imageInput = new OcrImageInput("paragraph_skewed.png");
// Apply scale
imageInput.Scale(70);
// Export the modified image
imageInput.SaveAsImages("rotate");对于缺少元数据的低分辨率图像或扫描件,手动设置每英寸点数 (DPI)。提供 DPI 值可引导 OCR 引擎并显著提高识别质量。
了解如何:C# Tesseract Image DPIusing IronOcr;
using System;
var ocrTesseract = new IronTesseract();
using var ocrInput = new OcrInput();
ocrInput.TargetDPI = 300;
ocrInput.LoadImage(@"images\image.png");
var ocrResult = ocrTesseract.Read(ocrInput);
Console.WriteLine(ocrResult.Text);通过算法提高低分辨率图像的清晰度,将文字从模糊或像素化的输入中解救出来。
了解如何:使用阅读过滤器纠正图像using IronOcr;
// Instantiate IronTesseract
IronTesseract ocrTesseract = new IronTesseract();
// Add image
using var imageInput = new OcrImageInput("sample.jpg");
// Apply enhance resolution filter
imageInput.EnhanceResolution();
// Export filtered image
imageInput.SaveAsImages("sharpen.jpg");使用单一的智能方法应用经过精心策划的预处理过滤器链。过滤器向导会自动分析输入的图像,并应用最佳的修正序列,以获得最佳的 OCR 结果。
了解如何:过滤向导using IronOcr;
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);只针对图像中包含文本的特定区域,节省处理时间。只需定义一个矩形区域,即可从表单、表格或杂乱的背景中分离并提取文本。
了解如何:在 C# 中使用 Tesseract OCR 识别图像的特定区域using IronOcr;
using IronSoftware.Drawing;
var ocrTesseract = new IronTesseract();
using var ocrInput = new OcrInput();
var ContentArea = new Rectangle(x: 215, y: 1250, width: 1335, height: 280);
ocrInput.LoadImage("img/example.png", ContentArea);
var ocrResult = ocrTesseract.Read(ocrInput);
Console.WriteLine(ocrResult.Text);