IRONSOFTWAREHOME
修正图像方向
using IronOcr;
using System;

var ocrTesseract = new IronTesseract();
using var ocrInput = new OcrInput();
ocrInput.LoadImage("/path/file.png");

ocrInput.Rotate(90);
ocrInput.Deskew();
ocrInput.Scale(150);

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

Dim ocrTesseract = New IronTesseract()
Using ocrInput = New OcrInput()
    ocrInput.LoadImage("/path/file.png")

    ocrInput.Rotate(90)
    ocrInput.Deskew()
    ocrInput.Scale(150)

    Dim ocrResult = ocrTesseract.Read(ocrInput)
    Console.WriteLine(ocrResult.Text)
End Using
NuGet Download
PM > Install-Package IronOcr
修正图像方向

修正图像方向

IronOCR的OcrInput包含内置的方法以调整图像方向以获得最佳OCR准确性:

  • Rotate(double degrees):以给定角度顺时针旋转图像; use negative values for counter-clockwise rotations
  • Deskew(int maxDeskewAngle = 45):最多矫正到最大角度(默认为45°); 如果校正已应用则返回true
  • Scale(int percent, bool scaleCrop = true):按比例调整图像尺寸(例如150为150%)
探索 C# 中的图像方向校正技术
在 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 天试用密钥
无需信用卡或创建账户