function [S,HW,WH,WW] = denocwt2d(ld,hd,J,iman,vr,vg,vb)
%%%%
%%iman:     noisy image
%%vr,vg,vb: noise levels for R, G and B channels
HW=cell(1,J);
WH=HW;WW=WH;

hh=1;
for j=1:J
   hf=padf0(ld,j);
   gf=padf0(hd,j);
   
   ww=conv2(hh,gf);ww=conv2(ww,gf');
   wh=conv2(hh,gf);wh=conv2(wh,hf');
   hw=conv2(hh,hf);hw=conv2(hw,gf');
   
   hh=conv2(hh,hf);hh=conv2(hh,hf');
   
   WH{j}=denbayer1(iman,wh,vr,vg,vb,j);
   WW{j}=denbayer1(iman,ww,vr,vg,vb,j);
   HW{j}=denbayer1(iman,hw,vr,vg,vb,j);   
end

S=conv2(iman,hh);