woulduracler woulduracler - 6 months ago 39
jQuery Question

Detect text from image via Webcam

I have a warehouse and for inventory purposes I need to scan new items. Some of them do not have any barcodes, so I thought of scanning their labels with a webcam and compare the name with the name from the database.

Therefor I would need some kind of combination of Javascript/JQuery and PHP.
I thought of capturing the image via Javascript and then post it to PHP. In PHP I thought of using an OCR Software like Tesseract OCR to detect the items name on the label. If I get so far the rest will be a piece of cake.

Is my plan possible ?
If so does anybody already have some experience with that or could recommend some software I could use.

Answer

I have solved my problem now and want to provide my solution in case someone is looking for something similar.

I created a <video> on my webpage displaying my webcam with HTML and Javascript using the .getUserMedia() function. I then created a pseudo canvas and got the data URI out of it.

The picture was posted in base64 to Google Cloud Vision API's OCR (text detection). This returned the results of the scanned image very accurate.