# How to produce visually unexpected results?

Below is a totally made up example.

So let's say on the left we have a weird black-white image or, in other words, a matrix of zeros and ones. We then apply a specific algorithm to the given matrix. The result is shown on the right - it is still represented by a pretty weird image but this time a circle can be visually distinguishable in our outcome.

The idea is that the circle (or any other simple figure for that matter) was planned to appear there all along. Yet that same figure was not visually obvious to be there in the beginning.

How could I realistically recreate a similar result? Maybe some have seen sources referring to like-minded ideas? Essentially I'd need a simple model which relies on underlying patterns that are not (easily) visually distinguishable.

I am aware that visual cryptography is almost synonymous with having multiple layers which when properly combined reveal the result. I'd love to go with a single layer even if it is not safe in terms of hiding information. I was thinking about functions and subtle algorithms (such as cellular automata) which potentially could be used in order to recalculate every element of a matrix but no luck so far.

• What's your underlying goal here? You could always work backwards from the image that you want. Start with the image of the circle and randomly exchange some pixels or blocks of pixels until you get a random image. Then play the tape backwards. That will make something "unexpected" appear to appear out of nothing. Commented Oct 9, 2013 at 12:23
• @BillBarth My underlying goal is pretty much to hide some visual information without padding it with random data (as classical visual cryptography apparently often does). For example imagine one could take the result (image on the right) and process it using a diffusion-like model so that it's not easily interpretable anymore (image on the left) - yet everything can be reversed. Commented Oct 9, 2013 at 14:41
• Are you perhaps looking for steganography or wartermarking? Your explanatory comment seems very different from your question. Commented Oct 9, 2013 at 15:25
• @BillBarth Sorry for the confusion. Comment may seem different from the original post since I do not have any specific realization in mind (except that I'd prefer not to do random padding). This very much falls under the term of steganography - I am an undergraduate student trying to do a little project about secretly transmitting visual information. Commented Oct 9, 2013 at 17:04
• Then you question doesn't seem to be about how to produce unexpected results but about how to encode information in an image so that people who don't know about it can't see it. Commented Oct 9, 2013 at 21:42

i suggest to look at digital watermarking. it's the way to embed information into the data in such a way that it's indistinguishable from noise. you can subsequently extract this information. it's used for copyrighting content, where you may create the copies of content each with a watermark, then track down the leakers.

This does not address any specific algorithm that would accomplish something of this nature, but as far as tools, I would use Python. See this Numpy/Scipy documentation on how to process images with Python.

In a few short lines of code, you can load in an image into numpy data structures, which can then have mathematical operations done on them and be plotted again as images. I have used this technique for various tasks, but never the specific one you have.

I would imagine that if you start playing around with this a little then you could come up with some sort of algorithm (probably basic linear algebraic operations on the numpy arrays) that would achieve this result you are looking for.

• Thanks for the technical tip. Hopefully the idea will be conceived. Commented Oct 9, 2013 at 17:26

I'm not sure if you're aware of the work on Emerging Images. It has some of the characteristics of what you want, although it doesn't seem to completely answer your question.

• That is interesting, as I understood processed image becomes somewhat resistant to artificial detection yet remains interpretable by human mind. I was aware only of emergence in terms of self-organization ( en.wikipedia.org/wiki/Self-organization ) hoping that meaningful information can emerge from seemingly meaningless conditions. Commented Oct 9, 2013 at 17:25

Let's see, if you like this example. You may take a random black and white image (i took a random text) and noisify it by adding Gaussian noise. This leads to the following image:

You can now hardly detect any structure in the picture. I now applied a 2D-HMM decoding to try to reconstruct the original image:

Is this, what you wanted to see?