November 7th, 2012, 10:44 PM
Embedding grayscale halftone pictures in QR Codes
What is this 512x512 picture?
Bad Quality Lena indeed, but the trick is that it's black&white - can be directly seen as length 512x512=32kB bit sequence.
It occurs that making code "looking like Lena" reduces the capacity only to about 0.822, what is about 26kB in this case - the visual aspect costs only about 6kB.
It has rather too high resolution for practical applications, but here are examples of lower resolution codes looking like a chosen black and white picture:
for example the central noisy code contains 800*3/4=600 bytes - making it look like the picture costs only 200 bytes.
Here is fresh paper about obtaining it (generalization of Kuznetsov and Tsybakov problem - for constrains known to the sender only): http://arxiv.org/abs/1211.1572
Todays QR codes usually contain only address - nearly nobody uses them because its simpler and quicker just to google or store/remember it. The situation should change if they would look attractively and have much larger capacity - even just out of curiosity motivating to get closer to make a clear shot to find out what interesting contents it hides. Todays phones have about 8Mpixels, so a well designed QR codes could contain hundreds of kilobytes - a ring tone, an application, a wallpaper ... even a huge poster could by the way be a QR code - we could imagine a marketing campaign where you need to collect some of them to get a prize ...
Todays QR codes are industrial standard - it's time to adjust them to everyday life ... increasing capacity and improving visual aspect is a natural direction of evolution.
What do you think of replacing today QR codes with nicer looking and more visually descriptive ones?
What other applications could you think of for this new steganography for which two colors is finally enough?
Last edited by Jarek Duda; November 8th, 2012 at 07:11 AM.
November 8th, 2012, 02:52 PM
It's an interesting concept, but as the picture gets larger I'd be worried about the capability of capturing the QR code. On my phone (an older model with a cheaper camera*) I often must be right over standard size QR codes, I might be able to read the 80x80 if I take the time to line it up, but reading the 160x160 would be near impossible.
*I have a 3.2 MPx camera... but the lens is absolute crap. I have to get fairly close to allow the sensors make out the pixels through the lens distortions/cloudiness.
November 8th, 2012, 05:04 PM
Indeed good optics is required for large capacity - modern smartphones have about 8Mpixels, autofocus, flash - I think we should be able to reach hundreds of kilobytes with them?
If one would be intrigued by a nice looking code and could expect some interesting content (large capacity required), he would get closer and took a clear shot with flash ...
November 8th, 2012, 05:37 PM
While it's an interesting idea, I think that it misses one key point. QR codes work because they look like QR codes. Embedding images like that has a lot less chance of working because your average person in the street will see an image like you've proposed and think "What a cr%^y picture..." not "Wow I'll see what my phone can make of that". If you can't look at it and instantly recognise that it's not meant to be a real image, you've lost 70-90% of your target market before you've even started.
November 8th, 2012, 08:47 PM
I think Catacaustic is beginning to hit on a good point.
There are two major problems with what's being suggested. While you can embed small graphics in QR codes and still have them work, you begin to run real risks. First off, QR codes have several layers of redundancy that serve to protect data integrity. You begin stripping that away by adding graphics. Second, QR codes are not necessarily meant to be used up close. They were meant for movie posters, cafe windows, bus stops, and other places you might be able to point a camera while passing by. As you increase the complexity of the QR code (especially its density), you begin to make it harder and harder to use as intended. So much so that something as simple as motion blur from a shaky hand will render your QR code all but useless to most people. It's an interesting concept, I'm just not so sure it's practical.
November 9th, 2012, 02:28 AM
Catacaustic, the "looking like a QR code" is not an issue here - it's not a problem e.g. to leave something characteristic, the problem is to make the rest looking as we want.
Personally I don't think being obvious it's a QR code is generally required, just oppositely - e.g. seeing Lena-like code above would rather make you suspicious, come closer ... and this brought attention would increase motivation to scan.
The current QR codes are enough to contain address ... increasing capacity would additionally bring many other purposes like marketing, e.g. information about an item in a museum, some small app useful for given place ...
Nilpo, the error correction capabilities are indeed extremely important issue here and so I discuss it widely in the paper:
1) Warn about using error correction capabilities to make QR code looking as we want - it's extremely inefficient (damaged ECC case) and usually disables further correction capabilities,
2) Show how to combine both purposes to use them simultaneously and in nearly optimal way: error correction (redundancy bits) and "making it look as we want"/constrained coding (freedom bits),
3) Replacing current Reed-Salomon archaic method with something modern and allowing for huge flexibility while performing correction - online adapting to analyzed damages like even medium folding ...
November 9th, 2012, 07:34 AM
Yes it is. It's a big issue.
Originally Posted by Jarek Duda
If something doesn't LOOk like a QR code, how would someone know to use it like a QR code?
You have to remember... 99% of system design is about usability of the lowest common denominator. If the average person in the street can't see that an image is meant to be scanned, then they won't scan it, and you've lost that lead.
So, here's my question to you. If someone doesn't know that it's a QR-type code that's meant to be scanned with a mobile device of some sort, what would you think that they'd do with it? Remember... They don't see it as a QR code or something to scan. They see it as a picture that's blurry. How would someone know what to do?
November 9th, 2012, 08:04 AM
Imagine 10 years ago you would seen a todays QR code ... of course it takes time to make people used to new technology, but I think just recognizing QR codes is the smallest problem here, especially you can do it gradually - start with commonly using simple pictures embedded in current codes (like here: http://research.swtch.com/qart ), then increase capacity/resolution leaving characteristic squares ... then if you spot a strange looking picture which turns out to be made of pixels, you know it's a QR code ... but also well hidden steganography sounds like fun - exercise for perceptiveness, appreciating details around through hunting with smartphone to find hidden information around ...
November 9th, 2012, 09:07 AM
True, but people still aren't used to them. In fact, most of the population here in the U.S. still have no clue what they are despite the fact they are all around.
Originally Posted by Jarek Duda
Very, very wrong. QR codes are the not only (and in fact not even the most popular) matrix barcode in common use.
Originally Posted by Jarek Duda
November 9th, 2012, 09:36 AM
Probably because they only contain e.g. address now - it is easier and simpler just to remember/google it - people have completely no need to familiar with them.
The situation would changed if they could expect some interesting content hidden, but it requires much larger capacities ...
As I practically haven't meet any others, while QR are appearing everywhere around (Poland), I have just assumed they completely dominated the field, but I see you might be right: http://en.wikipedia.org/wiki/Barcode
Ok, we can replace QR codes of this discussion with just some picture resembling or hidden in pictures codes ...
November 9th, 2012, 10:13 AM
I'm curious what would be the advantage to encoding the data to support an image, instead of just turning off certain sections of the qr code and embedding an image within those sections (related)
November 9th, 2012, 10:30 AM
MBirchmeier, you could just place a picture around QR code ... the issue here is to make the random pixels to have some aesthetic/informational value, like some emerging picture from them ...
Another issue is optimally using this informational channel - it is far nontrivial to do it really good what I discuss in the paper.
For example "looking like Lena" above optimally costs only 18% rate reduction - so in your technique you could take e.g. central 18% of pixels to make a picture you want and the rest 82% would be just a noise...
Last edited by Jarek Duda; November 9th, 2012 at 10:48 AM.
August 26th, 2015, 02:44 AM
Basic implementation: https://github.com/JarekDuda/PRcodes
ICIP 2014 paper
More examples for various resolutions and rates (the number of bits of information we can hide in such code is rate times the number of pixels):
QR codes is a nice example of application, but these are very general new coding possibilities: encode as a sequence fulfilling some (statistical) constraints, which are known only to the sender.
Natural application is making more subtle all kind of steganography/watermarking: encode as something resembling some common data, having the same statistical properties.
For example one could pretend a noise from some device, hiding information there.
However, maybe there are also other applications for this general new possibility of communication?
For example imagine underwater acoustic communication for a submarine - the situation around it constantly changes (currents) - maybe it would be beneficial to adapt the statistical properties of the signal to the current conditions (receiver doesn't have to know them) ...
What other applications could you think of?
Last edited by Jarek Duda; August 26th, 2015 at 02:48 AM.