serratus / quaggaJS

An advanced barcode-scanner written in JavaScript
https://serratus.github.io/quaggaJS/
MIT License
5.07k stars 979 forks source link

anyone get this working on a desktop? #277

Open ericblade opened 6 years ago

ericblade commented 6 years ago

All of the samples fail for me on desktop, unable to actually recognize a barcode, with three different cameras. The samples that have green lines indicating where it's processing at, all show the green lines somewhere well outside of the canvas area, too.

I'm able to use them fine on a mobile phone, as well as my own code, on mobile . . but nothing is ever picked up well on desktop.

ericblade commented 6 years ago

Well, I figured out why the samples are screwing up the drawing position -- the CSS floats the elements next to each other, rather than placing them on top of each other, like it looks like it's intended to. I don't have the slightest idea if my PC camera not recording any bar code hits is due to camera or lighting quality, or if there's just issues with this library working on desktop PCs. It does seem to work surprisingly well on mobile (Android) though.

morngrar commented 6 years ago

I've had some success setting camera px to 800, large patch and decreasing the amount of light behind me (have a window at the back of the room) also 2 workers.

morngrar commented 6 years ago

Using firefox on linux, and the PCs integrated webcam

ericblade commented 6 years ago

when i bumped from the default 640x480 to 1280x720 things started working a little bit. i'm occasionally able to get a positive hit with some of my cameras. I'm guessing that there's some problems when using unexpected aspect ratios on a camera -- my cameras are native 1280x720, if i take a picture with them at 640x480, then feed it to Quagga, it works, when I try to get Quagga to do it live at 640x480 it doesn't. Though even at 1280x720, i'm not really able to get much of anything other than incorrect values out of them. I guess I need higher quality cameras and/or higher quality lighting.

switching to 1280x720 didn't seem to have any affect on mobile quality or speed.