修正图像方向
`旋转
顺时针旋转图像若干度。对于逆时针旋转,请使用负数。
Deskew
旋转图像,使其方向正确且正交。这对 OCR 非常有用,因为 Tesseract 对倾斜扫描的容忍度可低至 5 度。
`尺度
按比例缩放 OcrInput
页面。
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 Private ocrTesseract = New IronTesseract() Private 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)
Install-Package IronOcr
顺时针旋转图像若干度。对于逆时针旋转,请使用负数。
Deskew
旋转图像,使其方向正确且正交。这对 OCR 非常有用,因为 Tesseract 对倾斜扫描的容忍度可低至 5 度。
按比例缩放 OcrInput
页面。