EDIT: I changed the code a bit so that the strips appear horizontal rather than vertical. The advantage of it is that the hidden image can be revealed just by rapidly scrolling up and down
...(while you do so fix your eye at the center). The illusion is really cool.
I implemented the whole thing into an app. Try it out for yourself
, keep in mind the application is for windows system only! For those interested in the code implementation which is done in openCv check out this article
Now coming to the working of the illusion. It is based on the principle of lateral inhibition of neurons. If one neuron is strongly activated (or deactivated) the nearby neurons are inhibited from activating (or deactivating) . Those working in signal processing will realize that this acts as a high pass filter, enhancing contrast. It must be noted that all this is going on at sensory neuron level and happens much before the signal actually reaches the brain. In this particular example a collection of closely spaced lines is superimposed over a blurred image. The presence of the close spaced grid of bright and dark lines causes strong lateral inhibition creating a high pass filter because of which we are simply not able to see the underlying blurred image. To see this hidden image one can move the picture relative to eye, the moving image will simply fail to strongly activate a particular neuron and hence there won't be any lateral inhibition. The other ways to see the hidden image is to simply move back few feet from the screen or in case you are myopic simply remove your glasses!
Now coming to the mathematics of creating the illusion:
be the original 24bit image (8bit per channel).
1.convert to grayscale
, blur it, then invert it and alpha combine at 50%
3.Color dodge the result with itself. This results is a pencil sketch
4.Blur the pencil sketch
5.Create a grid of lines
lineGrid = alternate black white lines separated by 4 pixels
6.Multiply I with lineGrids
is the final result.
Print This Post