0

I am looking for a way to encode an image data into another image of a comparable size, machine-readable.

Purpose of this is the task of image encryption for social media: encoded image can be resampled, down-scaled, and should still be valid for decoding and restoration, with relevant degrade of quality: lower resolution and less colors maybe.

QR code is a well-established way of encoding data into a machine-readable visual format. However, it's drawbacks for the task are obvious:

  1. down-sampled to less than 1px:1dot resolution it immediately loses all information;
  2. its information capacity is far too low to have a color image of the same pixel size contained within.

There is a color version of QR code that is better at info capacity, but it still lacks any sustainability to scaling.

So I am wondering if there are any other mutations of QR that maybe overlay, thus keeping larger-detail layers survive scaling that blurs away the least-sized details layer. In such way, a frequency-separated image could be encoded into several layers of QR codes, overlaying.

Meybe there are other than QR ways of compressing and encoding image data into another image, suitable for recognition?

Serge
  • 1,531
  • 2
  • 21
  • 44

1 Answers1

0

Is your goal compression, encryption or error correction? Encryption and error correction will add data to the payload, and nothing would survive arbitrary resampling and degradation.

QR codes have no encryption mode, nor do image formats (except maybe PDF). You're already looking at making a thing, a format, that requires custom handling on the viewer side if you involve encryption. So, why not just put the image through an encryption algorithm?

Maybe you can say more about what you mean to achieve.. lossy transmission with encryption?

QR codes are almost certainly not relevant.

Sean Owen
  • 66,182
  • 23
  • 141
  • 173
  • My goal is compression along with encryption. Result is a graphic image of a relevant size, ideally the same as the source image. Even after a lossy compression and scaling down, the image should be valid for decryption - with the ~same level of degradation that the encrypted form has suffered. Lets say, a 100x80 src, enc. into a 128x128 image, uploaded to FB - recompressed to jpg 60 qualitiy, scaled down to 80x80. With the same password, this 80x80 can be decrypted into a 60x48 image, that is close to what a plain scaling of the src would look like. – Serge Jan 13 '13 at 17:42
  • Compressed and encrypted but still a graphic? I assume the graphic shouldn't just be the original image or like it since it's secret. What's the point in making it an image at all -- it needs to be printed? Otherwise, I think you just want to make a compressed, encrypted image file. – Sean Owen Jan 13 '13 at 19:31
  • 1. Printed, posted on a wall, people with Google Glass + valid key see the message. 2. Posted in social media, ppl with a plugin and a valid key see the real image. – Serge Jan 14 '13 at 02:35
  • If it's printed you have to transmit bits visually. That's hard. Color-based codes have better information density, but you'd have to have a custom reader that understands the encrypted payload, and I don't know of free / open colored codes. Steganography is not going to be able to hide a whole image in an image. If it's not printed, I think it's far easier to not bother putting it into something like a QR code. Encrypt the image and have a special plugin with the key. You have to have a special reader anyhow and once you do, it's easy. – Sean Owen Jan 14 '13 at 15:30