- Visual C++源码
- Visual Basic源码
- C++ Builder源码
- Java源码
- Delphi源码
- C/C++源码
- PHP源码
- Perl源码
- Python源码
- Asm源码
- Pascal源码
- Borland C++源码
- Others源码
- SQL源码
- VBScript源码
- JavaScript源码
- ASP/ASPX源码
- C#源码
- Flash/ActionScript源码
- matlab源码
- PowerBuilder源码
- LabView源码
- Flex源码
- MathCAD源码
- VBA源码
- IDL源码
- Lisp/Scheme源码
- VHDL源码
- Objective-C源码
- Fortran源码
- tcl/tk源码
- QT源码
wenhance.m
资源名称:wenhance.rar [点击查看]
上传用户:jxhj103
上传日期:2022-03-22
资源大小:1k
文件大小:1k
源码类别:
波变换
开发平台:
Visual C++
- 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);