CloudTwin  ROS2 Humble
Digital twin for path and trajectory optimisation
Public Member Functions | Private Member Functions | List of all members
App\Services\OcrService Class Reference

Public Member Functions

 extractText (UploadedFile $file)
 
 parseOrderData (string $text)
 

Private Member Functions

 extractFromImage (string $path)
 
 extractFromPdf (string $path)
 
 tesseractAvailable ()
 

Member Function Documentation

◆ extractFromImage()

App\Services\OcrService::extractFromImage ( string  $path)
private

Image OCR via Tesseract binary if available, otherwise returns empty string.

◆ extractFromPdf()

App\Services\OcrService::extractFromPdf ( string  $path)
private

◆ extractText()

App\Services\OcrService::extractText ( UploadedFile  $file)

Extract text from a PDF or image file.

◆ parseOrderData()

App\Services\OcrService::parseOrderData ( string  $text)

Try to parse an order reference and fields from raw OCR text.

Returns
array<string, string>

◆ tesseractAvailable()

App\Services\OcrService::tesseractAvailable ( )
private

The documentation for this class was generated from the following file: