-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Live scan feature #37
Comments
Actually a problem for this is how to efficiently get the image data from a video element without saving it in a canvas first. @edi9999, do you have any suggestions/ideas? |
Okay, I found some ways, but actually decoding does not work at all on mobile devices (tested with Firefox for Android). It always fails with: The code I used is here: https://gist.github.com/rugk/44e9cd89f3b67adfcb229843fffed02 And even when using your test file on the desktop with some photos of a QR code and some surrounding elements, only 2 of 4 images were recognized in my case. (If you want the test pics, I can mail them to you) |
The URL file gist is a 404. Yes, I'd be interested in the images, but if possible, it would be good to add them in the testsuite. Do you have confidential data on those images ? |
No, but it's easy to create new images. (I only wanted to share them, so you can reproduce the issues…) The real link is https://gist.github.com/rugk/44e9cd89f3b67adfcb229843fffed02f. |
Here's what I'm using to live-scan (extracted and approximately rewritten from my vue files, it's now pseudo-code for some parts and I messed up indentation when pasting), I'm mid-development and will refactor & temper everything, so it's a mess right now. Edit : see comment below |
Is there a proof of concept one can use to test it? |
I'll make a github page with a runnable version this afternoon. |
@rugk here's a demo : https://lucassifoni.github.io/qr-code-live-scan/ npm run watch And serve it accordingly, with php -S localhost:8080 or caddy or whatever suits your use. Without mentioning that the code is currently a mess and needs to be refactored, and that my package.json includes way too much things. Regardless, the demo works, and is configured to run at 45 FPS and ask for a scan (if the worker isn't busy) every 17 frames. With this setup, my testing Motorola G (1gb ram, quite weak computing power) manages to keep everything fluid. Feel free to ask anything, I'll have to elaborate on this and cover more use-cases for a current project, this is our first draft. |
Salut Lucas, ta démo avec support WebRTC fonctionne très bien. J'ai besoin de ce système pour un projet mais je n'y arrive pas avec le projet de LazarSoft, c'est très instable. Alors que ta démo me détecte facilement et rapidement les QRCodes ! Merci beaucoup, je vais récupérer tes sources, on verras si j'arrive à le faire fonctionner :) |
Le repo est très sale parce que je n'arrivais pas à configurer webpack pour compiler mon worker séparément avec la base fournie par vue-cli, d'où les dépendances demandées par vue-cli ET laravel-mix (qui n'est qu'un wrapper autour de webpack). J'ai l'impression que réécrire la lib en s'inspirant de ça cozmo/jsQR#25 pourrait être bon pour les perfs, cependant. // The repository is really messy because I couldn't configure webpack to separately compile my worker with the vue-cli generated configuration, so that's why both vue-cli/webpack & laravel-mix dependencies are required. Anyway, laravel-mix is only a webpack wrapper. I feel like rewriting the library following this trail cozmo/jsQR#25 could improve performance. We'll maybe put the time for it. |
It would be nice if this lib could have a live scan/live stream feature - just like this lib for barcodes -, so you can easily use it to read QR codes in real time.
Also related to/required for #29
The text was updated successfully, but these errors were encountered: