function CI = compress(I,L,t)

[N,J] = size(I);

% Forward Wavelet Transform
[wc,s] = ...

% Threshold wavelet coefficients
temp = wc(1:(N/2^L)^2);
wc = wthresh(wc,'h',t);
wc(1:(N/2^L)^2) = temp;

% Count number of non-zero coefficients
nz = nnz(wc);

% Inverse Wavelet Transform
CI = ...

% Print out the compression ratio
...
