Temporary quick help to start

& Didier Leboutte

(Remark : there is now no more limitation to 512x512 pixels for the final image size.)
Only final image sizes of the kind 2^n are possible : 128, 256, 512, 1024, 2048, ...
Many thanks to Robin Bing-Yu Chen for this wonderful OpenGL library

Thanks to Jeremy Hinton for his "how to" !
Thanks to David Sykes for his participation to this page (text and images) ! He also provides Masuji Suto with the English documentation for StereoPhoto Maker and StereoMovie Maker.


- you draw a depth map with the mouse, or you load an existing depth map (produced for example from image stacks using programs such as CombineZ or Image Analyzer).
- AnaBuilder uses this depth map to produce a 3D model of the original 2D image
- AnaBuilder then takes 2 photographs of this 3D model to make a stereo view of it

Example of a conversion using a calculated depthmap on a calculated image :

2D image obtained from a scene by Nathan Ryan in Art of Illusion :


2D depthmap calculated with a script I wrote in Art of Illusion (ask me if you want it) :


Screenshot of the 2D->3D->Stereo Sculptor in action :

(save image and reload it in an image viewer to see it full size)

An other Screenshot of the 2D->3D->Stereo Sculptor in action with the profiling tool :

(save image and reload it in an image viewer to see it full size)

Stereo obtained with a 300x300 depth grid. You can see small artefacts on the hidden parts, but this is quite normal since these parts are not visible on the original 2D image :

(save image and reload it in an image viewer to see it full size)

(Of course AnaBuilder can use Art of Illusion to calculate the 2 views of the stereo from the 3D model, but this was not the goal here ! You can have such a stereo on the StereoBee website : http://stereobee.free.fr)

Another example, with hidden-parts removal, from a scene by Julian MacDonald :


Example of a conversion using a calculated depthmap from photographic images :

Thanks to Alan Hadley (author of the CombineZ freeware) who provided me with this image and it's corresponding depthmap, and thanks to David Sykes who "negotiated" it for me.

The color-rescaled depthmap, with its original noise (it can be manually removed, but in this demo I leave it like it was given to me).


Screenshot of the 2D->3D->Stereo Sculptor in action, with a navigation view. You can see the 3D-shape effects of noise points from a very close point of view :

(save image and reload it in an image viewer to see it full size)

Stereo obtained with a 500x500 depth grid. Even with the original noise, it is not too bad :

(save image and reload it in an image viewer to see it full size)

How to :

(from Jeremy Hinton)

Here follows a bit of a walk-through for the Anabuilder 2D-3D conversion.


The aim of the function is to create a stereo image (anaglyph or pair) with different parts of the image at different depths, from a simple 2D image or an image and associated depthmap.
The program loads the start image as the 'left' image, and calculates the new left and right ones to obtain the stereo conversion.

Menu selection commands are in [square brackets] below. I would try it quickly (ie not accurately) to start with just to get familiar with the process, and with what '2D->3D-> Stereo Sculptor' will do.

Here we go:

TIP: Select a fairly small image with relatively few, obvious, depth planes to start with :*)

1) Open anabuilder
2) Open your start image in Anabuilder [File - Open left]
3) Open 2D->3D-> Stereo Sculptor [Tools -> Experimental -> '2D->3D-> Stereo Sculptor']

A new window should open;

New Window Description:

Starting image appears on the left, under a grid of 50*50 'depth nodes'. An oblique view appears on the right (this is currently flat, as the image is all at the same depth, and the depth is set to 0.0)

4) Select depth to change to in top left hand box. (default value is 0.5, values can be anything, but between -1 and +1 is best).

TIP: 0.5 is good, as you can see what is going on with a big depth difference.

5) Select points on the image which you want to move to the depth chosen in 4).

TIP: For an image with a large 'background', I just applied the depth change to foreground areas (this means that my image all comes forward, so I have to reset the 'window' later [in Anabuilder], but for now it means that a lot less selecting has to be done!). You can do it point- by point or by dragging the mouse (left button down) over an area (much quicker).

TIP: You have to drag the mouse over each 'node' rather than doing an 'area select', but it is very quick. You should be able to see the nodes change graylevel as the mouse passes over.

When you release the mouse button, the calculation proceeds, and you can see the result in the oblique view.

TIP: It is best to work from the RHS of the image, so that on the oblique view, parts which come forward do not obscure the image behind them (although you can rotate the oblique view to see anywhere, eg by changing the value in 'ry', followed by clicking the '<-' button.)

6) Select 'change depth ' values to set each layer you want in the final image Select the areas you want to apply to those layers

Repeat 6 for each layer (eg if you have a picture of a billboard in the foreground, and a plain background, just allocate one depth layer - to the billboard. Most scenes are more complicated and will require more depth layers). I chose depth layers in steps of 0.01. The default depth of 0.5 is a BIG depth change from the background.

When you have mapped the depth of your whole image, export it to Anabuilder using the [Stereo, angle =] button.

>From there, you can view it as an anaglyph, reset the window if necessary, and save as anaglyph or left/right pair.

Caution: Once you close the '2D->3D-> Stereo Sculptor' window, you cannot go back and readjust areas.

All the best,


Additional TIPs

- shift + drag mouse = draw a selection zone.
- shift + click mouse = reset selection zone.

- rather than click or drag with the mouse over the depth grid, you can use the "profiling" mode (see in the selector at the top left of the panel). In this mode, you can draw a profile for only one column, and then copy it from one column to the next one, doing small changes at each step. Modification of a column (displayed green) can be made comparing it with the previous and the next one (displayed red and blue).

-  The depth map is displayed from the common "-1=black" to "1=white" depth values. But, when you are working on a sub-part between for example 0.4 and 0.6, you no more well see the variations between gray values. So, you can ask to display only from "0.4=black" to "0.6=white" to get a new rescaled gray visualisation. The "auto" button set the "actual min value=black" and "actual max value=white".
- "Hue" is just on other way to display the depth map. Variations from colors to colors are sometimes more easy to view than just grayscale.

- you can save a grayscale depth map, and then reload it at any time. You can use this either to store an intermediate step, or to change the resolution of the grid. For example : start with a 50x50 grid, build a first depth map and save it. Ask for a 200x200 map and reinit all, you then get back a flat grid. Ask to reload the previous saved grayscale map : you get it back at the new 200x200 resolution.

- you can also build the whole depth map with an other tool (such as CombineZ or Image Analyzer), and load it at any precision.

- when you are asking to export both left and right views are calculated, each being a photograph of the 3D surface rotated from a changeable angle (5 degres by default)..

- the 3D view of the 2D->3D->Stereo Sculptor is navigable : it is possible to move into and see from as near as you want all details of  the 3D conversion.
    select the "Nav." mode in the bottom right
    + and - to zoom
    arrows to move vertically or horizontally
    the mouse, or numerical infos in the top fields, to rotate