gen_principal_comp_transT_gen_principal_comp_transGenPrincipalCompTransGenPrincipalCompTransgen_principal_comp_trans (算子)

名称

gen_principal_comp_transT_gen_principal_comp_transGenPrincipalCompTransGenPrincipalCompTransgen_principal_comp_trans — 计算多通道图像主成分分析的变换矩阵。

签名

gen_principal_comp_trans(MultichannelImage : : : Trans, TransInv, Mean, Cov, InfoPerComp)

Herror T_gen_principal_comp_trans(const Hobject MultichannelImage, Htuple* Trans, Htuple* TransInv, Htuple* Mean, Htuple* Cov, Htuple* InfoPerComp)

void GenPrincipalCompTrans(const HObject& MultichannelImage, HTuple* Trans, HTuple* TransInv, HTuple* Mean, HTuple* Cov, HTuple* InfoPerComp)

HTuple HImage::GenPrincipalCompTrans(HTuple* TransInv, HTuple* Mean, HTuple* Cov, HTuple* InfoPerComp) const

static void HOperatorSet.GenPrincipalCompTrans(HObject multichannelImage, out HTuple trans, out HTuple transInv, out HTuple mean, out HTuple cov, out HTuple infoPerComp)

HTuple HImage.GenPrincipalCompTrans(out HTuple transInv, out HTuple mean, out HTuple cov, out HTuple infoPerComp)

def gen_principal_comp_trans(multichannel_image: HObject) -> Tuple[Sequence[float], Sequence[float], Sequence[float], Sequence[float], Sequence[float]]

描述

gen_principal_comp_transgen_principal_comp_transGenPrincipalCompTransGenPrincipalCompTransGenPrincipalCompTransgen_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_transgen_principal_comp_transGenPrincipalCompTransGenPrincipalCompTransGenPrincipalCompTransgen_principal_comp_trans takes one or more multichannel images MultichannelImageMultichannelImageMultichannelImageMultichannelImagemultichannelImagemultichannel_image and computes the transformation matrix TransTransTransTranstranstrans for the principal components analysis, as well as its inverse TransInvTransInvTransInvTransInvtransInvtrans_inv. 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_transgen_principal_comp_transGenPrincipalCompTransGenPrincipalCompTransGenPrincipalCompTransgen_principal_comp_trans facilitates using the statistics of multiple images.

If n is the number of channels, TransTransTransTranstranstrans and TransInvTransInvTransInvTransInvtransInvtrans_inv 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_colorlinear_trans_colorLinearTransColorLinearTransColorLinearTransColorlinear_trans_color。For information purposes, the mean gray value of the channels and the n × n covariance matrix of the channels are returned in MeanMeanMeanMeanmeanmean and CovCovCovCovcovcov, respectively. The parameter InfoPerCompInfoPerCompInfoPerCompInfoPerCompinfoPerCompinfo_per_comp contains the relative information content of each output channel.

注意

请注意,若使用域缩减后的图像作为输入,滤波器算子可能会返回意外结果。请参阅 滤波器 一章

执行信息

参数

MultichannelImageMultichannelImageMultichannelImageMultichannelImagemultichannelImagemultichannel_image (输入对象)  (multichannel-)image(-array) objectHImageHObjectHImageHobject (byte / direction / cyclic / int1 / int2 / uint2 / int4 / real)

Multichannel input image.

TransTransTransTranstranstrans (输出控制)  real-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Transformation matrix for the computation of the PCA.

TransInvTransInvTransInvTransInvtransInvtrans_inv (输出控制)  real-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Transformation matrix for the computation of the inverse PCA.

MeanMeanMeanMeanmeanmean (输出控制)  real-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Mean gray value of the channels.

CovCovCovCovcovcov (输出控制)  real-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Covariance matrix of the channels.

InfoPerCompInfoPerCompInfoPerCompInfoPerCompinfoPerCompinfo_per_comp (输出控制)  real-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Information content of the transformed channels.

结果

算子 gen_principal_comp_transgen_principal_comp_transGenPrincipalCompTransGenPrincipalCompTransGenPrincipalCompTransgen_principal_comp_trans 在参数正确时返回值 2 ( H_MSG_TRUE )。否则将抛出异常。

可能的后继

linear_trans_colorlinear_trans_colorLinearTransColorLinearTransColorLinearTransColorlinear_trans_color

替代

principal_compprincipal_compPrincipalCompPrincipalCompPrincipalCompprincipal_comp

模块

基础