You are on page 1of 3

ISBN 978-952-5726-11-4 Proceedings of the Third International Symposium on Electronic Commerce and Security Workshops(ISECS 10) Guangzhou, P. R.

China, 29-31,July 2010, pp. 143-145

The Wavelet Decomposition And Reconstruction Based on The Matlab


Zhao Hong-tu, Yan Jing College of Computer Science & TechnologyHenan Polytechnic UniversityJiaoZuo, China Email: {HT-ZHAO, limeiou034311}@163.com,
Abstractwe introduce mainly that the wavelet analysis is used by Matlab. Through the analysis of the basic Haar wavelet function we can understand that the detailed process of its decomposition and reconstruction .Then we can get the graphics of decomposition and reconstruction through Matlab. At last, we compare the original graphic with reconstruction. Index Term MATLAB; Wavelet; Decomposition; Haar wavelet function; Reconstruction

specifically, we will introduce the multistage decomposition diagram and multistage decomposition algorithm, so that we can get more profound understanding from the multistage decomposition of wavelet.
g' aj 2 dj-1

aj-1

I.

INTRODUCTION

h'

g'

dj-2

MATLAB language is the most influential in the international science. At the same time, it is the most dynamic software. MATLAB is also more and more widely in mathematics calculation outside of science and engineering application fileds, especially in communications. Communication system simulation of matlab can be used in the constructing inconvenience, but operation easily. At the same time, Many special toolbox and modules is provided. In 1986, Meyer constructed with certain decay of smooth functions accident and creatively, so that the wavelet analysis changed and get a break-through development. That same year, Mallat proposed multi-resolution analysis, then unifies the theoretical framework of signal processing method of wavelet analysis and make a break-through progress. What is more, we got the multi-resolution of basing on the framework of analysis. In 1986, Mallat established a wavelet transform algorithm and it is faster the FFT in corresponding. Thus we realizes that the wavelet analysis transform mathematics from technique and the wavelet analysis is changed the status of calculation as a tool. In the last 20 years, wavelet analysis developed in branch of mathematics and is used in much signal processing widely, Especially image processing and analysis and so on., Wavelet transform is applied to signal processing .General procedures, the first put signal decomposed into the transform coefficients (c), then according to application needs, on the (c) accordingly, and to obtain (c '), Finally, use (c ') reconstructed single[2]. The following we will introduce the wavelet decomposition and reconstruction. II. A. WAVELET ANALYSIS

aj-2 h' 2 g' 2

dj-3

aj-3 h' 2

Figure 1.

Multi-level decomposition[1]

In figure 1, h is low-pass filter, g is high-pass filter, 2 is down sampling. B. Decomposition Algorithm From the above we can see multistage of wavelet decomposition process clearly from the schematic diagram, but in the process of research, we need to abstract into specific formulas, so that we will use more widely . Hence, we translate the process. For a given signal sampling, first approximate f and fj with f, through the decomposition theorem ,it is decomposed ck into fj and dk Set[1]

f j ( x) = Ckj (2 j x k ) v j (1)
k z

f j can be broken down into f j = w j 1 + f j 1 ,in which

w j 1 = d kj 1 (2 j 1 x k ) w j 1 (2) f j 1 = Ckj 1 (2 j 1 x k ) v j 1 (3)


k z kz

C.

Wavelet Decomposition In practical, we often want to get its multi-stage decomposition for a small wave, so that we can have a more accurate analysis of wavelet. Then we will introduce the multi-level of wavelet decomposition
2010 ACADEMY PUBLISHER AP-PROC-CS-10CN008

Wavelet Reconstruction In practical, we often want to get its multi-stage reconstruction for a small wave, so that we can have a more accurate analysis of wavelet. Then we will introduce the multi-level of wavelet reconstruction specifically, we will introduce the multistage
143

reconstruction diagram and multistage reconstruction algorithm, so that we can get more profound understanding from the multistage reconstruction of wavelet. In wavelet analysis, when a signal or graphics decomposition, we need restore it and know that if we can get the original signal or graphics, so we need introduce the wavelet multistage reconstruction.
aj-3 2 hk dj-3 2 gk dj-2 2 gk dj-1 2 gk 2 hk 2 hk aj

Figure 2. Multi-stage reconstruction.

Figure 3. Program flow chart.

In figure 2, h is low-pass filter, g is high-pass filter, 2 is up sampling. D. Rreconstruction Algorithm From the above we can see multistage of wavelet reconstruction process clearly from the schematic diagram, but in the process of research, we need to abstract into specific formulas, so that we will use more widely.Hence, we translate the process.
0 1 1 1 0 , d k and cl seek ck and d k have obtained ck 2 j 1 j 1 by cl , until finally the ck and d k is

B. The procedures are as follows


function [coef,scf]=mywavedec2(x,N, wname) coef={cA_N;cV_N;cH_N;cD_N;cV_N-1;cH_N-1;cD_N-1; ;cV_1;cH_1;cD_1} [Lo_D,Hi_D] = wfilters(wname,'d'); lf=length(Lo_D); imshow(x);title('Original Image'); [r,c]=size(x); xlabel(['Size : ',num2str(r),'*',num2str(c)]); xd=double(x); [rx,cx]=size(x); [o2sa,f1sa,rsx]=sizcoef([rx,cx],lf,N); a=[o2sa,f1sa,rsx] coef=[]; scf=[rx,cx]; for i=1:N [cA,cV,cH,cD]=mydwt2(xd,Lo_D,Hi_D); xd=cA; outmp={cV;cH;cD}; scf=[size(cV);scf]; coef=[outmp;coef]; end coef=[cA;coef]; scf=[size(cA);scf]; plotcoef(N,wname,coef); subplot(N+1,3,2); yt=uint8(coef{1}); [yrow,ycol]=size(yt); imshow(yt);title( ['Approximation A',num2str(N)]); xlabel(['Size : ',num2str(yrow),'*',num2str(ycol)]); titllist={['Vertical Detail V'];['Horizontal Detail H'];['Diagonal Detail D']}; pn=2; for pr=1:N for pc=1:3 subplot(N+1,3,pn+2); yt=[]; yt=uint8(coef{pn}); [yrow,ycol]=size(yt); imshow(yt);title([ titllist{pc},num2str(N-pr+1)]); xlabel(['Size : ',num2str(yrow),'*',num2str(ycol)]); if mod(pn+2,3)==1 ylabel(['Level ',num2str(N-pr+1)]); end pn=pn+1; end end

obtained

clj f = f 0 + w0 + w1 + + w j 1

Set[1] (4)

in which

f 0 ( x) = Ck0 ( x k ) v0
k z

(5)

wn ( x) = d kn (2n x k ) wn , (6)
kz

then ,

f ( x) = Cl j (2 j x l ) v j
l z

III.

CASE STUDY

A. The flow chart is as follows: This process includes three main parts, the first part ,enter the function gets filtered through the filter sequence of graphics, The second part ,filter function sequence and filter coefficient convolution, special attention should be paid to the deconvolution algorithm, The third part, obtained through sampling, the coefficient of decomposition downward. Refactoring is the inverse

144

function [o2sa,f1sa,rsx]=sizcoef(sx,lf,N)[4] o2sa=sx; f1sa=[0 0]; osx=sx; for i=1:N ot=osx+lf-1; sa=floor(ot/2); o2sa=[o2sa;ot]; f1sa=[f1sa;sa]; osx=sa; end rsx=zeros(N+1,2); rsx(1,:)=sx; addln=0; for j=2:N+1 aln=floor((addln+lf-1)/2); tsx=f1sa(j,:)-aln; rsx(j,:)=tsx; addln=aln; end function y=downspl(x) N=length(x); M=floor(N/2); i=1:M; y(i)=x(2*i);

Figure 5. Input function sequence and function seqution through the filter.

IV.

CONCLUSION

For example,

f (t ) = sin(8t ) + sin(12t ) + sin(58t )

The results are,

Through the above analysis, you can see the obvious advantages of wavelet decomposition and reconstruction, especially during signal processing, decomposition and reconstruction can be processed quickly, and can maintain the maximum signal is not distorted. And also see that the MATLAB play the important role in the wavelet analysis. REFERENCES
Liu Ming cai. The wavelet analysis and its application, Tsinghua university press,2005.9 [2] WangDaKai PengJinYe. The wavelet analysis and its application in signal processing, Electronic Industry Press,2006.12 [3] SunYanKui. The wavelet analysis and its application, Mechanical Industry Press,2005.3 [4] HuChangHua LiGuoHua. Based on MATLAB7. X of system analysis and design, Xian publishing house of electronics industry,2006.11
[1]

Figure 4. Function sequence is decomposed

145

You might also like