Reputation: 115
I don't know if is it possible to read specific text from mobile camera with Javascript.
I'm trying to make an webapp which read a ISBN number from a book and then import it in a database. There are some websites which convert webapp into apk and I need it because I want to use the mobile camera to read ISBN and then my script goes find informations with Amazon Api etc.
But how can I read from camera mobile please, and is it possible? :p
Upvotes: 3
Views: 3618
Reputation: 18215
I don't know if is it possible to read specific text from mobile camera with Javascript.
The first challenge you will have is to read the image from the mobile device camera, you can do that by using with multiple approaches, one of them is a simple
<input type="file" accept="image/*;capture=camera">
Check this reference for more options
I'm trying to make an webapp which read a ISBN number from a book.
The second challenge will be to read the ISBN from that image. One possibility is that the ISBN is printed on books as a barcode. So you have to read that from the static image and for that you also have several approaches, one example is to use a JS bar code that works on browser, like quaggaJS
If you ISBN is a pure text, you can use an OCR to extract (like tesseract for example) the text and use some regex to match the ISBN from the text read from the image.
and then import it in a database
You will need a werbserver for that that receieves the ISBN value and store it on the database. There are several solutions as services, like Firebase Database for example, that will make your job much easier in the beginning.
here are some websites which convert webapp into apk and I need it because I want to use the mobile camera to read ISBN
Don't think you need that, everything I said so far is supposed to work on the browser just fine.
Upvotes: 4