I want function uppper (function's name in my code) should return p1 which is having 7 values. what changes are to made in the code below.
Afficher commentaires plus anciens
function [p1]= uppper( X )
[x1,x2,x3,x4]=decomp_mat(X,'haar');x1=x1/2;
[xx1,xx2,xx3,xx4]=decomp_mat(x1,'haar');xx1=xx1/2;
[xxx1,xxx2,xxx3,xxx4]=decomp_mat(xx1,'haar');
x1=round(x1);
x2=round(x2);
x3=round(x3);
x4=round(x4);
xx1=round(xx1);
xx2=round(xx2);
xx3=round(xx3);
xx4=round(xx4);
xxx1=round(xxx1);
xxx2=round(xxx2);
xxx3=round(xxx3);
xxx4=round(xxx4);
seuil=max(max(xxx1))/2;
seuil=round(seuil);
map=gray(256);
mm=max(max(xxx1));
for i=1:7
s=seuil;q=s/2;
XXX1=raff(xxx1,s,q,mm);
XXX2=raff(xxx2,s,q,mm); XXX3=raff(xxx3,s,q,mm); XXX4=raff(xxx4,s,q,mm);
XX2=raff(xx2,s,q,mm); XX3=raff(xx3,s,q,mm); XX4=raff(xx4,s,q,mm);
X2=raff(x2,s,q,mm); X3=raff(x3,s,q,mm); X4=raff(x4,s,q,mm);
XX1=reconst_mat(XXX1,XXX2,XXX3,XXX4,'haar');XX1=XX1*2;
X1=reconst_mat(XX1,XX2,XX3,XX4,'haar');X1=X1*2;
Y=reconst_mat(X1,X2,X3,X4,'haar');
figure(i+8),image(Y),colormap(map);
pause(2);
[p1]=parametres(X,Y); ;
pp1(i)=p1 ; seuil=seuil/2;
end
save pp1
end
on each iteration( for i= 1 to 7) p1 will return PSNR values(7 values), coded in Parameters function
Réponses (1)
Geoff Hayes
le 19 Avr 2015
Tina - if you want to return all 7 PSNR values, then just change your function signature to
function [pp1] = uppper( X )
so that the 7 element array is returned instead of the single element p1.
1 commentaire
tina jain
le 19 Avr 2015
Catégories
En savoir plus sur Elementary Math dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!