OCR part of an image

Is there a way to allow the user to specify an image, preview it so they can select a portion of the image and then OCR that selected portion to extract a number?

Yes, that is possible.

Image upload with selection is possible via JavaScript. Recent browser APIs allow you to both render not-yet uploaded image and upload it afterwards passing coordinates along it.

OCR could then be done on the server using https://github.com/thiagoalessio/tesseract-ocr-for-php or another solution (many are available via composer).

1 Like