Code for playing with random dot stereograms. Originally built as a supplement to my article Depth perception: more than meets the eye
The notebook which takes depth masks was inspired by code from synesthesiam
I emphasize that this is a work in progress. I am actively experimenting with the code so that I can better understand how stereograms work. You should too. If you have any questions, contact me at firstname.lastname@example.org
- All code is written in python 2.7. You will need:
- Matplotlib (but only if you want to plot stereograms inside of your iPython notebooks)
The project should port pretty easily to python 3 as long as you change the "xrange" keywords to "range" and other such minor changes
The "rds simple" notebook creates basic dual image autostereograms. Converge or diverge the eyes so as to see a triplet of three red dots. Clear any blurriness but maintain the triplet to see a rectangle emerge from the background dots in vivid 3D.
The "rds depth mask" notebook creates more advanced autostereograms. Converge or diverge the eyes so as to see a triplet of three black dots. Clear any blurriness but maintain the triplet to see a shark emerge from the background dots in vivid 3D.