在 IronOCR 中保存经过不同处理的图像
This article was translated from English: Does it need improvement?
TranslatedView the article in English
如何保存应用了不同图像处理/图像滤镜的图片?
应用以下简单的代码示例:
OcrInput Input = new OcrInput(browsFile_txt.Text);
// Image filter being tested
Input.ToGrayScale();
foreach (var p in Input.Pages)
{
p.SaveAsImage($"{outputPath}\\{DateTime.Now.ToString("yyyyMMddhhmmss")}.png");
}
OcrInput Input = new OcrInput(browsFile_txt.Text);
// Image filter being tested
Input.ToGrayScale();
foreach (var p in Input.Pages)
{
p.SaveAsImage($"{outputPath}\\{DateTime.Now.ToString("yyyyMMddhhmmss")}.png");
}
Dim Input As New OcrInput(browsFile_txt.Text)
' Image filter being tested
Input.ToGrayScale()
For Each p In Input.Pages
p.SaveAsImage($"{outputPath}\{DateTime.Now.ToString("yyyyMMddhhmmss")}.png")
Next p
VB C#
有关 IronOCR 中可用的图像优化过滤器的完整列表,请参阅https://ironsoftware.com/csharp/ocr/examples/ocr-image-filters-for-net-tesseract/
MSDN 样式的类文档--...https://ironsoftware.com/csharp/ocr/object-reference/api/IronOcr.OcrInput.html#methods