gen_principal_comp_trans — 计算多通道图像主成分分析的变换矩阵。
gen_principal_comp_trans(MultichannelImage : : : Trans, TransInv, Mean, Cov, InfoPerComp)
gen_principal_comp_trans computes the transformation matrix
of a principal components analysis of multichannel images. This is
useful for images obtained, e.g., with the thematic mapper of the
Landsat satellite. Because the spectral bands are highly correlated,
it is desirable to transform them to uncorrelated images. This can
be used to save storage, since the bands containing little
information can be discarded, and with respect to a later
classification step.
算子 gen_principal_comp_trans takes one or more
multichannel images MultichannelImage and computes the
transformation matrix Trans for the principal components
analysis, as well as its inverse TransInv. All input
images must have the same number of channels. The principal
components analysis is performed based on the collection of data of
all images. Hence, gen_principal_comp_trans facilitates
using the statistics of multiple images.
If n is the number of channels, Trans and
TransInv are matrices of dimension n ×
(n+1), which describe an affine transformation of the multichannel
gray values. They can be used to transform a multichannel image
with linear_trans_color。For information purposes, the mean
gray value of the channels and the n × n
covariance matrix of the channels are returned in Mean and
Cov, respectively. The parameter InfoPerComp
contains the relative information content of each output channel.
请注意,若使用域缩减后的图像作为输入,滤波器算子可能会返回意外结果。请参阅 滤波器 一章
MultichannelImage (输入对象) (multichannel-)image(-array) → object (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)
Multichannel input image.
Trans (输出控制) real-array → (real)
Transformation matrix for the computation of the PCA.
TransInv (输出控制) real-array → (real)
Transformation matrix for the computation of the inverse PCA.
Mean (输出控制) real-array → (real)
Mean gray value of the channels.
Cov (输出控制) real-array → (real)
Covariance matrix of the channels.
InfoPerComp (输出控制) real-array → (real)
Information content of the transformed channels.
算子 gen_principal_comp_trans 在参数正确时返回值 2 ( H_MSG_TRUE )。否则将抛出异常。
基础