如何在 C# 中纠正 OCR 图像方向 | IronOCR

How to Fix Image Orientation for Reading

This article was translated from English: Does it need improvement?
Translated
View the article in English

在图像处理中,修正图像方向涉及对图像进行调整,以确保图像在特定用途(如文本识别)中正确对齐。 IronOcr 支持固定图像方向,包括旋转、纠偏和缩放。

这些技术对于准备图像以进行准确的文本识别至关重要,因为它们可以确保文本的正确方向、对齐和大小,以便提取。

as-heading:2(快速入门:一行旋转-纠偏-缩放)</em

使用 IronOCR 的 OcrInput 这个简单的链,只需一次调用即可旋转、纠偏和缩放您的图像--无需模板即可快速上手,让您的图像在几秒钟内为准确的 OCR 做好准备。

Nuget IconGet started making PDFs with NuGet now:

  1. Install IronOCR with NuGet Package Manager

    PM > Install-Package IronOcr

  2. Copy and run this code snippet.

    var result = new IronOcr.OcrInput().LoadImage("skewed.png").Rotate(90).Deskew(45).Scale(150).Let(input => new IronOcr.IronTesseract().Read(input));
  3. Deploy to test on your live environment

    Start using IronOCR in your project today with a free trial
    arrow pointer
纠偏图像示例
示例图片
deskewed image