4

I need to photograph an image containing a steganographically hidden message, then decode the stego content from the photograph without recourse to the original image data. Are there any steganography algorithms that would make the task more reliable?

Note: I tried the Least Significant Bit (LSB) method, but when I processed the photos from the camera there was too much distortion.

3
  • 2
    Can you rephrase the question such that it is more understandable? What do you mean by you need to photograph an image with steg? Are you saying that you have an image - say PNG or JPEG or Bitmap which you want to add some steganographic content to?
    – hax
    Jan 9, 2020 at 5:13
  • 1
    This could be an extremely interesting project. Take a string of text. Encode it. Use LSB-based steganography. Photograph. Attempt to reconstruct string. If it does not quite work, use a more robust code. I am thinking of the codes used to communicate with robots on Mars, something along the lines of taking blocks of 100 bits of data and producing blocks of 256 bits — massive redundancy needed, I assume. Jan 10, 2020 at 7:32
  • @hax yes. .. I create stego image with my PC . Next take photography of that using my android phone. and try to extract hidden content.
    – uma
    Jan 10, 2020 at 13:45

2 Answers 2

5

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?

6
  • 3
    Is any of this going to work off of a photo of the image that has the hidden data? That's going to introduce a ton of compression and smoothing and add a ton of noise, no?
    – schroeder
    Jan 9, 2020 at 10:17
  • 1
    @John you sure this is possible from a photo of the original image? I don't think it's even possible to recover whatever stega message! Jan 9, 2020 at 10:53
  • 1
    @SoufianeTahiri , that’s why I suggested GIF stego. They can tweak the colors to make the high bits as bright or as dark as needed. It all still depends on a lower res original image and a high quality camera image, of course. Jan 9, 2020 at 12:44
  • 1
    @schroeder , they mentioned an Android app in an earlier version of the question that was closed. With direct access to the camera, they can take a lossless image instead of using a lossy JPEG image. Jan 9, 2020 at 12:49
  • Thank you..all answer. acutulay ,I am tring hide stego within png formate and take it from my camara , and decode it. I try capure image both , .png and .jpg formate.. but the image pixel values totaly change. so, I understand think , i need some robust way. I haven't more knowlege about frequency domain steganogaphy . anyway , i will try above mention way.
    – uma
    Jan 10, 2020 at 13:51
2

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

3
  • yep. ..that mean if i take , photo form very best ,good camara , i can go some level. ? :)
    – uma
    Jan 12, 2020 at 4:35
  • Is this raw image(.DNG) or .jpg ?
    – uma
    Jan 12, 2020 at 4:36
  • 1
    @uma - All of the images posted here are JPGs due to size and format limitations of "StackExchange". The last Nikon image is a small JPG crop from a much larger original raw Nikon image (NEF). "DNG" is an Adobe format. _ Jan 12, 2020 at 16:37

Not the answer you're looking for? Browse other questions tagged .