cwtstruct = cwtft2(x) returns
the 2-D continuous wavelet transform (CWT) of the 2-D matrix, x. cwtft2 uses
a Fourier transform-based algorithm in which the 2-D Fourier transforms
of the input data and analyzing wavelet are multiplied together and
inverted.

Shows how an isotropic wavelet does not discern the orientation of features while an anisotropic wavelet does. The example uses the Mexican hat isotropic wavelet and the directional (anisotropic) Cauchy wavelet.

Load and view the hexagon image.

Im = imread('hexagon.jpg');
imagesc(Im); colormap(jet);

Obtain the scale-one 2-D CWT with both the Mexican hat and Cauchy wavelets. Specify a vector of angles going from 0 to 15?/8 in ?/8 increments.

Input data, specified as a 2-D matrix or 3-D array. If the input
data is a 3-D array, the input matrix is a truecolor image.

Example: X = imread('stars.jpg');

Data Types: double | uint8

Name-Value Pair Arguments

Specify optional
comma-separated pairs of Name,Value arguments. Name is
the argument name and Value is the corresponding value.
Name must appear inside quotes. You can specify several name and value
pair arguments in any order as
Name1,Value1,...,NameN,ValueN.

Example: 'wavelet','paul','scales',2^(0:5) specifies
to use the Paul wavelet and a vector of scales.

'angles' — Angles 0 (default) | scalar | vector

Angles in radians, specified as a comma-separated pair consisting
of 'angles' and either a scalar or a vector.

Analyzing wavelet, specified as a comma-separated pair consisting of
'wavelet' and a character vector, a string
scalar, a structure, or a cell array. cwtftinfo2 provides a
comprehensive list of supported wavelets and associated
parameters.

If you specify 'wavelet' as a structure,
the structure must contain two fields:

name — the character vector or
string scalar corresponding to a supported wavelet.

param — a cell array with
the parameters of the wavelet.

If you specify 'wavelet' as a cell array, wav,
the cell array must contain two elements:

wav{1} — the character vector or
string scalar corresponding to a supported wavelet.

wav{2} — a cell array with
the parameters of the wavelet.

The 2-D CWT, returned as a structure with the following fields:

wav — Analyzing wavelet and parameters structure

Analyzing wavelet and parameters, returned as a structure with
the following fields:

wname — name

param — parameters

wav_norm — Normalization constants matrix

Normalization constants, returned as a M-by-N matrix
where M is the number of scales and N is
the number of angles.

cfs — CWT coefficients array

CWT coefficients, returned as an N-D array. The row and column
dimensions of the array equal the row and column dimensions of the
input data. The third page of the array is equal to 1 or 3 depending
on whether the input data is a grayscale or truecolor image. The fourth
page of the array is equal to the number of scales and the fifth page
of the array is equal to the number of angles.

You can also select a web site from the following list:

How to Get Best Site Performance

Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.