5 ms·
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
by miohtama 5y ago
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.?
- bena 5y agoBecause while barcode scanning is a subset of image processing, it's a use case that's pretty common.
- rahimnathwani 5y agoTo allow the implementation to take advantage of libraries provided by the operating system[0] (where available), without the web site developer needing to even know that it's happening. [0] or things like Google Play Services.
- PaulHoule 5y agoAt 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 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.
- SkyPuncher 5y ago> At this point in time it's a pain point for me that Android devices don't usually have built-in QR reader software 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.
- Bilal_io 5y agoI've been scanning QR codes with my Android phone for a long time. I know at least two native cameras work, Pixel's and Samsung's since 2019. But I am sure legacy phones with older android versions don't support it natively.
- calmoo 5y agoMy Huawei P20 doesn't have QR scanning native to the camera app.
- Lev1a 5y ago> I know at least two native cameras work, Pixel's and Samsung's since 2019 My Motorola One can do that as well and IIRC the "moto g4" I had before that too.
- WesternWind 5y agoI've had intermittent issues with my motorola's camera app. Sometimes it picks up qr codes at restaurants, sometimes it refuses, maybe because of lighting issues, though turning on the flash doesn't help. I ended up downloading BinaryEye from F-Droid and I just default to that now.
- fy20 5y agoI have a flagship Xiaomi phone and the built in QR code scanner is garbage. I went to a restaurant with friends which only had a QR code for the menu (which turned out just to be a link to the root of their website - why not write the URL too?). In the end I had to take a picture of the QR code, then crop it, then open that in the scanner app.
- eertami 5y agoHonest 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.
- simonbw 5y agoIn 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.
- PaulHoule 5y agoDisplaying 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.
- deleted 5y ago[deleted]
- PaulHoule 5y agoI 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.
- RenThraysk 5y agoIt's built into Google Lens. Use it occasionally to send files over wifi to phone, with webwormhole.
- easrng 5y agoMy Motorola phone from 2017 has QR support in the Camera app.
- OJFord 5y agoAs always, some fragment of Android actually got there before Apple (to put it in the Camera app), but no, it's not standard. 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).
- idealmedtech 5y agoNative 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.
- Gigachad 5y agoIsn'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.
- michaelt 5y agoHigh performance barcode decoding (e.g. scandit) uses the GPU. After all, a modern cell phone could be producing 4k 30fps video, and high performance barcode decoders will detect linear barcodes with lines a single pixel wide, even in the presence of moderate noise/blur/overexposure (e.g. the barcode on a shiny can of coke) Of course, I've got no idea if browsers will provide high performance barcode reading, or something simpler like zxing. And I've got to say, it's not obvious to me why browsers would implement a barcode scanning API in preference to a more general accelerated image processing API. Plenty of other applications want to do real time video processing in the browser - such as video call background removal.
- nwsm 5y agoDo you have any examples of what a more general image processing API would feature? Everything between reading pixels and reading barcodes is a mystery to me.
- idealmedtech 5y agoI'm not a browser developer, but to wager a guess, it probably has something to do with the inertia of existing solutions being native, rather than in WebAssembly, which is still quite new as standards go.
- agucova 5y agoIt's a heavily standardized, very recurrent problem that can take a lot of advantage of native code and platform-specific optimization, so it's really an ideal target for a Web API.
- afavour 5y agoBarcode 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.
- michaelt 5y ago> does anyone know why this is ”native” API and not just a generic image processing script 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/android/gms/vision/barcode/package-summary 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/ 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.