fix: static
This commit is contained in:
@@ -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()) {
|
||||
|
||||
Reference in New Issue
Block a user