Creating a QR Code step by step
nayuki.io
nayuki.io
Sadly, original online demo doesn't work anymore, but by looking for "halftone qr code" you'll find plenty of alternative implementations like this: http://jsfiddle.net/lachlan/r8qWV/
From this, I learned that making your URLs uppercase makes for a more compact code! The links at the bottom are great reads as well, especially:
https://research.swtch.com/qart
I hope that QR codes become more widely used, now that iOS and Android both include QR capabilities directly in the native camera apps.
[0]: https://baike.baidu.com/item/%E4%BA%8C%E7%BB%B4%E7%A0%81/238...
A simple URL I can read and remember for later, good luck memorising a QR code.
I’ve seen too many obvious examples of a marketing team getting carried away and abusing these things. The most absurd one was on a police notice on the London Underground advising people to take care to hide their valuables from thieves. How could you find out more? By taking your 800 dollar valuable out to scan the QR code...
Recently, he checked how many times they'd been scanned by a member of the public.
It was zero.
iOS has great integration built in now to the camera app which should help, but android is still spotty.
Google has their own solution but it is the stupidest, roundabout way of using it where the host app has to dynamically download the library that has the necessary barcode scanning.
Just looking at how many QR code reader apps are on the Play Store, and how many of them request a ton of unnecessary permission is downright scary. The same thing happened with flashlight app before the feature was introduced in stock Android.
In the commandline you can run "qrencode --type UTF8 -o - <text>" and get a pure text-only QR code.
* https://www.embeddedrelated.com/showarticle/1182.php#c-imple...
* https://www.reddit.com/r/programming/comments/9th8a7/creatin...
* https://www.backblaze.com/blog/reed-solomon/
* https://en.wikiversity.org/wiki/Reed%E2%80%93Solomon_codes_f...
The Snap code looks like a 18×18 grid of dots with the center punched out. This probably conveys about 200 bits of information. I suppose that could encode 30 ASCII characters which should be enough to describe a unique username. Or maybe it is a random binary number that is an opaque user ID in Snapchat's database. Either way, I'm guessing that the graphics and algorithm are a trade secret, so you can't get a definitive truth on how these barcodes are generated.
The Messenger code seems hard to analyze because of its different bar lengths and circular layout. The four bulls-eye patterns remind me of QR alignment patterns. I have no idea what the information-theoretic capacity is, but I'll guess it's in the order of magnitude of 500 bits. Again, I suspect the algorithm is not available to the public.
As for Spotify Codes, I discussed them in https://www.reddit.com/r/programming/comments/9th8a7/creatin... .
Now, how do I read a QR code?
From a Source image I imagine you would locate the finders, find the edges, unskew the source image, and use the finders to correct the rotational orientation, and then crop the image. Maybe binarize the new image to make the next step easier.
At that point, it's a matter of working out the size of each cell to generate a grid to drop on top of the image. Then you can sample each cell of the grid. If it's light, 1. If it's dark 0. Now you have the pixel map.
I am sure it's more complex, but I think a lot of this sounds like stuff you could do with openCV