This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

featureMatrix

Image scattering feature matrix

Syntax

smat = featureMatrix(sf,im)
smat = featureMatrix(sf,sc)
smat = featureMatrix(___,'Transform',transformtype)

Description

example

smat = featureMatrix(sf,im) returns the scattering feature matrix for the image scattering decomposition framework, sf, and the input image, im. im is a real-valued 2-D (M-by-N) or 3-D matrix (M-by-N-by-3). If im is a 3-D matrix, the size of the third dimension must be 3. If im is a 2-D matrix, smat is Np-by-Ms-by-Ns, where Np is the number of scattering paths and Ms-by-Ns is the resolution of the scattering coefficients. If im is a 3-D matrix, smat is Np-by-Ms-by-Ns-by-3.

smat = featureMatrix(sf,sc) returns the scattering feature matrix for the cell array of scattering coefficients, sc. sc is obtained from the scatteringTransform method of the image scattering decomposition framework.

smat = featureMatrix(___,'Transform',transformtype) applies the transformation specified by transformtype to the scattering coefficients. Valid options for transformtype are 'log' and 'none'. If unspecified, transformtype defaults to 'none'. You can use this syntax with any of the previous syntaxes.

Examples

collapse all

This example shows how to obtain the feature matrix for a wavelet image scattering framework.

Load the xbox image. Create an image scattering framework suitable for the image.

load xbox
sf = waveletScattering2('ImageSize',size(xbox))
sf = 
  waveletScattering2 with properties:

             ImageSize: [128 128]
       InvarianceScale: 64
          NumRotations: [6 6]
        QualityFactors: [1 1]
             Precision: "single"
    OversamplingFactor: 0
          OptimizePath: 1

Obtain the feature matrix.

smat = featureMatrix(sf,xbox);

Input Arguments

collapse all

Scattering decomposition framework, specified as a waveletScattering2 object.

Input image, specified as real-valued 2-D matrix or 3-D matrix. If im is 3-D, im is assumed to be a color image in the RGB color space, and the size of the third dimension must equal 3. The row and column sizes of im must match the ImageSize property of sf.

Scattering coefficients, specified as a cell array. sc is obtained from the scatteringTransform method of the image scattering decomposition framework.

Transformation to apply to the scattering coefficients:

  • 'none': No transformation is applied to the scattering coefficients.

  • 'log': The natural logarithm is applied to the scattering coefficients.

Output Arguments

collapse all

Scattering feature matrix for the 2-D scattering decomposition framework sf, returned as a real-valued array. If im is a 2-D matrix, smat is Np-by-Ms-by-Ns, where Np is the number of scattering paths and Ms-by-Ns is the resolution of the scattering coefficients. If im is a 3-D matrix, smat is Np-Ms-by-Ns-by-3.

Introduced in R2019a