Combines two images (magnitude & phase) to form a complex output image
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.
- 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.
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.
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.
Respecify IN(1) and IN(2) with identical window sizes.
Respecify IN(1) and IN(2) with the same band number for each .
Respecify the input images
a) Perform any transforms on the magnitudes. b) Run COMPOL to combine modified magnitudes with original phases.