User's Guide

COMPOL

Combines two images (magnitude & phase) to form a complex output image

Function:

COMPOL combines two images on a pixel-by-pixel basis to form an output image that is of complex data type, with the first input image providing the magnitude and the second providing the phase information. The first input image must contain the same number of bands as the second input image.

Parameters:

IN
First input image. May be BYTE, INTEGER*2, INTEGER*4, or REAL*4 data. IN(1) is the image providing the magnitude information. IN(2) is the image providing the phase information.

OUT
Output image. This will contain the same number of bands as in IN(1) and IN(2). Each output band will be interleaved with:

1.  every first pixel equal to u(x,y), where
          u(x,y) = IN(1)(x,y) * cos(IN(2)(x,y)) ,

2.  every second pixel equal to v(x,y), where
          v(x,y) = IN(1)(x,y) * sin(IN(2)(x,y)) ,

IN(1) is the pixel from the first image, IN(2) is the pixel from the second image, and IN(2) is in radians.

Examples:

  1. LAS> compol in=(myimg.in,img.dat) out=out.dat

    Each band in the first input multiband image, MYIMG.IN, is combined with the corresponding band in the second input multiband image, MYIMG.DAT, to produce the multiband output image OUT.DAT. If MYIMG.IN and IMG.DAT each contain four bands, then band 1 from MYIMG.IN and band 1 from IMG.DAT are combined to form the first output band in OUT.DAT; band 2 from MYIMG.IN and band 2 from IMG.DAT are combined to form the second output band in OUT.DAT, etc.

Description/Algorithm:

Two input images of any data type except complex are combined to form an output image that is a complex data type. The output image is generated from the following equation:


          u(x,y) = IN(1)(x,y) * cos(IN(2)(x,y))

          v(x,y) = IN(1)(x,y) * sin(IN(2)(x,y))

where IN(2)(x,y) is the pixel value from the second input image (in radians), IN(1) is the pixel from the first input image, u(x,y) is the real component of the complex output data, and v(x,y) is the imaginary component of the output complex data.

Nonfatal Error Messages:

    None.

Fatal Error Messages:

  1. [Compol-size] Window must be same size for IN(1) and IN(2)

    Respecify IN(1) and IN(2) with identical window sizes.

  2. [Compol-bands] IN(1) and IN(2) must have the same number of bands.

    Respecify IN(1) and IN(2) with the same band number for each .

  3. [Compole-wind] No window allowed in COMPOL.

    Respecify the input images

User's Notes:

  1. An example scenario in which COMPOL would be used is as follows:

        a)  Perform any transforms on the magnitudes.
        b)  Run COMPOL to combine modified magnitudes with original phases.
    

  2. The output complex image is actually stored as a REAL*4 image with the real and imaginary components interleaved.

  3. The input file parameter IN will not accept a window specification for the first file, but will for the second file. For example, IN=f1,f2(1,1,5,5) will be accepted, IN=f1(1,1,5,5),f2 will cause an error message.