Live data from Hacker News

Barcode Detection API

developer.mozilla.org

21–30 of 141 posts

Re: Barcode Detection API

#21
post #2

As the page does not discuss the motivation behind the API, does anyone know why this is ”native” API and not just a generic image processing script implemented with JavaScript / WebGL / etc.?

Barcode detectors can be pretty big dependencies. Given that this will often just be forwarding directly so some kind of OS capability it makes sense to ship in browser.

Re: Barcode Detection API

#22
post #2

As the page does not discuss the motivation behind the API, does anyone know why this is ”native” API and not just a generic image processing script implemented with JavaScript / WebGL / etc.?

At this point in time it's a pain point for me that Android devices don't usually have built-in QR reader software. I can tell iOS users to just "scan the code with the Camera" app but I have to tell Android users to find a QR scanner app on the app store. 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…

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.

Re: Barcode Detection API

#23
This stuff has been a nightmare for us for a long time. We have to scan pdf417 barcodes from physical identification as part of our offering.

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.

Re: Barcode Detection API

#24

Earlier quoted context omitted.

According to this documentation, yes, it returns the raw value encoded in the barcode. 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.

Arguably, as a Barcode Detection API that's all it should do.

I think I agree, I'm just being explicit.

Re: Barcode Detection API

#25
post #22

Earlier quoted context omitted.

At this point in time it's a pain point for me that Android devices don't usually have built-in QR reader software. I can tell iOS users to just "scan the code with the Camera" app but I have to tell Android users to find a QR scanner app on the app store. 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…

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 general, assuming you have an easy-to-use QR scanner, it's easier to scan a QR code than type in a URL on a phone, especially a complicated one. A couple examples I've run into recently:

- Lately it's been pretty common for restaurants to replace their physical menus with a QR code on the table that links to their online menu.

- When I've taken COVID tests recently, the site gives me a sticker with a QR code that links to my results page.

- I encoded my wifi network/password into a QR code and printed it out, so guests can just scan it to join, rather than have to scroll and find the right network and type in a password.

Re: Barcode Detection API

#26
post #2

As the page does not discuss the motivation behind the API, does anyone know why this is ”native” API and not just a generic image processing script implemented with JavaScript / WebGL / etc.?

Native code allows for performance gains that a script (even a performant one) may not be able to match. After all, this is fundamentally an image processing problem, one of the more computationally expensive things a browser has to do.

Isn't that the point of webassembly? Just seems like we are still moving in the wrong direction on trying to move the whole of NPM in to the browser web apis, rather than building a solid base you can build anything on.

Re: Barcode Detection API

#27
post #22

Earlier quoted context omitted.

At this point in time it's a pain point for me that Android devices don't usually have built-in QR reader software. I can tell iOS users to just "scan the code with the Camera" app but I have to tell Android users to find a QR scanner app on the app store. 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…

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.

[deleted]

Re: Barcode Detection API

#28
post #22

Earlier quoted context omitted.

At this point in time it's a pain point for me that Android devices don't usually have built-in QR reader software. I can tell iOS users to just "scan the code with the Camera" app but I have to tell Android users to find a QR scanner app on the app store. 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…

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.

I print ‘three-sided cards’ that have a photo or art reproduction on one side, some documentation on the back, and more information if you scan the QR code. One series of the cards are ‘music cards’ that will play a song, another application is ‘constellations’ that let me stick anywhere from 3 to 40 cards on the wall (so far) and you can see the back sides and other narration by scanning a code.

So my use cases are (1) I am demoing the cards for people, and (2) I give the cards away for free (If it wasn’t for the supply chain crisis I’d be creating a new card design every day) or put up an installation somewhere and people interact with them. Either way I want it to be very easy for people.

Re: Barcode Detection API

#29
post #25
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 general, assuming you have an easy-to-use QR scanner, it's easier to scan a QR code than type in a URL on a phone, especially a complicated one. A couple examples I've run into recently: - Lately it's been pretty common for restaurants to replace their physical menus with a QR code on the table that links to their online menu. - When I've taken COVID tests recently, the site gives me a sticker with a QR code that…

Displaying a QR code on a screen is a quick way to beam a URL to a phone or tablet either from a PC or another mobile.

You can put up a QR code to point people to the web app which controls the IoT functions in a space, music system, etc.

Re: Barcode Detection API

#30
post #22

Earlier quoted context omitted.

At this point in time it's a pain point for me that Android devices don't usually have built-in QR reader software. I can tell iOS users to just "scan the code with the Camera" app but I have to tell Android users to find a QR scanner app on the app store. 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…

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.

I literally just scanned a couple while at the doctors - one to check in, and another provided a url of a form to fill in.

They're also in some restaurants where you can get to a menu to order from your phone.

You also scan QR codes for use in two factor authentication apps.

Covid has normalised QR code scanning in Australia - we have to do it at certain venues in order to show our vaccine passes.

Post reply on HN