Error in getting output
Afficher commentaires plus anciens
clc
clear all
close all
[y,Fs,nbits] = wavread('bird.wav');
[cA,cH,cL,cD] = dwt2(y,'haar');%wavelet decomposition
C1=int16(cA*32768);C2=int16(cH*32768);%%%%convertibg to 16 bit
[y1, Fs, nbits] = wavread('wov.wav');
[sA,sH,sL,sD] = dwt2(y1,'haar');
S1=max(min(round(2^13*sA),2^13),-2^13);%%%%%convertibg to 14 bit
S2=max(min(round(2^13*sH),2^13),-2^13);
Cw=C1;
Sw=S1;
%%%%%%applying threshold
for i=1:length(Cw)
if (Cw(i)<7 && Cw(i)>-7)
Cw(i)=0;
end
end
for i=1:length(Sw)
if (Sw(i)<7 && Sw(i)>-7)
Sw(i)=0;
end
end
A=Cw;
B=Sw;
if length(A)<length(B)
S=length(B)-length(A);
S1=zeros(S,1);
A=[A;S1];B;
elseif length(A)>length(B)
S=length(A)-length(B);
S1=zeros(S,1);
B=[B;S1];A;
else
A;B;
end
Cw=A;
Sw=B;
%%%%%SORTING
[~,J] = sort(A);
BSA = sort(B);
J(J) = 1:length(A);
BSA = BSA(J);
[J1,ke] = ismember(BSA,Sw);
key=ke;
Ew=double(BSA)./double(Cw);
Ew=ceil(Ew*100);
Ew(~isfinite(Ew))=0;
nn=16;
n=15;
Cw=double(Cw);
Cw1 = dec2bin(mod(2^n+Cw,2^n));
Ew1 = dec2bin(mod(2^5+Ew,2^5),5);
%%%%%%%%%%%%%%%%%%%%%%EMBEDDED%%%%%%%%%%%%%%%%%%%%%%%
n=[];
CC = Cw1;
DD = Ew1;
n=11;
CC(:,n:n+size(DD,2)-1)=DD ;
CC=bin2dec(CC);
X = idwt2(CC,cH,cL,cD,'haar');
%%%%%%rescaling%%%%%%%%%
mi=min(min(y));
mx=max(max(y));
B=nma_rescale(X,mi,mx)
mat=X;
matmin = mi;
matmax = mx;
newmat = 2 * (mat - matmin) ./ (matmax - matmin) - 1;
subplot(3,1,1),plot(y);
subplot(3,1,2),plot(B);
In the above code after embeddeding the secret signal with the host signal,the embeeded image is not a signal wave
The process aove is speech stegnography,
please tell why the embedded signal is not a signal wave
Réponses (1)
Image Analyst
le 21 Déc 2012
0 votes
Well I suppose since the secret signal did not replace the target signal, but was combined with it in a special way, that neither signal is a sine wave nor has its original form anymore. Why did you think that it would remain a sine wave after combining with the host signal?
3 commentaires
kash
le 21 Déc 2012
Image Analyst
le 21 Déc 2012
Modifié(e) : Image Analyst
le 21 Déc 2012
I know that - none of the three signals ("secret," "host," and "embedded" which I guess is the output signal) are the same. But once the secret signal that is " to be embedded" actually GETS embedded into the host, the result will not look like either one. Explain this: ",the embeeded image is not a signal wave". What is "a signal wave"???? All three waveforms are signals so I don't know what you're talking about. And what image? I thought these were 1D sounds. BTW, I am not an expert in steganography. I'm not sure anyone here is, at least not that I recall. Please try to carefully rephrase your question using the most accurate terminology you can.
kash
le 21 Déc 2012
Catégories
En savoir plus sur Signal Processing Toolbox 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!