PCLT

Generate principal components linear transformation


EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Examples :: Algorithm :: Acknowledgements :: Related

Back to top

Description


Generates and saves a linear transformation matrix (and its inverse) that can be used by LINTRN to transform selected channels of the input image into principal component channels.
Back to top

Parameters


Name Type Caption Length Value range
FILI* String Input file name 1 - 192  
FILLT* String Linear transformation parameters file name 1 - 191  
DBIC Integer Input raster channel(s) 0 -    
WLENINT Float Wavelength interval 0 - 2  
VALONLY String Valid bands only 0 - 3 YES | NO
Default: NO
SAMPINT Integer Sampling interval 0 - 2 1 -
Default: 1,1
REPORT String Report mode 0 - 192 Quick links
MONITOR String Monitor mode 0 - 3 ON, OFF
Default: ON

* Required parameter
Back to top

Parameter descriptions

FILI

Specifies the name of the image file containing the channels for which the transformation is to be computed.

FILLT

Specifies the name of the MATLAB save/load format file that will be created and to which the parameters of the linear transformation will be written.

DBIC

Specifies a subset of the input channels to which the channel selection is to be restricted.

Ranges of channels or segments can be specified with negative values. For example, {1,-4,10} is internally expanded to {1,2,3,4,10}. When you are not specifying a range in this way, only 48 numbers can be specified explicitly.

WLENINT

Specifies that the selected bands are to be restricted to those whose center wavelength is either inside or outside a closed interval, specified in nanometers. By default, no restriction is applied.

The wavelength interval may be specified as follows:

This parameter has no effect if the input file contains no band center wavelength metadata.

VALONLY

Specifies whether the selected bands are to be restricted to those with "plot" or "bmask" (begin mask) quality values. The default is NO.

This parameter has no effect if the input file contains no band-validity metadata.

SAMPINT

Specifies the X and Y sampling interval within the specified input window.

REPORT

Specifies where to direct the generated report.

Available options are:

MONITOR

The program progress can be monitored by printing the percentage of processing completed. A system parameter, MONITOR, controls this activity.

Available options are:

Back to top

Details

PCLT considers an image to be a raster of image-value vectors, with one vector per pixel location. The components of these vectors are drawn from pixel values in selected channels at the same pixel location.

The forward transformation of each image-value vector consists of subtracting the mean vector from the image-value vector, then pre-multiplying the vector by the forward transformation matrix. This can be performed by LINTRN.

The mean vector subtraction and application of the linear transformation is meant to be performed using LINTRN. The application of the inverse of the linear transformation to a modified (for example, for noise removal) forward transformation result, followed by the addition of the mean vector, can also be performed using LINTRN.

Typically, the input image data for the inverse transformation is a modified version of forward-transformed channels. The modification typically consists of filtering the principal component images in which noise is concentrated. The output of the inverse transformation is typically used to replace the original input image channels with their modified (noise removed) counterparts.

Back to top

Examples

This example demonstrates noise-reduction for channels 108 to 112 of the file 'cuprad.pix'.

Compute the principal components linear transformation for channels 108 to 112 of cuprad.pix.

The replacement channels are the noise-reduced version of the orginal channels 108 to 112.

EASI>fili	=	"cuprad.pix"
EASI>fillt	=	"cuprad_pclt.mat"
EASI>dbic	=	108, -112
EASI>wlenint	=		! no wavelength interval restriction
EASI>valonly	=	''	! no band validity restriction
EASI>sampint	=		! no subsampling

EASI>RUN PCLT

Generate the forward transformed bands:

EASI>fili	=	"cuprad.pix"
EASI>filo	=	"cuprad_for.pix"
EASI>fillt	=	"cuprad_pclt.pix"
EASI>trandir	=	"for"

EASI>RUN LINTRN		

Apply a 5-by-5 averaging filter to the forward transformed channels that are dominated by noise (the last 4 out of the 5 channels):

EASI>file	=	"cuprad_for.pix"
EASI>dbic	=	2
EASI>dboc	=	2
EASI>flsz	=	5,5
EASI>mask	=
EASI>bgrange	=
EASI>failvalu	=
EASI>bgzero	=
EASI>RUN FAV

EASI>file	=	"cuprad_for.pix"
EASI>dbic	=	3
EASI>dboc	=	3
EASI>flsz	=	5,5
EASI>mask	=
EASI>bgrange	=
EASI>failvalu	=
EASI>bgzero	=
EASI>RUN FAV

EASI>file	=	"cuprad_for.pix"
EASI>dbic	=	4
EASI>dboc	=	4
EASI>flsz	=	5,5
EASI>mask	=
EASI>bgrange	=
EASI>failvalu	=
EASI>bgzero	=
EASI>RUN FAV

EASI>file	=	"cuprad_for.pix"
EASI>dbic	=	5
EASI>dboc	=	5
EASI>flsz	=	5,5
EASI>mask	=
EASI>bgrange	=
EASI>failvalu	=
EASI>bgzero	=
EASI>RUN FAV

Apply the inverse of the principal components 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_pclt.pix"
EASI>trandir	=	"inv"

EASI>RUN LINTRN
Back to top

Algorithm

The Principal Components transformation is based on computing the eigenvalues and eigenvectors of the band-vector covariance matrix. (Because this matrix is real and symmetric, finding a set of n orthonormal eigenvectors is always possible, where n is the dimension of the band-vectors).

Let us call the transformation matrix T. The first row of T is the covariance matrix eigenvector with the largest eigenvalue, the second row of T is the eigenvector with the second-largest eigenvalue, and so on. Because T is an orthogonal matrix, its inverse is its transpose.

Let x be an original band vector, m be the mean band-vector, and y be the transformation result. Then y = T*(x - m). The inverse transformation is computed according to x = (transpose(T)*y) + m.

PCLT saves the elements of T and m to the file specified by FILLT (Linear Transformation Parameters file).

Back to top

Acknowledgements

PCI Geomatics received financial support from the Canadian Space Agency/L'Agence Spatiale Canadienne through the Earth Observation Application Development Program (EOADP) for the development of this software, under contract 9F028-0-4902/12.

© PCI Geomatics Enterprises, Inc.®, 2024. All rights reserved.