principal_compT_principal_compPrincipalCompPrincipalCompprincipal_comp (Operator)

Name

principal_compT_principal_compPrincipalCompPrincipalCompprincipal_comp — Compute the principal components of multichannel images.

Signature

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]]

Description

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.

The operator 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.

Attention

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.

Note that filter operators may return unexpected results if an image with a reduced domain is used as input. Please refer to the chapter Filters.

Execution Information

Parameters

MultichannelImageMultichannelImageMultichannelImageMultichannelImagemultichannelImagemultichannel_image (input_object)  (multichannel-)image objectHImageHObjectHImageHobject (byte* / direction* / cyclic* / int1* / int2* / uint2* / int4* / real*) *allowed for compute devices

Multichannel input image.

PCAImagePCAImagePCAImagePCAImagePCAImagepcaimage (output_object)  multichannel-image objectHImageHObjectHImageHobject * (real)

Multichannel output image.

InfoPerCompInfoPerCompInfoPerCompInfoPerCompinfoPerCompinfo_per_comp (output_control)  real-array HTupleSequence[float]HTupleHtuple (real) (double) (double) (double)

Information content of each output channel.

Result

The operator principal_compprincipal_compPrincipalCompPrincipalCompPrincipalCompprincipal_comp returns the value 2 (H_MSG_TRUE) if the parameters are correct. Otherwise an exception is raised.

Alternatives

gen_principal_comp_transgen_principal_comp_transGenPrincipalCompTransGenPrincipalCompTransGenPrincipalCompTransgen_principal_comp_trans

See also

linear_trans_colorlinear_trans_colorLinearTransColorLinearTransColorLinearTransColorlinear_trans_color

Module

Foundation