11 ms·
Show HN: Photo Realistic QR-Codes
- pickledcods 6y agoHi HN! Inspired by a recent HN article on QR codes [0], I decided to finally publish [1] and open-source [2] a service I created 7 years ago. I got pulled away from it by projects with higher priority and it has been catching dust and been bitrot eroding since. Now reconstructed the basics and hosted on an AWS instance I would like to share so it might inspire. Creating a photo realistic QR requires two steps. The first is to create a 93x93 dithered monochrome image. The dithering is calculated to preserve the mandatory QR framework/timing bits and keep the data/crc bits conforming. Trying to maximize the crc bits to match the original image. The second step is adding colour information as a 186x186 dithered layer. The colour palette is created using Spacial Colour Quantification which uses the 93x93 QR image as constraints on the available colour range. SCQ also stabilises palettes used for animations (a service not made available through the site yet). [0] https://news.ycombinator.com/item?id=24119124 [1] https://www.qrpicture.com [2] https://github.com/xyzzy/qrpicture
- detaro 6y agoCool idea. Sadly only the b/w example scans for me, and even that takes a while to register.
- jonathanlydall 6y agoAll work on my iPhone 6S.
- tln 6y agoSame, pixel 3. This is very cool tech but from a UX pov I think it's better codes small and pure (no logo or non-square dots)
- sp332 6y agoWhich app are you using?
- detaro 6y agoDefault Android camera app on my moto x4 and SecScanQR
- Jakob 6y agoGreat idea! Works flawlessly for me on an iPhone XR.
- aabbcc1241 6y agoThis is both fun and useful, great job
- gus_massa 6y agoI only get B&W QR. (In case it is important, I used the first photo (one with three vertical yellow bananas) https://www.google.com/search?q=banana&rlz=1C1CHBF_esAR839AR839&tbm=isch&source=iu&ictx=1&fir=LZxQx4PwvNVDfM%252C5ymPQx-S2visAM%252C%252Fg%252F120lq251&vet=1&usg=AI4_-kS_Ps27TvfuXUSvBgTIyh101nchpQ&sa=X&ved=2ahUKEwiZzMCg8JrrAhVPD7kGHYmaCQgQ_B16BAgWEA8#imgrc=LZxQx4PwvNVDfM https://www.google.com/search?q=banana&rlz=1C1CHBF_esAR839AR... ) > If QR does not scan, then Re-Generate with more (+1) safer settings What does this do? Can you give a technical explanation? I don't like when the outline is so small that it doesn't cover the horizontal o vertical part of the grid. (This is a personal opinion anyway.) Note: Remove the two spaces before the links in your comment, so they become clickable.
- pickledcods 6y agoThanks for the example. It's the colour threshold. But with the brief number samples already posted I'm going to replace that that and generate two QR's. A low and high colour contrast.
- AriaMinaei 6y agoSlightly OT, but when migrating data between iPhones, the old iPhone displays an animated point cloud that appears to function like a QR code. You scan it with the new phone, and your data starts to migrate locally through Bluetooth. Other than aesthetics, what are the advantages of the point cloud? Higher bandwidth? Also, if you were to transfer 100s of megabytes of data from device A to B, using A's display and B's camera, what tech would you look into?
- Hates_ 6y agoI could be completely off the mark, but would an animation make it difficult to spoof. I can't now just use a photo of the cloud? Of course it could be that it just looks cool :D
- pickledcods 6y agoNot quite sure I understand what the question is. Calculating the QR is really CPU intensive and the settings on the site are for lowest quality. ANd even now its overloading.
- Jakob 6y agoOP asks about Apple’s animated "QR cloud" which was used in some iPhones and with the Apple watch: https://apple.stackexchange.com/questions/301563/what-is-the-technology-used-in-ios-11-settings-migration-moving-blue-dots-par https://apple.stackexchange.com/questions/301563/what-is-the... https://www.quora.com/Has-somebody-tried-to-dynamically-generate-2D-bar-codes-as-particle-cloud-like-the-Apple-Watch-does-during-the-pairing-process-with-the-iPhone https://www.quora.com/Has-somebody-tried-to-dynamically-gene...
- dhritzkiv 6y agoIf I had to guess, the animated point cloud isn't tasked with transferring lots of (megabytes) data, but is probably a proprietary version of a QR code, both for aesthetics and security through obscurity. Its format may also have higher information density than a QR code, which would work well for encrypted data. I imagine the heavy lifting is done on Apple's server. The data being transferred locally is likely a GUID/IMEI/etc + a nonce.
- ykevinator 6y agoThat's really cool
- pickledcods 6y agoThank You!
- dexen 6y agoFunny how QR codes scanning pictures of people has more content, and is more engaging, than the "Pictures of People Scanning QR-codes" [1]. In all seriousness, impressive work - and very pragmatic delivery, queue system and all. ---- [1] https://picturesofpeoplescanningqrcodes.tumblr.com/ https://picturesofpeoplescanningqrcodes.tumblr.com/
- pickledcods 6y agoThe queuing was based on 2007 metrics on load and usage. It now seems this needs updating. Preferably making if full client-side javascript.
- greesil 6y agoIs there an android app for qr code reading that doesn't want all my information???
- wiradikusuma 6y agoThe default Camera App in Google Pixel can auto-recognize QR codes, but unfortunately it doesnt work with these. Meanwhile, a dedicated QR scanner (such as built-in in iPhne) works.
- deninho 6y agoI use gcam on a xiaomi redmi note 7 and it recognised everything except for the animated ones.
- mangatmodi 6y agoLook like we killed another site from HN frontpage.
- wnissen 6y agoSample pictures are on Github. https://github.com/xyzzy/qrpicture/tree/master/www.qrpicture.com/assets https://github.com/xyzzy/qrpicture/tree/master/www.qrpicture...
- rootusrootus 6y agoThis is really cool! I do wonder what the practical use is, though, aside from just being pretty cool. In a real world situation I think the recognizability of a QR code as something you can scan with your phone is an important part of the value.
- pickledcods 6y agoHiding information in plain sight :) Animations. Real life Games. Information stickers (like my photo containing contact information).
- StavrosK 6y agoI've long wondered whether you can make a photo that gets recognized as a QR code by computers. This is very cool! Is there any way you can smooth out the calibration squares?
- crazygringo 6y agoThat's really clever. Using the 4 example images at the top, the first (color) and last (B&W) work flawlessly on my iPhone. But the two animated ones in the middle will work for a second, and then the phone loses it. Animated seems like "too much" for a phone to lock on to -- perhaps just stick to static? That's cool enough.
- awesomeideas 6y agoWith my Pixel 2, only the B&W worked with Google Lens.
- SamBam 6y agoI couldn't get any of them to work with my Pixel 3, using Google Lens.
- pickledcods 6y agoReally sorry to hear that. I do not have such a device and without. If I knew which engine was being used I might have a starting point to figure out what might be happening. edit: I noticed that the QR needs to contain a message or it will not scan.
- alsdkfjkqjwer 6y agoQR should look MORE like QR, and always include an URL next to it. If you display a QR Code with some url, and fail to show a shortened url next to it for people to type instead of scanning, you either fail basic common sense tests, or are intentionally being an asshat.
- Majromax 6y ago... or the QR code isn't meant exclusively for direct human consumption? A QR code is quite information-dense. With even the highest error-correction rates, a 53x53 QR code will store 100 bytes of information (https://www.qrcode.com/en/about/version.html https://www.qrcode.com/en/about/version.html). That's more than you can replicate in a URL intended for typing. For the case of the 'Show HN' here, think of semi-automatic uses of the QR code that still use the provided aesthetic potential, such as inventory-control stickers that look like the owning organization's logo.
- xellisx 6y agoTalking about what you can fit in one. https://www.youtube.com/watch?v=ExwqNreocpg https://www.youtube.com/watch?v=ExwqNreocpg
- _underfl0w_ 6y agoYou must just use so many QR codes. Clearly you're very familiar with their typical usage and most common use cases. /s
- irjustin 6y agoWow this is freaking cool! All worked for me in the iphone x
- pickledcods 6y agoPlease be patient, I'm adding extra workers to the instance. Old instance died because it exceeded limits.
- deathanatos 6y agoI'm a bit curious… how much traffic is the front page of HN? (I was thinking of posting a "Show HN" at some point, but I just do everything on my own machines. Not sure how much traffic my desktop would handle before figuratively melting. The nice thing about my Show HN is that it would be a static HTML page, so that's at least easier; yours is necessarily dynamic.)
- AlexITC 6y agoI have been in the front-page twice, getting around 5k-10k visitors in the same day, which should give you an idea.
- jermaustin1 6y agoThat seems to be what I typically see as well. I’ve seen up to 80k views over the course of a day.
- pickledcods 6y agoIn the two hours triggered 2546 request to generate a QR. And it literally killed my nano instance.
- jiripospisil 6y agoYou can use GitHub Pages for free. No need to pay for AWS. https://pages.github.com/ https://pages.github.com/
- pickledcods 6y agoIt's a front/back-end system. I'm currently running the backend on a c5a.xlarge instance.
- chronomex 6y agoRelated work elsewhere (2012): https://research.swtch.com/qart https://research.swtch.com/qart
- zelly 6y agoRelated idea: https://www.aestheticodes.com/ https://www.aestheticodes.com/ https://www.youtube.com/watch?v=kW39Mt5kscQ https://www.youtube.com/watch?v=kW39Mt5kscQ But this is probably better because it uses natively supported QR codes.
- rsync 6y agoI have a pet project, "Oh By"[1] that is a replacement for QR codes that does not require an app to create, or consume, and you can just chalk them up anywhere. The downside is that it is a centralized service. Further, you would need to trust that this centralized service would continue operating into the indeterminate future. Luckily I have a strong track record there. A very simple example use-case is here: https://0x.co/examples.html https://0x.co/examples.html ... and the "HN-Specific" FAQ is here: https://0x.co/hnfaq.html https://0x.co/hnfaq.html [1] https://0x.co https://0x.co
- dTal 6y agoFrom a practical perspective, the larger problem with this implementation is that unless you happen to have heard of your service (unlikely), it's not obvious what to do with the code, or even how to find out what it is. You need a distinctive, unique string format that yields to googling. Overloading the hexadecimal notation was a poor choice, in my opinion.
- rsync 6y agoYou are correct - there is a chicken and egg problem here wherein "Oh By Codes" are not useful unless everyone recognizes them for what they are. Like I said - pet project. Nearly 100% of my time and effort goes to rsync.net, but we'll see ...
- tinus_hn 6y agoI don’t see how you can look these up.
- 6y ago
- antris 6y agoI must be missing something... What does this have to do with photo realism?
- pickledcods 6y agoIt uses dithering by Spacial Colour Quantification to get the best photorealistic 93x93/186x186 colour image. The title plays on that the QR can be near photo and not some pixelated icon.
- fizixer 6y agoI has nothing to do with it. Unfortunately, OP is engaging in a cheap form of terminology hijacking. Either that or OP has no idea what the word 'photorealism' means. Either way OP is doing himself a disservice. Great project. Siraj-Raval vibes.
- pickledcods 6y agoThat might be true. What would you suggest as a better description.
- antris 6y ago"Picture to QR code converter"?
- ChrisMarshallNY 6y agoThat's wild! Thanks!
- deleted 6y ago[deleted]
- iFire 6y agoI looked at this work and since it's AGPL licensed I went away. https://www.bitcat.cc/webapp/awesome-qr https://www.bitcat.cc/webapp/awesome-qr is a great alternative.
- ravenstine 6y agoSomehow, I think these kinds of "clever" QR codes would be less used. Most people aren't going to even notice that they are legit QR codes. QR codes are already underutilized enough, at least in western countries. Cool idea, though!
- ksm1717 6y agoIt’s my opinion that underutilization is because of application rather than any more ephemeral thing like appearance. QR codes haven’t had a killer app yet, and they tend to be used for marketing rather than any critical tasks that rely on the qualities that make it a useful technology. My guess is this will change as it’s become more or less a requirement to have a cell phone to function in western society.
- sdenton4 6y ago/My guess is this will change as it’s become more or less a requirement to have a cell phone to function in western society./ I think that time has already arrived... I remember seeing reports that a cellphone was generally the most-valued item amongst the homeless in the US. (Not quite a quantitative study, but here's an article on the importance of cellphones for homeless people, and challenges they face: https://www.calhealthreport.org/2019/01/11/expired-lost-stolen-cell-phones-critical-homeless-people-can-tough-get-keep/ https://www.calhealthreport.org/2019/01/11/expired-lost-stol... )
- jiofih 6y agoAs an European I’d say over half of my mobile payments are already via a QR code (it triggers a direct debit from my bank app). It’s infinitely faster than going through online checkout forms.
- dTal 6y agoDo you at least get a manual confirmation? Because if not, I've a QR code I'd like to show you...
- serjester 6y agoNeat, although anyone else think his has an uncanny resemblance to LSD blotters? Talk about an interesting branding opportunity!
- deleted 6y ago[deleted]
- rendall 6y agoSadly, on my Samsung Galaxy S9, absolutely none of them register