Recently, we stumbled upon some cheap USB keyboard emulator 2d scanners that can pick these up very reliably. For our product/customers, this is a viable path. We have tested probably 30 different webcams by this point. The only 2 that are as reliable as the handheld CCD scanner are the iPad and my Canon DSLR tethered to my PC in automatic mode with a macro lens.
Resolution is a factor, but so is frame rate and environment. You have to consider the full UX stack. Someone is required to physically position the barcode in a particular way with certain lighting constraints, etc. With a handheld CCD scanner, you get a laser guide for precisely what distance to go for, and an ergonomic experience that is much more conducive to successful scans. Most offer on board illumination, so even in a pitch black room you will get a successful scan.
Everything else is measurably slower: waiting for focus in a dim room, low framerate, weird other issues.
Funnily enough, the Linea Pros have been going down hill. They swapped out the barcode engine and it is not fast / crisp. Sometimes faster to just use the iOS Camera (w/ Swipetrack) instead of the Linear Pro's sled.
[1] https://files.littlebird.com.au/SwipeTrackBrowserAPI_200-Yre...
The weird thing about pdf417 is that there is a lot of helpful info our there, up until a point. It's like everyone is collaborative and asking/answering questions up until the point they really figure it out, but those last few steps never much make it into open code.
A couple times a year I go searching to see if anyone has implemented solid pdf417 in WASM yet. It seems like a natural fit to me, and I am sure people have done it, but I have yet to see anything publicly available.
I also found that I could scan barcodes off of a screen with a laser scanner if I put a translucent white plastic bag over the screen. Maybe someone with more knowledge about optics could give some insight into why that trick works. My understanding is that laser scanners should only be able to scan by reflection, and shouldn't work off of a screen at all.
Reading a linear barcode is quite easy, the shitty webcam of my 2010 macbook pro was enough for Delicious Library to pick most every article instantly, usually faster than I could even present the article.
What's the point of this? I understand why you might want this for APIs that expose private user information, but this just performs some computation. You could do the same thing with a js library or webassembly. Is this just to punish http sites?
Forcing https in these applications is a waste of time and money for orthogonal purposes. I guess it could be seen as a cost of dev. for any web based application from now on, but it's sad to me to see the barrier to entry get higher for these reasons.
If there was something sensitive in front of my camera, I wouldn't give any random site permission anyway.
File system access should definitely be secure only, the rest might not need it.
Of course if Mozilla actually did FlyWeb we could almost totally deprecate HTTP except for some public legacy sites.
ZXing is pretty much abandoned now. It was anyway “kind of” from Google.
Would be nice to see if this new spec gets full adoption so we can avoid high licensing fees.
Consider the following facts:
1. This was designed by Google
2. Google Play Services provides an API for detecting barcodes, faces and text https://developers.google.com/android/reference/com/google/a...
3. Chrome gets a shape detection API for detecting barcodes, faces and text https://web.dev/shape-detection/
Of course, it's a matter of perspective whether you want to see this as lovers of the free web helping webapps to feature parity with native apps; or Google churning out yet another low-effort standard that's easy for them and difficult for all their competitors.
My experience with an actual bottom-of-the-line prepaid phone was that the first QR scanner app I downloaded from Google Play worked right the first time but I had to try six different apps before I found one that worked with my Samsung Tablet.
A web-based scanner would be a possible answer, though really Google and the phone makers and the carriers should have prioritized a "just works" solution years ago.
It's hidden, but I believe it's built in the default camera app now.
I've learned that my last 3 phones have had it built in.
My current phone (Nokia 3.4) doesn't have it, but previous one (Motorala One) did. Ironic, since I chose them for being about as close to stock as you can get, both in the 'Android One' programme (so also comparatively LTS).
The Google camera app does support QR codes FWIW, but I don't know if any other vendors except Google use it.
[0] or things like Google Play Services.
Object Detection for QR Code and Bar-Codes - https://universe.roboflow.com/new-workspace-mrc2b/optiscan-l...
another one for just QR Codes - https://universe.roboflow.com/lihang-xu/qr-code-oerhe
I've been thinking that building a basic scanner from scratch (i.e. only using vanilla cpp/python/whatever + image processing libraries, but nothing barcode-specific) could teach me a lot.
Good luck. ;-)
https://gist.github.com/derac/9dfa8884bb04df59ac498d3bac4a93...
https://htmlpreview.github.io/?https://gist.githubuserconten...
The android version seems to use a library that's part of Google Play Services:
/**
* Implementation of mojo BarcodeDetection, using Google Play Services vision package.
*/
and // The vision library will be downloaded the first time the API is used
// on the device; this happens "fast", but it might have not completed,
// bail in this case. Also, the API was disabled between and v.9.0 and
// v.9.2, see https://developers.google.com/android/guides/releases.
From: https://github.com/chromium/chromium/blob/c4d3c31083a2e14812...The desktop version references a third party library called "barhopper" here:
https://github.com/chromium/chromium/blob/e1e495b29e1178a451...
and barhopper seems to come from a non-public Google repo:
'src/third_party/barhopper': {
'url': 'https://chrome-internal.googlesource.com/chrome/deps/barhopper.git' + '@' + 'ad3c4382875afdd0340f1549f8b9c93cbbc16e37',
'condition': 'checkout_src_internal and checkout_chromeos',
},
from https://source.chromium.org/chromium/chromium/src/+/master:D...I didn't realize that Chromium had missing APIs compared to Chrome but maybe that's always been the case? This appears not to be a W3C standard:
https://wicg.github.io/shape-detection-api/
I was interested in this because there are no really good open source DataMatrix decoders (to my knowledge) with the one in ZXing being basically unusable (last I checked) and libdtmx being ok but not comparable to commercial offerings.
This feature uses native libraries and only works on Chrome OS, Android, and MacOS currently according to this page:
I didn't made any changes since then. But it can be easily ported into a more modern framework (React.js etc)
Unfortunately, the csr was just keying them in and keyed mine in wrong so I was without internet for a few days.
Something to automatically pick it out would be a lot better.
Edit: guess it depends on the browser and OS.
I don't see anything this has to do with browsers. This could be implemented perfectly well in a library.
What it does not appear to do is further decode the raw value into logical data. E.g. data matrices commonly contain GS1 element strings that are not trivial to decode. There are libraries for that, though.
That's mainly because of the expansiveness of MDN docs, but somewhat due to the funding distribution of Mozilla going to officers, not Firefox devs.