Rendering of 'random dot stereograms' for pseudo 3D view. This program provides routines for generating autostereogram. It's just for fun and educational purpose. Feel free to modify, improve, and use it :)
Try it out: you have to use the original size of 512px * 512px. Just, squint your eyes and try to focus behind the image:
Here's the depth map of the incorporated image:
Variant A) Just do for standard compilation (tested with gcc 13.3.0):
# generates the application
g++ -o Stereogram Stereogram.cpp -lX11 -lGL -lpthread -lpng -lstdc++fs -std=c++17 -Wno-narrowing
# run the application
./StereogramVariant B) Visit the PGETinker website with the running stereogram.
Variant C) Use your favorite browser and open the Stereogram.html.
Simply use the mouse to pan the image. There's no zoom because the autostereogram relies on "correct pixelation" and zooming would result in "blurred pixels".
Use the left mouse button to pan the image.
Use key Q for background image.
Use key W for depth map image.
Use key A for stereogram with shift/slice algorithm.
Use key S for stereogram with algorithm by Thimbleby,Inglis,Witten.
Use SPACE to toggle between both stereograms.
Use ENTER to save view to 'output.png'.
Use key ESC to quit the application.
The program acknowledge the libraries and refer to the appropriate licenses
- olcPixelGameEngine by Javidx9
- olcPGEX_TransformedView by Javidx9
- Thimbleby, Harold W., Stuart Inglis, and Ian H. Witten. "Displaying 3D images: Algorithms for single-image random-dot stereograms."; Computer 27.10 (1994): 38-48
- Big Thanks to the PGEtinker community giving me the possibility to share the application without installation ✨
- Other pieces of codes are released under The Unlicense into public domain for free usage.