How can I recover steganographically hidden data from a photographic copy of the image?

There are multiple ways to perform steganography using images. The kind most people are familiar with today is to embed invisible (or barely visible) data in the data of the image file. That means starting with an ordinary image file, then using steganographic software to modify the file to embed the secret message, then publishing that photo so it can be viewed by a conspirator. Such modifications can be as simple as LSB; or they can hide data in the JPEG quantitization of the image; or they can invisibly hide data in an embedded thumbnail image or the metadata of the photo. Different schemes have different visibility.

Consider selecting a "more visible" steganographic algorithm than just LSB.

One example might be to modify a GIF palette substitution steganography scheme. Using GIFs for stego can be done by choosing 128 doubled colors instead of 256 single colors, then choosing high-bit or low-bit versions of each pixel to transmit the message. Because the low bit colors in the palette are the exact same color as the high bit colors, the stego is normally invisible (although the picture quality is degraded due to the reduced number of colors in use.) By altering each of the high-bit colors slightly, you could make them more visible to the camera. The advantage of using the GIF scheme is that you can test your scheme by keeping the color changes small, and tweaking the high bit colors just a little at a time until you can reliably decode the message.

Also, consider encoding your stego data using error correcting codes, such as a Reed-Solomon encoding. These are used by systems such as QR codes to reliably allow scanning when part of the code is damaged or obscured. If you don't want to spend that kind of effort, try repeating the plaintext message dozens of times and spread it throughout the image, improving your chances of detecting it from one or more places in the image.

EDIT: In your comment, you mentioned you were trying to use JPEG pictures from your camera. Don’t. They will not work because JPEG is designed to combine “close” colors in order to compress the image, and this will totally obliterate any evidence of stego. You need to process the image file as RAW, not JPEG.

Based on your comment, I now realize you may also run into problems with the color response of your camera, and how it will perceive the colors in your image. The traditional RGB approach probably won’t work, especially since the camera’s RGB color values won’t be the same as your monitor’s color values. If you try this, you may have to calibrate your camera’s color response. Or, you can try converting the colors in your camera picture into a color space better suited for comparisons.

Translating each pixel into the L * a * b color space would probably be the best way to spot differences.

All this is horribly complex, and will probably require a degree in digital image processing. Can you instead find a way to hide a QR code in the original image?


Because of the radical bit level changes that will occur from both taking a picture of a picture and applying a lossy compression algorithm (JPG), a simple bit pattern stego will likely never work. However taking the approach of watermarking throughout the image may have a chance, but it will likely need to be pretty heavy handed.

For example consider this as a base image:

Inline Baseline JPG

Inline Baseline JPG

Now using GIMP and two different Fourier Transform tools to insert a Stego message into the 2D frequency spectrum to get these two pictures:

Inline Stego-1 JPG

Inline Stego-1 JPG

Inline Stego-2 JPG

Inline Stego-2 JPG

These two Stego images look like this in a 2D FFT

Stego-1_FFT

Stego-1_FFT

and

Stego-2_FFT

Stego-2_FFT

Taking a pictue of the two stego images 1 & 2 on my monitor with my cheap Android phone and then trying to recover the stego message from the phone did not work for this test, but the phone FFT of Stego-2 hinted at possibilities:

Phone_Stego-2_FFT

Phone_Stego-2_FFT

The net result is that I think it is possible with the right techniques, but not easy!

        **Edit**

Replaced external links with small inline JPGs. Added Monitor shot with my Nikon, shooting raw, post processed to TIF. Here is Stego-2 Nikon FFT:

Stego-2 Nikon FFT

Stego-2 Nikon FFT