Live data from Hacker News

Barcode Detection API

developer.mozilla.org

101–110 of 141 posts

Re: Barcode Detection API

#101
post #34

Earlier quoted context omitted.

I also built a web app for barcode scanning. For testing quaggaJS is fine but it’s highly inconsistent and requires an extreme degree of customization to get adequate results. I recommend scandit. It’s a good production ready library with a very nice web sdk.

Not OP, but I looked into scandit. While excellent, it's quite expensive right?

Same here. Scandit was the best thing we tested but they quoted us $50k/yr. We don’t have many users that actually need that feature so the next best option was compiling zxing to wasm. That performed a little better than using the js version.

Re: Barcode Detection API

#102
post #40

>Secure context: This feature is available only in secure contexts (HTTPS), in some or all supporting browsers. 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?

I'm not a fan of the whole secure context separation thing. A lot of cool P2P stuff is impossible because a service worker can't access an HTTP server, which would be very useful for web sites to talk to IoT devices.

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.

Re: Barcode Detection API

#103
post #77

Earlier quoted context omitted.

You can use a public CA like LetsEncrypt then. Exposes you to the certificate log but you should be secured already anyways. Just have to use the DNS challenge (unless you wanna poke a hole for certbot) to grab it

And people wonder why ioshit devices are all so cloud dependent. I just want my microwave to talk to my refrigerator (or whatever). But they have to use https, because. And the cert has to expire every 90 days, because. So now I provision a kitchen full of stuff with AWS creds so they can respond to DNS challenges to get those certs. So much simpler for everything to revert to client only mode and route all messages…

This is why I hate privacy first thinking. The IoT is a big deal. I own basically nothing that has electricity that wouldn't be slightly to majorly improved, at low cost, by IoT.

So... lets... make the tech that powers it not suck, so we can stop with all this analog business.

Re: Barcode Detection API

#104

Earlier quoted context omitted.

Users should not have to rely on the network being isolated for security. Even when I have an offline network, I still use SSH whenever possible. Yes, I don't benefit from initial verification, but I pin the certificate from then on. I don't think that the current "all or nothing" paradigm that we use with SSL in browsers makes any sense. I have been really disappointed over the last few years deploying network conne…

Let’s say I sell a physical device that allows you to use a browser as its UI. You just plug an Ethernet cable and point your browser to its web server. Security is done by physical access. Anything else is just extra complexity and points of failure, and if an attacker can get physical access to the LAN cable, he can just as well walk to the machine directly and change the settings on the control panel. HTTPS, with…

No post body was provided.

Re: Barcode Detection API

#105
post #36

There is a full copy of the zxing library in JS. It's been working great for my purposes - scanning QR and C128 Barcodes. E: https://github.com/zxing-js/library

Used this in a b2b saas for a few years. Worked well and helped remove complexity in a previous way we did it that relied on a native app called pic2shop. We lost a bit of functionality specifically a clear target zone, green scanning line and better low light support. It made up for it in ease of support and reduction in perceived jank.

Re: Barcode Detection API

#106
There's a couple good datasets with trained models on Roboflow Universe that would pair nicely for a Computer Vision project/app:

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

Re: Barcode Detection API

#107
post #12

I'm still looking for an open source python library that can decode Data-Matrix barcodes as seen on Digikey bags. Should I give up and switch to JavaScript+browser?

Is pylibdmtx not up to it?

It's not great but libdtmx is the best open source datamatrix decoding as far as I know.

Re: Barcode Detection API

#108
post #52
post #12

I'm still looking for an open source python library that can decode Data-Matrix barcodes as seen on Digikey bags. Should I give up and switch to JavaScript+browser?

zxing-cpp has a Python wrapper that should work for that.

zxing does not have a usable datamatrix decoder last I checked. it's there but it's no good.

Re: Barcode Detection API

#109

Earlier quoted context omitted.

We ended up going with the purpose-built barcode sleds from Infinite Peripherals. The Linea Pro, I think. Extra battery, onboard illumination/laser guide, _really_ fast barcode engine in any orientation, and a few pretty simple SDK options. We ended up using "our custom webkit browser will fire a custom JS event on scan", which worked perfectly for our purposes. Everything else is measurably slower: waiting for focus…

We use the Linea Pro too w/ the SwipeTrack browser making them available in our web app. We've previously used both the Infinite Peripherals SDK w/ an iOS app, but SwipeTrack have a pretty good JS API [1]. 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…

Wow, I don't like the sound of that at all. The version we're using is an older.... 5? 6? So it would predate those issues but that's literally.... half the point of the thing! Lightning fast barcode engine + range + extended battery + pistol grip!

Re: Barcode Detection API

#110
post #52

Earlier quoted context omitted.

zxing-cpp has a Python wrapper that should work for that.

zxing does not have a usable datamatrix decoder last I checked. it's there but it's no good.

I just tried the example zxing-cpp Python module wrapper script and it worked with datamatrix.png from the pylibdmtx test suite. Hmm, but read_datamatrix from pylibdmtx detects two values while zxing-cpp detects one.
Post reply on HN