Environments | PYTHON :: EASI :: MODELER |
Quick links | Description :: Parameters :: Parameter descriptions :: Details :: Examples :: Related |
Back to top |
Back to top |
Name | Type | Caption | Length | Value range |
---|---|---|---|---|
FILI* | String | Input file name | 1 - 192 | |
FILO* | String | Output file name | 1 - 192 | |
FILLT* | String | Linear transformation parameters file | 1 - 192 | |
TRANDIR | String | Transformation direction | 0 - 3 | FOR | INV Default: FOR |
Back to top |
FILI
Specifies the name of the image file containing the channels to be linearly transformed.
FILO
Specifies the name of the image file to receive the linearly transformed channels.
FILLT
Specified the name of the MATLAB binary save/load format file that contains the parameters of the linear transformation.
TRANDIR
Specifies the direction of the linear transformation.
Back to top |
LINTRN applies a linear transformation, plus an optional 'shift' to a list of channels from the input image file, and writes the transformation results to the output image file as one or more channels. The list of channels and the transformation parameters are read from the specified linear transformations parameter file (FILLT).
Each pixel (X,Y) location coincides with an input vector to be transformed, where the first component of the vector is the image value in the first listed channel at that location, the second component of the vector is the image value in the second listed channel at that location, and so on. The vector produced by the transformation is written to the output image at the same pixel location from which the input vector was drawn.
Forward Transformation
The forward linear transformation results are written to 32-bit-per-pixel floating point channels in an output PCIDSK file. If the specified output file does not already exist, it is created.
If the forward transformation matrix has N columns, the input vectors must have N components, and the channel number vector (read from the linear transformation parameters file) will have N components. Each component of the channel number vector must be the number of a channel in the input data set. Component i of the channel number vector is the number of the channel from which component i of the input vectors is read.
If the linear transformation parameter file contains a 'shift' vector, that vector is subtracted from the input vectors before they are linearly transformed. This supports those transformations that require a mean vector to be subtracted from the input vectors before they are pre-multiplied by the transformation matrix.
If the forward transformation matrix has M rows, the output vectors will have M components. If the output PCIDSK file does not exist, one is created with M pixel-interleaved floating point (32R) channels and with the same X and Y dimensions as the input image. If the output file does exist, it must contain at least M channels (not necessarily floating point valued) with the same X and Y dimensions as the input data set. The transformed image data are written to the first M channels of the output file vector component index order.
Inverse Transformation
The input is read from channels in a PCIDSK file. The inverse linear transformation results are written to channels of an existing image file containing explicit-format (that is, not vector-quantized) image data.
If the inverse transformation matrix has N columns, the input vectors must have N components. The input vectors are read from the first N channels of the input image file.
If the inverse transformation matrix has M rows, the output vectors will have M components. The channel number vector (read from the linear transformation parameters file) has M components. Each component of the channel number vector must be the number of an channel existing in the output file. Component i of the output vectors will be written to the channel whose number is in component i of the channel number vector.
If the linear transformation parameters file contains a 'shift' vector, that vector is added to the output vectors before they are written to the output file.
Back to top |
This example demonstrates noise-reduction for channels 108 to 112 of the file 'cuprad.pix'. The application of LINTRN is part of this process.
Compute the maximum/minimum autocorrelation factors (MAF) linear transformation for channels 108 to 112 of 'cuprad.pix':
EASI>FILI = "cuprad.pix" EASI>FILLT = "cuprad_mnflt.mat" EASI>DBIC = 108,-112 EASI>WLENINT = ! default to no wavelength interval restriction EASI>VALONLY = ! default to no band validity restriction EASI>SAMPINT = ! default to no subsampling EASI>NOISSRC = "MAF" ! max/min autocorrelation factors EASI>MAFDEL = ! delta=(1,1) by default EASI>FILNIM = EASI>DBIW = EASI>REPORT = "cuprad_mnflt.txt" EASI>RUN MNFLT
Generate the forward transformed bands.
The replacement channels are the noise-reduced version of the orginal channels 108 to 112.
EASI>FILI = "cuprad.pix" EASI>FILO = "cuprad_for.pix" EASI>FILLT = "cuprad_mnflt.mat" EASI>TRANDIR = "for" EASI>RUN LINTRN
Apply a 5-by-5 averaging filter to the forward transformed channels that are dominated by noise (the first 4 out of the 5 channels).
EASI>FILE = "cuprad_for.pix" EASI>DBIC = 1 EASI>DBOC = 1 EASI>FLSZ = 5,5 EASI>MASK = EASI>RUN FAV EASI>FILE = "cuprad_for.pix" EASI>DBIC = 2 EASI>DBOC = 2 EASI>FLSZ = 5,5 EASI>RUN FAV EASI>FILE = "cuprad_for.pix" EASI>DBIC = 3 EASI>DBOC = 3 EASI>FLSZ = 5,5 EASI>RUN FAV EASI>FILE = "cuprad_for.pix" EASI>DBIC = 4 EASI>DBOC = 4 EASI>FLSZ = 5,5 EASI>RUN FAV
Apply the inverse of the MNFLT transformation to the altered forward transformation results, and replace channels 108 to 112 in a copy of 'cuprad.pix' named 'cuprad_inv.pix' with the inverse transformation results.
EASI>FILI = "cuprad_for.pix" EASI>FILO = "cuprad_inv.pix" EASI>FILLT = "cuprad_mnflt.mat" EASI>TRANDIR = "inv" EASI>RUN LINTRN
© PCI Geomatics Enterprises, Inc.®, 2024. All rights reserved.