16 lines
324 B
PHP
16 lines
324 B
PHP
<?php
|
|
|
|
namespace App\Services\FileTools\OCR;
|
|
use thiagoalessio\TesseractOCR\TesseractOCR;
|
|
|
|
class TesseractImageOCR implements IImageOCR
|
|
{
|
|
/**
|
|
* @inheritDoc
|
|
*/
|
|
public function performOCR(string $filePath): string {
|
|
$tesseract = new TesseractOCR($filePath);
|
|
return $tesseract->run();
|
|
}
|
|
}
|