DimensionalityReduction

Perform Dimension reduction of the input image.

Description

Performs dimensionality reduction on input image. PCA,NA-PCA,MAF,ICA methods are available. It is also possible to compute the inverse transform to reconstruct the image and to optionally export the transformation matrix to a text file.

Parameters

Input Image -in image Mandatory
The input image to apply dimensionality reduction.

Output Image -out image [dtype]
output image. Components are ordered by decreasing eigenvalues.

Rescale Output -rescale [no|minmax] Default value: no
Enable rescaling of the reduced output image.

  • No rescale
  • rescale to min max value

rescale to min max value options

Output min value -rescale.minmax.outmin float Default value: 0
Minimum value of the output image.

Output max value -rescale.minmax.outmax float Default value: 255
Maximum value of the output image.


** Inverse Output Image** -outinv image [dtype]
reconstruct output image.

Algorithm -method [pca|napca|maf|ica] Default value: pca
Selection of the reduction dimension method.

  • PCA
    Principal Component Analysis.
  • NA-PCA
    Noise Adjusted Principal Component Analysis.
  • MAF
    Maximum Autocorrelation Factor.
  • ICA
    Independent Component Analysis using a stabilized fixed point FastICA algorithm.

PCA options

Output file containing eigenvalues (txt format) -method.pca.outeigenvalues filename [dtype]
Output file containing eigenvalues (txt format).

Perform pca whitening -method.pca.whiten bool Default value: true
Perform whitening and ensure uncorrelated outputs with unit component wise variances

NA-PCA options

Set the x radius of the sliding window -method.napca.radiusx int Default value: 1

Set the y radius of the sliding window -method.napca.radiusy int Default value: 1

ICA options

number of iterations -method.ica.iter int Default value: 20

Give the increment weight of W in [0, 1] -method.ica.mu float Default value: 1

Nonlinearity -method.ica.g [tanh|exp|u3] Default value: tanh
Nonlinearity used in the FastICA algorithm

  • tanh
    g(x) = tanh(x)
  • exp
    g(x) = -exp(-x^2/2)
  • u^3
    g(x) = u^3(x)

Number of Components -nbcomp int Default value: 0
Number of relevant components kept. By default all components are kept.

Center and reduce data -normalize bool Default value: false
Center and reduce data before Dimensionality reduction (if this parameter is set to false, the data will be centered but not reduced.

Transformation matrix output (text format) -outmatrix filename [dtype]
Filename to store the transformation matrix (csv format)

Background Value -bv float
Background value to ignore in computation of the transformation matrix. Note that all pixels will still be processed when applying the transformation.

Available RAM (MB) -ram int Default value: 256
Available memory for processing (in MB).

Examples

From the command-line:

otbcli_DimensionalityReduction -in cupriteSubHsi.tif -out FilterOutput.tif -method pca

From Python:

import otbApplication

app = otbApplication.Registry.CreateApplication("DimensionalityReduction")

app.SetParameterString("in", "cupriteSubHsi.tif")
app.SetParameterString("out", "FilterOutput.tif")
app.SetParameterString("method","pca")

app.ExecuteAndWriteOutput()

Limitations

This application does not provide the inverse transform and the transformation matrix export for the MAF. the background value option is not supported for MAF and ICA.

See also

“Kernel maximum autocorrelation factor and minimum noise fraction transformations,” IEEE Transactions on Image Processing, vol. 20, no. 3, pp. 612-624, (2011)