2-D CWT App Example
This example shows how to analyze an image using the 2-D CWT app.
Load the triangle image in the MATLAB® workspace.
imdata = imread('triangle.jpg');Launch the 2-D CWT app by selecting Wavelet Design & Analysis in the Signal Processing and Communications section of the apps gallery. From the 2-D section, select Continuous Wavelet Transform 2-D. Alternatively, enter
cwtfttool2
at the MATLAB command prompt.
Select File –> Import Data to import the
imdata variable.
From the Wavelet drop down menu, select the
cauchy wavelet.
For the Angles and Scales, select the Manual option.
Click Define to specify a vector of angles. Select
Manual from the Type
drop-down list and specify a vector of angles from 0 to
7*pi/8 radians in increments of pi/8
radians, 0:pi/8:(7*pi)/8. Click Apply to
apply your choice of angles.
Click Define to specify a vector of scales from 0.5 to 4
in increments of 0.5. Select Linear from the
Type drop-down list. Set First
Scale equal to 0.5, Gap between two scales
equal to 0.5, and Number of Scales equal to 8.
Equivalently, you can select Manual from the
Type drop-down list and specify the vector of
scales as 0.5:0.5:4. Click Apply to
apply your choice of scales.
Click Analyze to obtain the 2-D CWT.
Set the Index of Scale to be 1 and click
More on Angles. Click Movie to
step through the manually-defined angles for the 2-D CWT coefficients at scale
0.5.
Select File –> Export Data –> Export CWTFT Struct to
Workspace to export the analysis to the MATLAB workspace. You can find an explanation of the structure fields in
the function reference for cwtft2.