Skip to content

Software

Stereogrammer is a Windows .NET application that facilitates the creation of Autostereograms, also known as Single Image Stereograms (SIS) or, under certain conditions, Single Image Random Dot Stereograms (SIRDS).

Stereogrammer is now open-source and can be downloaded from github.

I have removed/disabled all the algorithms except my own Horoptic algorithm from the open source version.

At its heart, Stereogrammer takes 2 images – a Depth Map and a Texture, and generates a 3rd image, which is an Autostereogram.  When viewed in an appropriate manner, this image will appear to be a 3-dimensional representation of the depth map, textured with the Texture.

Stereogrammer allows a significant degree of control over the generated image:

  • Stereo Separation of the resulting image can be controlled
  • The Field Depth of the image (range of potential virtual depths used) can be controlled
  • Application of Hidden Surface Removal and Oversampling can be controlled (these options can produce higher quality images)
  • Convergence Assistance Dots can be added to the generation process
  • Resolution of the resulting image can be specified, with the option to preserve the aspect ratio of the input Depth Map

Stereogrammer also offers an assortment of features for convenience:

  • Palettes of Depth Maps and Textures can be loaded, and a preview of the resulting image quickly and easily generated as options are changed
  • Various manipulations of Depth Maps can be performed, including level adjustment and Depth Map merging, to help you produce and tweak your image
  • Full-screen previews can be generated quickly with a simple double-click

Basic operations

On launch, any previously loaded Depth Maps and Textures should be restored to their palettes, but new Depthmaps or Textures can be added by selecting the appropriate palette and choosing ‘Add’ from the buttons at the left hand side.

Depth Maps  Some sample depth maps can be downloaded from the Stereogrammer Project Page, and others can be found by searching for ‘depth map’ on Google Images – though these are likely to need adjustments to produce attractive results.  Alternatively, you can generate your own depth maps easily enough using an art package such as Paint.NET, or with a little more effort using a 3-D modelling package such as Blender.

Textures Google images can also be a source of images to use as textures, but the Infinite Fish website comes with a large package of ideal textures for free download, and these are what I use for most of my images.  Any image at all can be used to create a Stereogram, but the textures from Infinite Fish have the great virtues of being tileable (i.e. they are symmetrical) and rather abstract, which makes the resulting images easier to perceive in 3 dimensions.  Alternatively, the Textures palette always contains virtual textures for random monochrome dots or random coloured dots, which are generated dynamically.

Generating a stereogram is as simple as selecting a Depth Map, selecting a texture, and clicking ‘Generate’ – the default options should produce an acceptable image.

Alternatively, double-clicking any thumbnail in the depthmap, texture or stereogram palettes will generate a Preview Stereogram, which is automatically scaled to fit the current window and automatically regenerates when any of the options are changed… this is a good way to set up your parameters to your liking before generating a final stereogram.  Double-clicking on the preview itself will generate a new preview at full-screen resolution.

Saving a stereogram to disc is easy.  The Generate Button will bring up a dialog which allows the target resolution to be set, and all options to be finalised.  The generated stereogram can be saved directly from this dialog, or at any future point in time before the application is closed by choosing ‘Save’ from the Stereograms palette (or right-clicking on the stereogram and selecting ‘Save Stereogram’).

Generating and Saving a Stereogram

The rest is, essentially, detail.

Options

The options which affect generation of Stereogram images are fairly basic.

Separation – controls the degree by which neighbouring strips of the stereogram are separated.  This affects the degree to which the eyes need to diverge in order to bring the Stereogram into stereoscopic focus.  This affects two things – how easy it is to view the image in 3 dimensions, and how much depth is perceived in the resulting image.  In practice, a separation equal to half the separation of the eyes (approximately 1.25″, or 120 units on a monitor at 96 DPI) tends to produce optimal results.

Field Depth – the amount of theoretical depth used by the generated stereogram.  If separation controls how far away the furthest point in the image appears to be, then Field Depth controls how close the nearest point appears to be.  Valid values are between 0.0 and 1.0, but in practice a range between 0.25 and 0.5 is likely to yield the best results.  Any Field Depth greater than 0.5 runs the risk of introducing artefacts as closest points get ‘clipped’.

Remove Hidden Surfaces – this option only affects the Horoptic and Constraint Satisfaction algorithms.  If enabled, an attempt is made to detect points which are only visible to one eye because they are obscured from the other by a closer part of the geometry, and exclude them from the algorithm’s consideration.  This option significantly slows down generation of the Stereogram, and whether the resulting images look better or worse is debatable.

Preserve Aspect Ratio – if this option is enabled, the generated stereogram will be constrained to have the same aspect ratio (ratio of width to height) as the input Depth Map.

Add Convergence Dots – if enabled, two small black dots will be added to the top of the image, at a distance equal to the Stereo Separation of the image.  This can help the viewer to achieve the correct convergence of the eyes on appropriate parts of the image to reveal the stereoscopic effect.

Oversampling – oversampling improves the quality of the resulting image by processing it at a higher effective resolution, then scaling it back down to the specified resolution.  This can reduce visible artefacts in the Stereogram, and also has the effect of increasing the number of effective depths that can be represented in the image by the oversampling factor.  The result is generally a much better looking image, with the drawback being that it increases the amount of time (and memory) required to generate it… 8x oversampling will typically take 8 times longer than no oversampling (1x).

Advanced operations

Besides the basic generation of stereograms, there are some further operations supported by the program.  Most of these are activated by right-clicking on items in the palettes to bring up a context menu.

Invert Depthmap – if your Depth Map has been sourced from the internet or some software package which was not expecting it to be used in Autostereogram generation, it may be that it represents depths in the opposite way to that which Stereogrammer expects.  I assume that a black pixel is on the back plane (as far away as possible), and a white pixel is as close as possible.  If your Depth Map assumes the opposite, then Invert Depthmap will encourage it to comply.

Adjust Depthmap – Depth Maps from many sources may produce poor stereograms, if the range of depths they use is not well calibrated.  Adjust levels allows such problems to be resolved by expanding or compressing the dynamic range of the depth map.  The best way to see the effect of the various sliders is probably just to try it – it should be familiar to anybody used to photo manipulation software.

Merge Depthmaps – it may be that more interesting images can be created by combining 2 or more depth maps together.  Stereogrammer combines multiple depthmaps by a ‘closest/brightest point wins’ operation, which makes composition of multiple layers of depth images quite easy.  To use, hold down CONTROL or SHIFT to select multiple depth maps from the palette, then right-click and choose ‘Merge Depthmaps’.  A new depthmap will be created which is the superposition of all selected depth maps.  The resulting depth map will always have the same resolution as the depth map highlighted in green, which will have been the last depthmap selected.  All other depth maps will be scaled to the same size, regardless of their original size or aspect ratio.

Palette Management – Any Depth Maps, Textures or Stereograms which were present the last time Stereogrammer was closed will be restored on start up, provided they had been saved to disk and the files have not been deleted or moved.  If you find that you have too many images in your palettes, they can be removed by selecting one or more items (use CONTROL and SHIFT to multi-select) and pressing DELETE, or right-clicking and choosing the option from the menu.  Alternatively, every palette has a Clear button, which removes all items except for the built-in virtual textures.

Full-Screen View – Double-clicking any item in the preview pane will launch a full-screen view of it, as will choosing “View Full-screen” from any item’s context menu.  Preview Stereograms will be regenerated at full-screen resolution, all other stereograms or other images will simply be scaled.  Pressing any key or double-clicking on the full-screen view will return to the normal view.

Restore Settings – The settings which were used to generate a stereogram can be restored from a context menu option, or by double-clicking on a thumbnail in the Stereogram Palette.  Note that these options are NOT currently saved to disk with the streogram, so they will be lost after the program is closed, and the option will not be available for items which have been restored from a previous setting.  Choosing ‘Generate Stereogram’ on the context menu of a Stereogram will also restore the options used to generate that Stereogram, if possible.

Postscript

Stereogrammer is based on, but greatly improves, a Win95 program I developed at The University of Leeds.

8 Comments
  1. Initial release, Version 1.0.0.4 released February 14th 2012.

  2. Version 1.0.0.5 released February 14th 2012: Minor tweaks and bug fixes.

  3. Version 1.0.0.6 released February 15th 2012:

    1. Tweaks to Techmind algorithm
    2. Bug fix for saving loaded files between sessions
    3. Link to Techmind website in About Box

  4. Version 1.0.0.7 released February 15th 2012:

    1. [regression] Re-enabled parallel computation of stereogram, temporarily disabled for debugging.

  5. Verson 1.0.0.8 released February 16th 2012:

    1. Replaced ‘High Quality’ mode with oversampling up to 8x (HQ mode was only 2x). 8x produces nicer images, but can take a very long time to do so.

    2. Optimised Hidden Surface Removal for Horoptic & Constraint Satisfaction algorithms for major speed-ups.

  6. Version 1.0.0.9 released February 16th 2012:

    1. Fixed bug in Techmind algorithm which caused greater texture distortion at higher oversampling rates.

  7. Version 1.0.1.0 released February 23rd 2012:

    – Better support for catching errors
    – Fixed bug in file type selection when saving images
    – Fixed names for merged depthmaps
    – Tweak to Techmind algorithm texture application to remove/reduce texture distortion

    4shared seems to be having issues, so latest version uploaded to mediafire and filehosting.org

Trackbacks & Pingbacks

  1. Le BloGuen : voyage, plongée, image, art fractal… » Fractales en relief : anaglyphes et stéréogrammes

Leave a comment