The program is intended for 2D to 3D conversion. The program converts a flat image to several stereo viewpoints, that are used for lenticular image creating. Two viewpoints are used for creating one anaglyph image.
2D to 3D conversion is done, as a rule, in the Photoshop program: the scene is divided on layers, front and back plans are neatly sliced, moved, deformed, drived one to another, drew, etc. This procedure is complex and requires a good knowledge of Photoshop. It's impossible to create a fully automatical 2D to 3D conversion program. 2D to 3D conversion is always a combination of manual and automatical labour. The Bas-relief program may simplify the process of 3D lenticular image creating basing on a flat image.
When looking at the 2D photo, we condider the darkest areas as the most distant, and the brightest ones as closest to us. This brings us to idea of creating the program, which shifts picture's areas depending on their luminosity, thereby creating few 3D viewpoints. The program opens two images: one is a coloured flat image, the other is its depth map, which shows us what areas are closer to us, and what are more distant. The white area is located at the foreground, the black one is at the background. Thereby, the general task is the acceptable depth map creating.
Certainly, the quality of 3D viewpoints created by Bas-relief, can't contend with the quality of 3D viewpoints made by a 3D camera or 3D Studio Max. As we can't see the dark side of the moon we can't see a hidden side of an object the object to other side Bas-relief. So our program is called Bas-relief, in analogy with a bas-relief.
Windows 98/NT4/2000/XP.
Fig. 1. Program interface
We load two images: one is a coloured flat image(Image), another is its depth map created by a special way (depth map). Both images must be in RGB colour mode. The program reads the files in BMP, PNG, TIFF, JPEG format, and writes in BMP, PNG, TIFF.
![]() | ![]() |
Fig. 2. Depth map smoothing = 0
![]() | ![]() |
Fig. 3. Depth map smoothing = 3
When choosing Preview anaglyph image Bas-relief will show the resulting image using the viewer.
Click on the button Anaglyph image to create anaglyph image.
Click on the button ViewMaster to create ViewMaster stereo pair.
Click on the button Lenticular viewpoints to create viewpoints for lenticular image. Name the file, and the program will create names for all the sequence using your base name and a number, e. g.: file1.bmp, file2.bmp, file3.bmp etc. File1.bmp corresponds to the left eye image.
Click on the button Integral viewpoints to create viewpoints for integral lenticular sheet. The program will create the sequence: file11.bmp, file12.bmp, file13.bmp, file21.bmp, file22.bmp, file23.bmp etc.
Fig. 4. Smoothing dialogue interface
This dialogue is intended for smoothing of the depth map. A custom algorithm
is used here, that doesn't blur the image's outline. In the beginning one needs
to create an outline image, setting necessary outline level (Outline image
level). Lower values of the outline level mean that lighter outlines
will be emphasized:
![]() | ![]() |
outline level = 50 | outline level = 20 |
Fig. 5. Outline images
Buttons Smooth depth map smooth
the depth maps. Before you need to set the Smoothing degree. Newly created files have a suffix
New in their names.
![]() | ![]() |
depth map before smoothing | depth map after smoothing |
Fig. 6. Smoothing without outline
blurring. Smooth level = 50
Button Open depth map open new depth map instead old. Look at two anaglyphical images before and after smoothing:
![]() | ![]() |
before smoothing | after smoothing |
Fig.7. Anaglyphical images before and after smoothing
Before you begin, you need to create the depth map for the flat coloured image.
![]() | ![]() |
Fig. 4. depth map image sample
For a landscape (to the left) the depth map (to the right) has been created as follows: the image was desaturated, then inverted, then "autocontrasted". We have got the depth map: the front hills have white colour and, consequently, will be situated on foregrounds; the sky have a dark colour and will be put on background. Look at the anaglyph images with different parallax between front and back plans:
![]() |
![]() |
Fig. 5. Anaglyph images with different parallax
There are five viewpoints for lenticular images:
Fig. 6. Five viewpoints for lenticular images (animation)
You cannot convert any flat picture into a three-dimensional one in the same way easy and quickly. The images of the other type require serious work for the depth map creating.
If the target image is black, source files are not in RGB colour mode (perhaps in Greyscale, Indexed Colour, CMYK). The source files must be always in RGB.