View License

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

» Watch video

Highlights from
P-Stage Wavelet Compression Tool

5.0 | 1 rating Rate this file 6 Downloads (last 30 days) File Size: 1.65 MB File ID: #38218 Version: 1.0
image thumbnail

P-Stage Wavelet Compression Tool


Brian Moore (view profile)


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

| Watch this File

File Information

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.

Required Products MATLAB
MATLAB release MATLAB 7.8 (R2009a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (4)
26 Mar 2015 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

Comment only
26 Mar 2015 Vasumathi Ganesh

I'm getting error on this line.

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

Comment only
18 Oct 2012 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!

Comment only
18 Oct 2012 cancan

cancan (view profile)

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

Contact us