Wavelet Toolbox Previous page   Next Page

Two-Dimensional Analysis Using the Graphical Interface

In this section we explore the same image as in the previous section, but we use the graphical interface tools to analyze the image.

  1. Start the 2-D Wavelet Analysis Tool.
  1. From the MATLAB prompt, type

    The Wavelet Tool Main Menu appears.

    Click the Wavelet 2-D menu item. The discrete wavelet analysis tool for two-dimensional image data appears.

  1. Load an image.
  1. From the File menu, choose the LoadImage option.

    When the Load Image dialog box appears, select the demo MAT-file wbarb.mat, which should reside in the MATLAB directory toolbox/wavelet/wavedemo. Click the OK button.

    The image is loaded into the Wavelet 2-D tool.

  1. Analyze the image.
  1. Using the Wavelet and Level menus located to the upper right, determine the wavelet family, the wavelet type, and the number of levels to be used for the analysis.

    For this analysis, select the bior3.7 wavelet at level 2.

    Click the Analyze button. After a pause for computation, the Wavelet 2-D tool displays its analysis.

Using Square Mode Features.   

  1. By default, the analysis appears in "Square Mode." This mode includes four different displays. In the upper left is the original image. Below that is the image reconstructed from the various approximations and details. To the lower right is a decomposition showing the coarsest approximation coefficients and all the horizontal, diagonal, and vertical detail coefficients. Finally, the visualization space at the top right displays any component of the analysis that you want to look at more closely.

    Click on any decomposition component in the lower right window.

    A green border highlights the selected component. At the lower right of the Wavelet 2-D window, there is a set of three buttons labeled "Operations on selected image." Note that if you click again on the same component, you'll deselect it and the green border disappear.

    Click the Visualize button.

    The selected image is displayed in the visualization area. You are seeing the raw, unreconstructed two-dimensional wavelet coefficients. Using the other buttons, you can display the reconstructed version of the selected image component, or you can view the selected component at full screen resolution.

Using Tree Mode Features.   

  1. Choose Tree from the View Mode menu.

    Your display changes to reveal the following.

  1. This is the same information shown in square mode, with in addition all the approximation coefficients, but arranged to emphasize the tree structure of the decomposition. The various buttons and menus work just the same as they do in square mode.

Zooming in on Detail.   

  1. Drag a rubber band box (by holding down the left mouse button) over the portion of the image you want to magnify.

    Click the XY+ button (located at the bottom of the screen) to zoom horizontally and vertically.

    The Wavelet 2-D tool enlarges the displayed images.

    To zoom back to original magnification, click the History <<- button.

  1. Compress the image
  1. Click the Compress button, located to the upper right of the Wavelet 2-D window. The Wavelet 2-D Compression window appears.

    The tool automatically selects thresholding levels to provide a good initial balance between retaining the image's energy while minimizing the number of coefficients needed to represent the image.

    However, you can also adjust thresholds manually using the By Level thresholding option, and then the sliders or edits corresponding to each level.

    For this example, select the By Level thresholding option and select the Remove near 0 method from the Select thresholding method menu.

    The following window is displayed.

    Select from the direction menu whether you want to adjust thresholds for horizontal, diagonal or vertical details. To make the actual adjustments for each level, use the sliders or use the left mouse button to directly drag the yellow vertical lines.

    To compress the original image, click the Compress button. After a pause for computation, the compressed image is displayed beside the original. Notice that compression eliminates almost half the coefficients, yet no detectable deterioration of the image appears.

  1. Show the residuals.
  1. From the Wavelet 2-D Compression tool, click the Residuals button. The More on Residuals for Wavelet 2-D Compression window appears.

    Displayed statistics include measures of tendency (mean, mode, median) and dispersion (range, standard deviation). In addition, the tool provides frequency-distribution diagrams (histograms and cumulative histograms). The same tool exists for the Wavelet 2-D De-noising tool.


Previous page  Two-Dimensional Analysis Using the Command Line Importing and Exporting Information from the Graphical Interface Next page

© 1994-2005 The MathWorks, Inc.