⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 wenhance.m

📁 包内提供了Contourlet和Wavelet变换进行图像增强、去噪的各种算法和.m文件
💻 M
字号:
function y{1:wl+1}{:}=wenhance(im,y{1:wl+1}{:},wl) 
[co,s] = wavedec2(im,wl,'db1');
lrow = s(1,1);
lcol = s(1,2);
s1p = s(1,1)*s(1,2);
for i=2:wl+1 
    scl=wl-i+2;    % is the coefficients of scale wl-i+2
    if i==2
       s2p=s(2,1)*s(2,2);
       d=positionh(co,s2p,s1p);
       hf=s1p; %record the position of ch's first element
       ch=reshape(d,lrow,lcol);
       d=0;
       d=positionh(co,s2p,s2p+s1p);
       vf=s1p+s2p;
       cv=reshape(d,lrow,lcol);
    else
        hrow=s(i,1);
        hcol=s(i,2);
        and=account(s,wl,i);
        b=s1p+3*and;
        sclp=s(i,1)*s(i,2);
        d=positionh(co,sclp,b);
        hf=b;
        ch=reshape(d,hrow,hcol);
        d=0;
        d=positionh(co,sclp,b+sclp);
        vf=b+sclp;
        cv=reshape(d,hrow,hcol);
    end
        g=sqrt(ch.^2+cv.^2);
        mj=700; 
        c=3;
        p=0.4;
        [chr,chl]=size(ch);
        for i=1:chr
          for j=1:chl
            if g(i,j)<c
               ex=(mj/c)^p;
           elseif g(i,j)>=mj
               ex=1;
           else ex=(mj/g(i,j))^p;
           end
           ch(i,j)=ex*ch(i,j);
           cv(i,j)=ex*cv(i,j);
           co(hf+(j-1)*chl+i)=ch(i,j);
           co(vf+(j-1)*chl+i)=cv(i,j);
          end
        end
end
y{1:wl+1}{:} = vec2pdfb(co, s);



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -