Dithered QR Codes

www.andrewt.net
jmusall
yesterday
359points
41 comments

Comments

0sp10 hours ago
Russ Cox’s QArt Codes[0] modifies how the URL is encoded to embed an image while keeping the QR code fully valid, without relying on error correction.

[0] https://research.swtch.com/qart

Related QArt discussions on HN: [1] https://news.ycombinator.com/item?id=15213044 (2017-09-10, 61 points, 6 comments) [2] https://news.ycombinator.com/item?id=3836935 (2012-04-13, 56 points, 9 comments) [3] https://news.ycombinator.com/item?id=8549772 (2014-11-03, 56 points, 4 comments)

unkl_19 hours ago
You can use colour as well: https://janglingpointer.github.io/Image_To_QR/

The guy that made that did a writeup on reddit: https://www.reddit.com/r/PixelArt/comments/1v52x96/

gblargg17 hours ago
This reminds me of car safety features, how drivers have become more complacent to offset the benefits. QR codes were made to be robust in the face of errors, but over time this has been eaten into for aesthetic purposes. Businesses commonly put a logo in the center, eating up some error correction budget. This likely has a similar effect.
jerf12 hours ago
A few weeks ago I saw the first QR code I've personally witnessed that I'm pretty sure is completely unscannable. The company logo stretched well out of the center block. It was on the back of a semi in the Chicago area. I didn't get the greatest shot of it on my phone (as a passenger), because it was driving away as I tried, so it wasn't quite proof it couldn't scan, but I'm pretty sure it ate more than 100% of the error correction margin.

Based on the trends, I expect it is only the first of several I will see.

theandrewbailey11 hours ago
Doesn't everyone QA their QR codes? I thought it would be as obvious as making sure you got the right address and/or phone number on an ad before distributing it.
masfuerte11 hours ago
You'd think. My local authority is reorganising refuse collection and did a mailshot to let everyone know the new collection rota. Then they did another because the dates on the first one were wrong. The incompetence is staggering.
arjie12 hours ago
I’ve run into a few of these. And yesterday some kind of payment scanning QR code at SF’s Filipino Pistahan festival didn’t scan and I had to type in the text below. Annoying.
nomel8 hours ago
I always find it funny when companies don't put any attempt to shorten the URL, filling it with plaintext url parameters, resulting in huge QR codes that can barely be scanned due to the density.
zellyn10 hours ago
I always think of Russ Cox’s blog posts as canonical here: https://research.swtch.com/qart
OscarCunninghamyesterday
petters16 hours ago
These are also very cool: https://antfu.me/posts/ai-qrcode

Diffusion image generation constrained to also be a valid QR code

zahrevskyyesterday
You can also run animations in QR codes: https://cgv.cs.nthu.edu.tw/Projects/Recreational_Graphics/Ha...

So, technically, you can run Doom inside a QR code?

spharsyesterday
I'm now waiting for someone to post the Bad Apple meme but all in QR codes
vpzom9 hours ago
it's been done a couple of times :)

Here's my version that still keeps the full squares: https://youtube.com/watch?v=qQkWjzqMbuA

mentatyesterday
This made me wonder if you could do it with color and apparently you can: https://1mentat.github.io/qr-code-shenanigans/
NooneAtAll313 hours ago
I'm not impressed.

the whole technique hinges on qr scanners reading only middle point of the squares

The moment you encounter developer that thought "for redundancy let's sample the whole square" (which is a very natural thought) - it breaks

I kinda expected working the limits of error correction, honestly. Not this blunt circumvention "because it works on my machine"

jmusall5 hours ago
I think sampling "the whole square" might actually not be that good for decoding even standard QR codes as aliasing at the edges of each code module ("pixel" of the code) in a camera image would actually make the distincion between 1s and 0s more difficult.

Your argument still partially applies though, as introducing new unrelated colors at the module edges could also lead to aliasing effects when the code is too small for example.

Jaxan9 hours ago
The specification of qr codes says you should look only at the centres, iirc.
hellojomp14 hours ago
This is really neat!

A question I had about QR codes:

Let’s say I want to produce a QR code that is as close as possible to an image (let’s say the Nike swoosh logo), if I just added that to the center and added the 3 orientation markers on the corners it wouldn’t be a proper QR code yet, my question is what is the minimal amount of edits I would need to do from that symbol to get a valid QR code?

I’m thinking of something like people buying and hoarding domains in early 00’s (even now), if I could generate the minimal QR code (minimal is important here in the same way that .com is treated as superior to .ca or .net) of well-known symbols and buy the resulting domain it points to (if it even points to a domain) couldn’t I sell this to companies with the associated domain as a re-direct as well?

jmusall5 hours ago
From another comment:

https://research.swtch.com/qart

Looks like this is definitely possible, the results aren't as clean as you might hope though. Maybe they could be improved by introducing some intentional errors (which were explicitly avoided here).

OscarCunningham13 hours ago
You could maybe determine this using a SAT solver. You would have to encode the entire QR code specification. I was thinking of doing this to find a minimalist QR code that just had as few black cells as possible.