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: Let I be the original 24bit image (8bit per channel). 1.convert to grayscale I = 0.3 I.r + 0.59 I.g + 0.11 I.b 2.Duplicate I, blur it, then invert it and alpha combine at 50% I = 0.5*I + 0.5*invert(gaussian(I,sigma=3)) 3.Color dodge the result with itself. This results is a pencil sketch I = (I == 255) ? I:min(255, ((I << 8 ) / (255 - I)))) 4.Blur the pencil sketch I = gaussian(I,sigma=6) 5.Create a grid of lines lineGrid = alternate black white lines separated by 4 pixels 6.Multiply I with lineGrids I = I*lineGrids/255 I is the final result. Print This Post Print This Post
  • Francoise Giraldo


Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...