gizmobench

Stereogram Decoder

Choose a PNG, JPEG or WebP autostereogram, or the generated example, and set the horizontal offset to the width of its repeating strip. Each reveal pixel is the largest red, green or blue difference between a source pixel and the pixel that many columns to its right, so a background that repeats at that offset drops to zero while a shape drawn with a different repeat stands out. After the first reveal, a scan of up to 32 sampled rows suggests offsets with a low average difference; gain and threshold tune the contrast, and the rightmost columns that have no partner pixel are hatched rather than guessed. The reveal keeps the image's pixel size, and the file is decoded and compared in your browser, never uploaded.

Your workspace

Up to 16 million decoded pixels and a 128 MiB file. The image stays in this browser.

Each reveal pixel is the largest red, green or blue difference between a source pixel and the pixel one offset to its right. Where the pattern repeats at that offset the difference is zero, so the background drops to black (white when inverted) and a shape drawn with a different repeat stands out.

Current result and evidence

Reveal differences to see the original and the reveal side by side. Pixels that repeat at the chosen offset show zero difference; a shape drawn with a different repeat stands out.

Choose a local stereogram image, or use the generated example to see how the reveal works.

Image
None chosen
Offset
Not revealed
Masked columns
None yet

Gain multiplies each difference and caps it at 255. Threshold then sets any value below it to zero, which hides faint compression noise. Transparent source pixels are flattened onto white before comparing. The PNG keeps the pixel size and orientation of the compared image, in grayscale with transparent masked columns. Decoding and comparison run in a worker in this browser, and nothing is saved.

Common questions

How do I find the right offset for my stereogram?
Reveal once at any offset. That first reveal also scans every offset from 1 to half the image width (at most 1,024) across up to 32 evenly spaced rows, and offers up to three Try buttons for offsets whose average difference is a local low at least 25% below the median across all scanned offsets. You can also drag the slider or use the -1 px and +1 px buttons. At the right offset a repeating background cancels out, which is when a hidden silhouette is most likely to stand out.
Why is a strip on the right of the reveal hatched?
Each reveal column compares a pixel with the one a full offset to its right. The rightmost columns, as many as the offset, have no partner inside the image, so they are masked: transparent in the PNG and hatched on screen. They are not depth information.
Why does the silhouette look shifted or doubled?
Reveal column x reports the difference between source columns x and x plus the offset, so a change at source column s marks reveal columns s and s minus the offset. That is why a silhouette can appear up to one offset to the left of where it sits in the source image, or with doubled edges.
Why is my reveal noisy?
If the offset does not match the repeat width, the background no longer cancels; try the suggested offsets or step by 1 px. JPEG compression adds small differences everywhere, so raise the threshold (24 by default) to set faint values to zero, or lower the gain (3 by default). Stereograms built from photos, complex textures or nonrepeating patterns may never give a clean silhouette with this method.
Does it rebuild the 3D depth map?
No. It shows where the pattern stops matching itself at one horizontal offset, which can outline the hidden object. It does not compute depth, recognize objects or test your eyesight.
What does the downloaded PNG contain?
A grayscale PNG with the same pixel width and height as the compared image. Bright pixels (dark ones with invert on) are differences after gain and threshold, and the masked columns on the right are transparent. The file name records the offset, for example stereogram-reveal-offset-140.png, and Copy settings copies the offset, gain, threshold and invert values as text.
Is my image uploaded?
No. The file is read, decoded and compared in your browser, with the heavy work in a web worker, and nothing is saved. Images up to 16 million decoded pixels, 16,384 pixels per side and 128 MiB are accepted; transparent pixels are flattened onto white before comparing.

Computes shifted-pixel differences to reveal some autostereogram silhouettes; it is not full 3D reconstruction, a guaranteed solution for every stereogram, object recognition or a visual health test. An incorrect offset and complex or nonrepeating patterns can produce noise. Invalid nonoverlap columns are visibly masked, not interpreted as depth.