Hidden image · autostereogram generator · John B. Wilson · DOS 1993 → Java 2000 → JavaScript 2021 → C# → one page
Brightness becomes height: white comes forward, black stays at the back plane. Loads and renders in one step.
Scaled to the repeat width and stacked down the strip, then selected as the pattern. Small, busy, high-contrast tiles hide the picture best.
Right-click a greyscale image anywhere on the web, copy it, and paste it here or straight onto the page.
These all publish greyscale height fields. HidImg reads white as nearest; if a source uses the opposite convention the picture will look punched in rather than raised, and the Invert tick box fixes it.
Ready-made libraries
Make one from any photograph
Real terrain
Portraits and single objects on a plain background fuse most easily. Busy scenes with many depth layers tend to read as noise — and a photo-derived map usually wants a smaller Max depth than the built-in shapes, since its gradients are far less clean.
Symmetric algorithm only. Lower values exaggerate perspective.
Fixes a stale-variable bug that disabled it in the Java original.
x, y run −1…1 from the centre. r and th are polar. Result 0–255.
Plotted over −π…2π as a raised ridge.
Fit to screen (in the panel above) scales the canvas to the window — handy on a phone, though scaling changes the repeat width your eyes actually see. Off is truest.
Turn off for very large canvases, then use Render.
Some people can't fuse these at all. If one eye carries much more than half the visual load, or you have significant astigmatism, the effect may never appear. Solution ghosts the depth map over the stereogram so they can at least see what they are missing — and it is the quickest way to check that a picture came out the way you intended.
Thimbleby builds an equivalence class per scanline and tests visibility, so a near surface properly hides what is behind it. Best silhouettes; the default.
Symmetric propagates constraints outward from the centre rather than dragging error to one side. This is the HidImg original, and the far-field constant only applies here.
Quick shift is the one-pass sweep from the DOS program — fast, with the characteristic smear trailing one way. L→R and R→L smear opposite ways.
Oversampling renders wider internally and averages back down; it kills the stairsteps on curved surfaces at the cost of time.
Every pattern is noise-driven on purpose. One carrying a horizontal period shorter than the repeat width would offer the eye a second, wrong separation to lock onto, and the picture would fuse at several depths at once — which is exactly what Test does. Its 5-pixel rules make a fine ruler for measuring the repeat and a poor stereogram. The plain dot patterns hide a picture most thoroughly; the textured ones hide it slightly less but are easier to fuse and better to look at.
Image width and height set the shape of the picture — the depth objects are drawn to those proportions. Canvas width and height only change the size of the finished stereogram; the picture keeps its shape and sits centred, with plain pattern filling any extra room. Untick Canvas = image to separate them.
Render (or the spacebar) rebuilds everything from scratch with fresh random values — a new dot pattern, and a new roll of any picture that has a random element. Changing a single control re-uses what it can, so you can compare two algorithms on the identical pattern.
| Source | What it contributed |
|---|---|
| HidImgJava.class Java 2 applet, ~2000 |
Symmetric algorithm with power-of-two oversampling and the far-field constant; both quick-shift sweep directions; the dot, band, plasma, sky and test patterns; BlackHole, Cross, EggCrate, Ellipsoid, GrillWork, Kryptos, Mobius, Plasma, Pyramid, Random, Ripple, Spiral, Stairs, Terrain, Torus, YinYang; the guide dots. |
| Stereograms.html JavaScript page, 2021 |
Free canvas size, dot-count control, clipboard paste of a depth map, inline data-URL loading, the live pixel probe, and the equation plotter. |
| LoraJBWProg_ C# WinForms module |
The Thimbleby algorithm with hidden-surface visibility testing, linear oversampling, and forty more depth objects — Saddle through SandCastle, including the Eiffel Tower lattice and the fractal-mountain castle scene. |
Everything runs client-side in one file with no dependencies and no network access. Depth objects marked in the menus by group; the red channel of the depth map carries height, as in the C# module.