1

I am trying to apply lifting scheme version haar to an image. I started to apply it using the code posted on the internet:

   image = imread('cameraman.tif');
   % Applying Lifting scheme
   lshaar = liftwave('haar');
   els = {'p',[-0.125 0.125],0};
   lsnew = addlift(lshaar,els);
   [cA,cD] = lwt(image,lsnew);

In fact the code above apply a lifting Haar wavelet of LEVEL1. How can I modify this code in order to apply 2 or 3 levels of lifting Haar wavelet?

Any help will be very appreciated!

Christina

Christina
  • 903
  • 16
  • 39

2 Answers2

1

A little late, but here is your answer (or read http://de.mathworks.com/help/wavelet/ref/lwt.html)

lshaar = liftwave('haar');
level = 2;
[cA,cD] = lwt(x,lshaar,level);
Hubi
  • 1,629
  • 15
  • 20
1

You try to apply 1-D lwt to an image which is 2-D, and that give you a wrong answer.
You should use lwt2 instead.