File Exchange

image thumbnail

P-Stage Wavelet Compression Tool

version 1.0 (1.65 MB) by

Performs P-Stage Wavelet Compression on an input image and compares the fidelity of the i/o images.



View License

This package contains a function that performs P-Stage Wavelet compression on an input grayscale or color image and then displays

1) the original image
2) its wavelet transform
3) the compressed wavelet transform
4) the reconstructed image

as subplots in a figure so that the user can compare the fidelity of the compressed and original images.

The function allows the user to adjust the image compression from 0% to 100% to observe the effects of image compression on a wavelet-transformed image. It also allows the user to vary the P-value of the wavelet transform to observe the compressibility increases as the wavelet transform is iterated multiple times.

Supported wavelet types are:

1) Haar wavelets
2) Shannon wavelets
3) Daubechies 'D6' wavelets

This function also implements a number of different computational techniques for performing the P-Stage Wavelet transform:

1) Matrix multiplication (recursive)
2) Fast convolution (recursive)
3) Nonrecursive formulation

The user is encouraged to compare the speed, numerical stability, and compression fidelity of these different techniques.

Comments and Ratings (4)

Brian Moore

Brian Moore (view profile)

@Vasumathi: You're not using the correct input syntax... Type "help PStageWavelets" and look at the Syntax section to see all supported input methods.

For example, trying running the code from my Oct 2012 comment

I'm getting error on this line.

Error using PStageWavelets (line 67)
Not enough input arguments.

Brian Moore

Brian Moore (view profile)

Sure, try running it like this:

imageStr = 'lena_color.png'; % image name
iter = 2; % number of wavelet iterations
cf = 0.94; % compress 94% of the wavelet coefficients
type = 'D6'; % use Daubechies D6 wavelets

This will compute the Daubechies 'D6' wavelet coefficients (iterated twice) of the color image 'lena_color.png', zero out the smallest 94% of the wavelet coefficients in absolute value, and reconstruct the original image from the compressed coefficients.

Hope this helps!


cancan (view profile)

Superb.Can you give us an example of setting the parameters of the function PStageWavelets ?…Thank you.

MATLAB Release
MATLAB 7.8 (R2009a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video