User's Guide

OVERLAY

Creates an output image from the logical relationship between two input images

Function:

Creates an output image based on the logical relationships between two input images. The input images must be BYTE images of the same size and number of bands. The output image is a BYTE image of the same size and number of bands as the input images.

The dynamic tutor for OVERLAY requests values for GREYRANG, LOGICOP, and GREYOUT. To use the dynamic tutor, specify these values with the RUN command:

              RUN GREYRANG=(x,y,z,w) 
              LOGICOP=OR 
              GREYOUT=n,
or type TU to get a tutor screen for the parameters. When all three variables have been specified, type RUN. This will initialize the first of 16 possible logical relationships to be checked by OVERLAY. Specify GREYRANGE, LOGICOP, and GREYOUT again and type RUN to initialize the second of the 16 possible relationships to be checked by OVERLAY. When all desired logical relationships have been specified and initialized with the RUN command, type EXIT to run the main program.

NOTE: If, for some reason, you wish to leave the dynamic tutor without running the program, type EXIT before entering any of the above values.

Parameters:

IN
Input images. Both must be BYTE images having the same size and number of bands.

OUT
Output image. It will be a BYTE image of the same size and number of bands as the input images.

BACKGRND(255)
Background value. Background values (0 through 255) for pixels not categorized by input grey values.

  = -1:  Pixel values of the first image are used
  = -2:  Pixel values of the second image are used

Example:

  1. LAS> overlay in=(image1,image2) out=imageo backgrnd=255

    The program prompts for the following parameters through the dynamic tutor:

    LAS-OVRLRNG> RUN GREYRANG = (7 10 9 53) LOGICOP = AND GREYOUT = 2

    LAS-OVRLRNG> RUN GREYRANG = (3 3 57 112) LOGICOP = OR GREYOUT = 3

    LAS-OVRLRNG> EXIT

    If the pixel value of IMAGE1 lies in the grey range of 7 through 10 and the corresponding pixel value of IMAGE2 lies in the range of 9 through 53, the corresponding pixel of IMAGEO is set to a grey value of 2. If the pixel value of IMAGE1 is equal to 3 or the corresponding pixel value of IMAGE2 lies in the range of 57 through 112, the corresponding pixel in IMAGEO is set to a value of 3. All undetermined pixels of IMAGEO are set to 255.

Description/Algorithm:

OVERLAY produces an output BYTE image based on the logical relationship between two input BYTE images. The input images must have the same size and number of bands. The output image has the same size and number of bands as that of the input images.

The user specifies, through dynamic tutor, the grey-level ranges of the input images, logical operator AND or OR, and the grey value of the output image (see OVRLRNG User's Guide). For each band, the program examines the input images pixel by pixel in a sequence. If the input pixel value lies in the specified ranges, then, according to the logical operator AND or OR, the corresponding output pixel value is set to the specified output grey level. Otherwise, the output pixel value is set equal to the background if the background is in the range 0-255. If the background value equals -1 (or -2), then the output pixel values are set to the corresponding pixel values of the first (or second) input image. Up to 16 logical relationships can be specified.

Nonfatal Error Messages:

    None.

Fatal Error Messages:

  1. [overlay-nbands] Input images must have the same number of bands

    The first input image has a different number of bands than the second input image.

  2. [overlay-type] Input image is not byte data type.

    The data type of the input image(s) must be BYTE.

  3. [overlay-size] Input images are not of same size

    The input images or windows, if used, must be the same size.

  4. [overlay-none] No values entered

    No values were entered in the dynamic tutor session.

User Note:

  1. OVERLAY tests each logical relationship in the same order in which it is specified during dynamic tutoring. The first logical relationship that is satisfied causes an output pixel to be written and a new input pixel to be examined.