Live data from Hacker News

Barcode Detection API

developer.mozilla.org

81–90 of 141 posts

Re: Barcode Detection API

#81
post #71

Bit off-topic: can anyone recommend resources (videos/papers/tutorials) that could help me learn how QR barcode detection and scanning itself is implemented? 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.

I guess it helps to understand how to generate a QR code: https://www.nayuki.io/page/qr-code-generator-library (see also the references at the end)

Good luck. ;-)

Re: Barcode Detection API

#82
I’d love to see this in safari on iOS as well. The native barcode detection capabilities in iOS are substantially better than libraries like zximg, and I like barcodes as an interface between the real world and tech. I also wish text recognition were in safari.

Re: Barcode Detection API

#83
post #22

Earlier quoted context omitted.

Honest question: for what reasons do you ever need to scan a random QR code? I think I've used them to sign in to some apps (eg, WhatsApp) while logged in on a PC, and other than that exactly 0 times. The Google camera app does support QR codes FWIW, but I don't know if any other vendors except Google use it.

In Argentina, QR codes is how you pay with your phone in super markets, pubs/bars, restaurants, everywhere - its their "apple pay", using Mercado Pago [0] app/service. Also, all the paper menus from restaurants are replaced with QR codes thanks to the pandemic. [0] https://www.mercadopago.com.ar/

The merchants and banks in Thailand do this as well

Re: Barcode Detection API

#84
post #54

Earlier quoted context omitted.

We also scan pdf417 from ID cards. In our case, it was much easier to just use hardware 2d scanners. We are a b2b SaaS and they are scanning IDs all day, so a hardware solution makes sense. 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 s…

What device are you using to scan? If you can use Android, Chrome supports pdf417.

I wonder how good the Chrome/Android PDF417 reader is? Is it just ZXing, or something else under the hood? For PDF417, ZXing is only OK. Unfortunately PDF417 is a pretty crappy format to decode with a sensor/camera compared to DataMatrix and QR which have much easier alignment targets and are designed for the sensor/frame based use case (instead of a 2D scanning laser). I wouldn't expect great performance out of BarcodeScanner / Android Chrome if it's just using Zebra Crossing under the hood.

Re: Barcode Detection API

#85
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?

[deleted]

Re: Barcode Detection API

#86
post #77
post #75

Earlier quoted context omitted.

Internal domains, where getting a certificate to client devices is painful

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

Looking at guides for LetsEncrypt on internal IPs/domains, it seems to be as painful as creating and managing your own CA: https://geontech.com/using-letsencrypt-ssl-internally/

Re: Barcode Detection API

#88
post #84

Earlier quoted context omitted.

What device are you using to scan? If you can use Android, Chrome supports pdf417.

I wonder how good the Chrome/Android PDF417 reader is? Is it just ZXing, or something else under the hood? For PDF417, ZXing is only OK. Unfortunately PDF417 is a pretty crappy format to decode with a sensor/camera compared to DataMatrix and QR which have much easier alignment targets and are designed for the sensor/frame based use case (instead of a 2D scanning laser). I wouldn't expect great performance out of Barc…

Chrome is likely using ML Kit on Android under the hood on Android. [1]

Well if you try the demo I just made [2] you can find out. Works pretty well in Chrome Version 99.0.4844.51 (Official Build) (arm64) and on my Pixel 2. Naturally won't work on my iPhone because #SafariIsTheNewIE

[1] https://developers.google.com/ml-kit/vision/barcode-scanning...

[2] https://files.littlebird.com.au/barcode20.html

Re: Barcode Detection API

#89
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?

For Digikey bags (we make eletronics) we use SwipeTrack app + JS.
Post reply on HN