Yeah the QR standard is astoundingly resilient to noise. iirc the highest redundancy can still be read with 60% of the glyph obscured, it’s really a fascinating protocol.
Comment on What time is it?
ChaoticNeutralCzech@feddit.org 5 months ago
Yes it’s already scannable…
Why wouldn’t it be? I’ve drawn 2 QR codes on graph paper already and of course they work.
Warl0k3@lemmy.world 5 months ago
ChaoticNeutralCzech@feddit.org 5 months ago
Nah, it’s 30%, and very much depends on how the damage is laid out.
- The corner squares (finder patterns) must keep a ⬜⬛⬜⬛⬛⬛⬜⬛⬜ cross-section at most angles. Most readers will accept even round ones. This applies to the smaller squares (alignment patterns) on larger QR codes too.
- The zebra strips ⬛⬜⬛⬜⬛ (“timing patterns” if you’re a nerd) connecting the finder patterns must remain intact. Very few readers can correct for errors in that.
- At this point, a good reader will be able to detect the QR code’s position in the image and its resolution (“version” if you consume ISO propaganda), and thus calculate the location of every pixel (“element”, ditto). Each of those will usually be sampled at a radius of around ⅓ of the distance between them. This allows for slightly wavy codes but also codes with rounded pixels or even unrelated content in the edges. (For the record, this is lazy and I prefer this version of the concept that uses almost up-to-spec QR codes.) Google Lens is more sophisticated than just using a 3D perspective transform, as I already mentioned.
- One line of pixels around finder patterns is necessary for decoding (mask and ECC level info) and has basically no error correction so it should be also clear except the ⅓²=⅑ trick described above.
- The data is stored with robust Reed-Solomon correction, which is byte-wise. You can safely cover about half of the advertised recoverable area with contiguous damage anywhere except the sections mentioned above. Still, you can damage more area by taking several things into account:
- Know how the data is laid out in the specific QR resolution, and keep in mind that Reed-Solomon is bytewise. Thus, you want to damage as few bytes as possible, and for most total area, the strategy is to ruin all 8 bits in each. Without deeper analysis (looking up the byte layout), a good rule of thumb is that vertical damage aligned to an even number of columns from the right (skipping Column 7 with the vertical zebra stripe and thus no data) is likely to ruin the least amount of bytes partially.
- Looking up the byte layout will also reveal that there are probably 1-7 unused pixels in the leftmost two columns, probably arranged like ⡿ in the very top of the data portion (Row 10 and below). These can be damaged without consequence!
- Damage whose very dark spots line up with original black pixels (and vice versa) does not really count. Keep in mind that while using this strict definition of damage results in way fewer damaged bits, those are most likely not contiguous, so only a few 8-bit bytes will remain intact through this.
- Know how the data is laid out in the specific QR resolution, and keep in mind that Reed-Solomon is bytewise. Thus, you want to damage as few bytes as possible, and for most total area, the strategy is to ruin all 8 bits in each. Without deeper analysis (looking up the byte layout), a good rule of thumb is that vertical damage aligned to an even number of columns from the right (skipping Column 7 with the vertical zebra stripe and thus no data) is likely to ruin the least amount of bytes partially.
Warl0k3@lemmy.world 5 months ago
This is fascinating, thank you so much! I knew about image emebdding in the pixels themselves, it was slightly trendy back in the day, but I had no idea people had progressed it to animation like in the second video.
FishFace@lemmy.world 5 months ago
With hand drawn codes it’s also that the scanners are very good. It’s no good having high redundancy if the scanner can’t transform the 3D code to a square and find the timing bits etc
over_clox@lemmy.world 5 months ago
I’m trying to confirm this shit even works before I get it tattooed on my wrist at a 1mm per square scale…
JackbyDev@programming.dev 5 months ago
Hey OP, I’ve seen a lot of tattoo artists recommend not getting QR codes tattooed because they fade and smear over time. Also, I don’t wanna sound overly dramatic, but with the current political landscape being to aggressively cut government programs, I wouldn’t trust a domain name being around forever. It may still be better for the code to be one you control (they’re like $12 a year) and set it to redirect there instead.
over_clox@lemmy.world 5 months ago
Thank you kindly for the advice 👍
After reading all the comments here, I think I’ll shift my plans towards having it printed out on temporary tattoo paper instead. Like hell, can’t really go wrong there I don’t think, plus it’s gotta be a lot cheaper, I’d think anyways…
ChaoticNeutralCzech@feddit.org 5 months ago
Yeah, at 1 mm per pixel, this will not last long.
How about an NFC implant? They can point to URLs too…
over_clox@lemmy.world 5 months ago
Nah, I’ll totally pass on the NFC implant idea. I get you though, even if the tattoo was done by a true pro with the most steady hands and perfect alignment, what would it look like in 3, 5, 10 years or so…?
I very much appreciate all your comments and advice on this, as I’ve never had a tattoo before but seriously do think this would be a cute, if not silly idea to have such a tattoo hiding under my actual watch.
I’m still gonna eventually finish designing the entire pattern I’m looking for, to proper printing scale, as a PNG file. I think I’ll start from there by having our local print shop print me out a page full of as many as I can tile on a page, cut them out and laminate them myself with packing tape.
Then I’ll see what other people think of the whole silly idea, and if it’s more favorable than not, I might see about eventually getting it properly printed on temporary tattoo paper. Can’t really go wrong with a temporary tattoo right?
With that thought in mind (plus our print shop is closed today), where the hell would I get true temporary tattoos printed out?
crumbguzzler5000@feddit.org 5 months ago
Tattoos can get a little blurry over time, especially when they are really small. Look at examples of people who get little quotes or words written in cursive, sometimes they become almost unreadable.
over_clox@lemmy.world 5 months ago
Great advice, and thank you in advance! 👍
I won’t be getting such a tattoo anytime soon, but advice such as yours is the sort of advice I seek.
Thank you again, I’ll definitely keep that in mind.
ChaoticNeutralCzech@feddit.org 5 months ago
Print one out at 1:1 scale and wrap it around your wrist, then test it. Curved surfaces are challenging for QR code readers. AFAIK Google Lens is one of the best ones (it will follow edges of pixels in wavy codes) but you’ll want any old open source one to work.
over_clox@lemmy.world 5 months ago
AKA temporary tattoo test run…
over_clox@lemmy.world 5 months ago
Curious I am now, trailing slash?
This wasn’t encoded with a trailing slash, nor does the scanner app I use decode it with a trailing slash.
I’m not sure, but if it is decoding with a trailing slash on your side, that might be your scanner app doing that automatically.
Formally speaking, coming from the dialup internet days, full proper URLs were meant to end in a trailing slash, and if you didn’t type the trailing slash in yourself, some web browsers would have to ping the site twice before it figured out it needed that trailing slash, slowing down website loading time.
I dunno, thank goodness the internet has evolved enough where www.time.gov can be simplified to time.gov
On my end, my web browser itself (Fennec, a fork of Firefox), put the trailing slash in on its own… 🤷
ChaoticNeutralCzech@feddit.org 5 months ago
Lemmy automatically adds trailing slashes to links, apparently. However, you can cheat that by creating a hyperlink whose display text is “time.<zwsp>gov” where “<zwsp>” is a zero-width space.