SlideShare a Scribd company logo
wavelet decomposition process code in matlab???
Solution
WAVELET DECOMPOSITION PROCESS :-
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
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)

More Related Content

PDF
I studied analysis in Japanese textbook. Though I know many theorems.pdf
PDF
I am in need of two separate files that I can save independently.pdf
PDF
Heat transfer QuestionGiven a too hot to taste spoonful of soup.pdf
PDF
Explain what it is that is used with a 9S12 processor to match a giv.pdf
PDF
Duroc Jersey pigs are typically red, but a sandy variation is also s.pdf
PDF
Discuss the economic impact of technological sophistication.Solu.pdf
PDF
Describe in detail the specimen of a potato with a drop of iodine in.pdf
PDF
define two modes of speciation and provide examples of eachSolut.pdf
I studied analysis in Japanese textbook. Though I know many theorems.pdf
I am in need of two separate files that I can save independently.pdf
Heat transfer QuestionGiven a too hot to taste spoonful of soup.pdf
Explain what it is that is used with a 9S12 processor to match a giv.pdf
Duroc Jersey pigs are typically red, but a sandy variation is also s.pdf
Discuss the economic impact of technological sophistication.Solu.pdf
Describe in detail the specimen of a potato with a drop of iodine in.pdf
define two modes of speciation and provide examples of eachSolut.pdf

More from brijeshagarwa329898l (20)

PDF
computer math Use the following to answer questions 1-2 In the q.pdf
PDF
CASe Stic ato wad duun SolutionAggregates used in this method a.pdf
PDF
Write MatLAb code that would produce the following printSolution.pdf
PDF
Why do rays run radially in a woody stemHow would wood produced i.pdf
PDF
Write a java program that reads a number N as input and displays the.pdf
PDF
Why is the DNA fragment amplified with Phusion DNA into pGEM-T plasmi.pdf
PDF
Which of these is a function of the skeletal system communication s.pdf
PDF
what is transport layer what are the typical attacks in transport l.pdf
PDF
Which monetary aggregate would you expect the Federal Reserve to hav.pdf
PDF
What happens if a red hot inoculation loop plunges into the nutrient .pdf
PDF
What are speaking notes Have you used speaking notes before What wo.pdf
PDF
There are five components of internal control1) Control environme.pdf
PDF
The height of a right triangle is 2 feet more than twice the length .pdf
PDF
ST=TS show that the generalized eigenspace of T are invariant under .pdf
PDF
Singer and Nicolson proposed the fluid mosaic model of the cell membr.pdf
PDF
Opportunity or temptationJournal of Case StudiesIntroductionT.pdf
PDF
Multiple choice.Is there evidence that the age at which women get .pdf
PDF
List three Key characteristics of DNA used in studying DNA in electr.pdf
PDF
Let T be the transform from P2 (the vector space of second degree po.pdf
PDF
Liens Kanahara is employed part-time by the Cross-Bar Packing Corp..pdf
computer math Use the following to answer questions 1-2 In the q.pdf
CASe Stic ato wad duun SolutionAggregates used in this method a.pdf
Write MatLAb code that would produce the following printSolution.pdf
Why do rays run radially in a woody stemHow would wood produced i.pdf
Write a java program that reads a number N as input and displays the.pdf
Why is the DNA fragment amplified with Phusion DNA into pGEM-T plasmi.pdf
Which of these is a function of the skeletal system communication s.pdf
what is transport layer what are the typical attacks in transport l.pdf
Which monetary aggregate would you expect the Federal Reserve to hav.pdf
What happens if a red hot inoculation loop plunges into the nutrient .pdf
What are speaking notes Have you used speaking notes before What wo.pdf
There are five components of internal control1) Control environme.pdf
The height of a right triangle is 2 feet more than twice the length .pdf
ST=TS show that the generalized eigenspace of T are invariant under .pdf
Singer and Nicolson proposed the fluid mosaic model of the cell membr.pdf
Opportunity or temptationJournal of Case StudiesIntroductionT.pdf
Multiple choice.Is there evidence that the age at which women get .pdf
List three Key characteristics of DNA used in studying DNA in electr.pdf
Let T be the transform from P2 (the vector space of second degree po.pdf
Liens Kanahara is employed part-time by the Cross-Bar Packing Corp..pdf
Ad

Recently uploaded (20)

PPTX
Institutional Correction lecture only . . .
PDF
RMMM.pdf make it easy to upload and study
PDF
Microbial disease of the cardiovascular and lymphatic systems
PPTX
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
PPTX
Lesson notes of climatology university.
PDF
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
PDF
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
PDF
Computing-Curriculum for Schools in Ghana
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPTX
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
PPTX
master seminar digital applications in india
PPTX
GDM (1) (1).pptx small presentation for students
PDF
Complications of Minimal Access Surgery at WLH
PDF
Sports Quiz easy sports quiz sports quiz
PDF
Insiders guide to clinical Medicine.pdf
PDF
O5-L3 Freight Transport Ops (International) V1.pdf
PPTX
Cell Structure & Organelles in detailed.
PPTX
PPH.pptx obstetrics and gynecology in nursing
PDF
2.FourierTransform-ShortQuestionswithAnswers.pdf
PDF
O7-L3 Supply Chain Operations - ICLT Program
Institutional Correction lecture only . . .
RMMM.pdf make it easy to upload and study
Microbial disease of the cardiovascular and lymphatic systems
school management -TNTEU- B.Ed., Semester II Unit 1.pptx
Lesson notes of climatology university.
grade 11-chemistry_fetena_net_5883.pdf teacher guide for all student
Black Hat USA 2025 - Micro ICS Summit - ICS/OT Threat Landscape
Computing-Curriculum for Schools in Ghana
Abdominal Access Techniques with Prof. Dr. R K Mishra
PPT- ENG7_QUARTER1_LESSON1_WEEK1. IMAGERY -DESCRIPTIONS pptx.pptx
master seminar digital applications in india
GDM (1) (1).pptx small presentation for students
Complications of Minimal Access Surgery at WLH
Sports Quiz easy sports quiz sports quiz
Insiders guide to clinical Medicine.pdf
O5-L3 Freight Transport Ops (International) V1.pdf
Cell Structure & Organelles in detailed.
PPH.pptx obstetrics and gynecology in nursing
2.FourierTransform-ShortQuestionswithAnswers.pdf
O7-L3 Supply Chain Operations - ICLT Program
Ad

wavelet decomposition process code in matlabSolution WAVE.pdf

  • 1. wavelet decomposition process code in matlab??? Solution WAVELET DECOMPOSITION PROCESS :- 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
  • 2. 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 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);