fix: static

This commit is contained in:
hashbro
2026-09-14 03:32:56 +08:00
parent c8d4eaa86e
commit d16c40cdb3
10 changed files with 134 additions and 33 deletions
+5 -3
View File
@@ -14,13 +14,15 @@ class TesseractOcrDriver implements OcrDriver
}
$bin = (string) config('coruna.ocr.tesseract', 'tesseract');
$langs = (string) config('coruna.ocr.langs', 'eng+chi_sim');
$oem = max(0, (int) config('coruna.ocr.oem', 1));
$psm = max(0, (int) config('coruna.ocr.psm', 6));
$result = Process::timeout(90)->run([
$bin,
$imagePath,
'stdout',
'-l', $langs,
'--psm', '6',
'-l', 'eng',
'--oem', (string) $oem,
'--psm', (string) $psm,
]);
if (! $result->successful()) {