Applies a matrix of coefficients to the input image
Applies a set of coefficients to an input image using matrix algebra performing the following operation:
AX = Y where: A: is a matrix of coefficients, one for each band of the input image X: is the input image Y: is the output imageThe module can apply up to 100 coefficients in one execution. These can be applied as a 10 x 10 matrix, a 1 x 100 matrix, or any combination of up to 100 coefficients.
- IN
- Input image. The input image may be BYTE, INTEGER*2, INTEGER*4, or REAL*4 and must have at least the same number of bands as the second dimension of the MATDIM parameter.
- OUT
- Output image. The output image maybe a multi-band image that has the number of bands exactly equal to the first dimension of the MATDIM parameter. The data type will be that specified in the ODTYPE parameter.
- MATDIM
- Matrix dimension. This is a two dimensional parameter indicating the size of the matrix. The first value is the number of rows followed by the second indicating the number of columns.
- MATVAL
- Matrix values. A single dimensional array containing the matrix values. The values should be entered by rows starting at row 1 column 1 and going to the last row and last column as specified by MATDIM.
- ODTYPE(SAME)
- Output data type. The data type of the output image.
= SAME: Same as input = BYTE: BYTE (8-bit unsigned integer) (0 through 255) = I*2: INTEGER*2 (16-bit signed integer) (-32768 through 32767) = I*4: INTEGER*4 (32-bit signed integer) (-2147483648 through 2147483647) = R*4: REAL*4 (32-bit signed real) (System dependent)
A 3 x 3 matrix is applied to the MADTOWN.TM image which consists of three bands to produce an image (MADTOWN.FILT) of three bands of type BYTE.
The first band of MADTOWN.TM is multipled by .5 creating MADTOWN.OUT.
The six bands of MADTOWN.TM are multiplied by the coefficents in MATVAL to produce a three-banded image titled MADTOWN.TAS. This image is a REAL*4 image which is essentially the same image as if the module TASSELCP were run with the same coefficients.
The module retrieves the input parameters, determines the size of the coefficient matrix, checks the number of coefficients, and certifies that the input image is valid. It then performs the following operation using matrix algebra:
AX = Y where: A: is a matrix of coefficients, one for each band of the input image X: is the input image Y: is the output imageThe expanded version of the equation would be:
__ __ __ __ __ __ | | | | | | | A(1,1) A(1,2) ... A(1,N) | | X(1,1) | | Y(1,1) | | A(2,1) A(2,2) ... A(2,N) | | X(2,1) | | Y(2,1) | | . . . | | . | | . | | . . . | | . | = | . | | . . . | | . | | . | | A(M,1) A(M,2) ... A(M,N) | | X(M,1) | | Y(M,1) | |__ __| |__ __| |__ __|For a two-band image with four input coefficients in a 2 x 2 matrix, the algorithm is:
__ __ __ __ __ __ | | | | | | | A(1,1) A(1,2) | | inband1 | | outband1 | | A(2,1) A(2,2) | | inband2 | = | outband2 | |__ __| |__ __| |__ __| or A(1,1) * inband1(x,y) + A(1,2) * inband2(x,y) = outband1(x,y) A(2,1) * inband1(x,y) + A(2,2) * inband2(x,y) = outband2(x,y) where: x and y are the line and sample.
A nonfatal error occurred during the processing of the history information.
The minimum and maximum information within the DDR file could not be updated.
An error occurred in closing the image files.
Unable to get input image.
Message indicates that the number of lines or samples in image IN are not equal. To correct the error, use the window option to indicate the lines and samples to be used.
Unable to get output image.
Unable to open input image. Verify that the image exists.
Unable to open output image. Check the syntax of the output image name.
Cannot access dynamic memory buffer.
The bands entered do not correspond to the size of the matrix.
The values entered do not correspond to the size of the matrix.