修正圖片方向
旋轉
將圖像順時針旋轉若干度。要逆時針旋轉,請使用負數。
矯正
旋轉圖像,使其正確向上並保持正交。 這對於光學字符識別非常有用,因為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
將圖像順時針旋轉若干度。要逆時針旋轉,請使用負數。
旋轉圖像,使其正確向上並保持正交。 這對於光學字符識別非常有用,因為Tesseract對斜掃描的容忍度可以低至5度。
按比例縮放OcrInput頁面。