User's Guide

STEREO

Stereo Pair Generator

Function:

Program STEREO creates a left stereo pair complement image for either a single- or multi-band input image. This input image is shifted using elevation data if available or the intensity values of the input image when elevation data is not available.

There can be two types of input images. The first is the image for which the stereo pair complement is to be created. The second is an optional modulating image which usually contains elevation data. There is one output image, containing the same number of bands as the input image, which is used to store the stereo pair complement.

A stereo pair complement may optionally be created for a window of the input image. However, the modulating image and windows must be the same size as the input image and window.

A shift parameter may also be specified indicating the maximum allowable pixel shift. the larger the number, the more parallax is introduced and, consequently, the more vertical exaggeration there appears to be between different elevations. To obtain an accurate elevation distinction, subtract the minimum elevation of the image from the maximum elevation and divide by the pixel size (see definition of the SHIFT parameter).

Parameters:

IN1
Input image. The input image may contain BYTE, INTEGER*2, INTEGER*4, or REAL*4 data. Window and/or band options may be specified.

IN2(--)
Modulating image. The modulating image may contain BYTE, INTEGER*2, INTEGER*4, or REAL*4 data. A window and/or band option may be specified; however, the modulating image specification may contain a maximum of one band.

OUT
Output image. The output image will be of the same data type and contain the same number of bands as the input image.

SHIFT(10)
Maximum pixel shift. If a greater vertical exaggeration is desired, increase the value of SHIFT. Once SHIFT exceeds 20, the vertical exaggeration may become too excessive.

Example:

  1. LAS> stereo in1="stereo.in(200,250,100,150:2,3,4,6)" in2=test.dem out=stereo.img

    Using the parameters specified above, STEREO executes using a window of STEREO.IN beginning at line 200 of sample 250. This window contains 100 lines and 150 samples per line. Only bands 2,3,4, and 6 of the input image are used. The modulating image is TEST.DEM, and the output image name is STEREO.IMG. Because SHIFT is not specified, STEREO defaults to 10.

Description/Algorithm:

The basic algorithm consists of accepting either elevation or intensity data from which a particular pixel value shift is determined. The higher the elevation or intensity, the more the value is shifted. The second input image is used in modulating the first image; otherwise the high and low intensity values of the first image provide the modulating data. When the image in which the pixel values have been shifted is paired with the original image and viewed through a stereoscope, the illusion of a three-dimensional image is created. (A graphic example of how the image is shifted is shown below in Figure 1.) The upper Line represents the original image with hills of 2 different elevations. The lower Line shows the stereo pair image after the values have been shifted. Note how the higher elevation is shifted more than the lower elevation. These two images are paired together to create the three-dimensional image.

                        /\\
                       /  \\           
                      /    \\              /\\
                     /      \\            /  \\
    ________________/        \\__________/    \\______________

                            /\\
                           /  \\
                          /    \\              /\\
                         /      \\            /  \\
     ___________________/        \\__________/    \\___________
                   |    |              |    |
                   |--->|              |--->|

                  
	            Figure 1. Sample Image Shift           

Nonfatal Error Messages:

    None.

Fatal Error Messages:

  1. [stereo-getpar] Input and modulating image are different sizes.

    Indicates that an error was made either in specifying a window or in specifying one of the image names, resulting in image size differences.

  2. [stereo-getpar] Modulating image may contain only one band.

    Indicates that the user specified a modulating image containing more than one band.

User Notes:

  1. More than one image may be used as input.

  2. Only ONE modulating image may be specified.

  3. The modulating image MUST be the same size as the input image.

  4. The input and modulating images may be windows of images.

  5. When no modulating image is specified, the intensity values of each band of the input image are used to calculate each band of the stereo pair complement.