Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Ha! A blast from the past. Who remembers buying those Magic Eye books? I had some friends as a kid who could not see them. And remember struggling for a week to see them myself. After finally getting it I felt like I was in an exclusive club somehow.


I never was able to see them with my naked eye. Of course, the hacker in me want to figure it out, so I spent day figuring out how to reveal the picture. The solution is to XOR the image with an itself at a variable phase shift. There is one phase shift that reveals the general shape, then increasing it shows the 3-dimensional details (you'll want to bitmask with the general shape here).

The way I assume it works is that our brains naturally filter out patterns so we can see the interesting stuff. In a stereogram, the underlying image is XOR'ed with a random pattern that is repeated, and therefore filtered out by our brain. Interestingly, the repeated pattern is not constant, so if you XOR the image against the first instance of the pattern it will look increasingly noisy as you get further into the picture.


Just tried it, that's a really neat way to reveal them.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: