IronOCR 的 OcrInput 包含內建方法用於調整圖片方向以獲得最佳的 OCR 準確度:
Rotate(double degrees): 依給定的度數順時針旋轉圖片; 逆時針旋轉使用負值。Deskew(int maxDeskewAngle = 45): 修正傾斜至最大角度(默認為 45°); 如果應用了修正,則返回trueScale(int percent, bool scaleCrop = true): 按比例調整影像大小(例如 150 表示 150%)
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 UsingImports 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 UsingIronOCR 的 OcrInput 包含內建方法用於調整圖片方向以獲得最佳的 OCR 準確度:
Rotate(double degrees): 依給定的度數順時針旋轉圖片; 逆時針旋轉使用負值。Deskew(int maxDeskewAngle = 45): 修正傾斜至最大角度(默認為 45°); 如果應用了修正,則返回 trueScale(int percent, bool scaleCrop = true): 按比例調整影像大小(例如 150 表示 150%)NuGet 下載次數 6,411,693|版本:2026.11剛剛發布
Tesseract OCR在您需要的語言,我們支援超過125種。