principal_compT_principal_compPrincipalCompPrincipalCompprincipal_comp (算子)

名称

principal_compT_principal_compPrincipalCompPrincipalCompprincipal_comp — 计算多通道图像的主成分。

签名

principal_comp(MultichannelImage : PCAImage : : InfoPerComp)

Herror T_principal_comp(const Hobject MultichannelImage, Hobject* PCAImage, Htuple* InfoPerComp)

void PrincipalComp(const HObject& MultichannelImage, HObject* PCAImage, HTuple* InfoPerComp)

HImage HImage::PrincipalComp(HTuple* InfoPerComp) const

static void HOperatorSet.PrincipalComp(HObject multichannelImage, out HObject PCAImage, out HTuple infoPerComp)

HImage HImage.PrincipalComp(out HTuple infoPerComp)

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

描述

principal_compprincipal_compPrincipalCompPrincipalCompPrincipalCompprincipal_comp does 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.

算子 principal_compprincipal_compPrincipalCompPrincipalCompPrincipalCompprincipal_comp takes a (multichannel) image MultichannelImageMultichannelImageMultichannelImageMultichannelImagemultichannelImagemultichannel_image and transforms it to the output image PCAImagePCAImagePCAImagePCAImagePCAImagepcaimage, which contains the same number of channels, using the principal components analysis. The parameter InfoPerCompInfoPerCompInfoPerCompInfoPerCompinfoPerCompinfo_per_comp contains the relative information content of each output channel.

注意

principal_compprincipal_compPrincipalCompPrincipalCompPrincipalCompprincipal_comp can be executed on OpenCL devices if image consists of eight channels or less. Since the calculations are done in single precision floating point, the results may differ from those calculated by the CPU.

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

执行信息

参数

MultichannelImageMultichannelImageMultichannelImageMultichannelImagemultichannelImagemultichannel_image (输入对象)  (multichannel-)image objectHImageHObjectHImageHobject (byte* / direction* / cyclic* / int1* / int2* / uint2* / int4* / real*) *允许用于计算设备

Multichannel input image.

PCAImagePCAImagePCAImagePCAImagePCAImagepcaimage (输出对象)  multichannel-image objectHImageHObjectHImageHobject * (real)

Multichannel output image.

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

Information content of each output channel.

结果

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

替代

gen_principal_comp_transgen_principal_comp_transGenPrincipalCompTransGenPrincipalCompTransGenPrincipalCompTransgen_principal_comp_trans

另见

linear_trans_colorlinear_trans_colorLinearTransColorLinearTransColorLinearTransColorlinear_trans_color

模块

基础