資源簡介
信息影藏的三點法隱寫代碼,來自武漢大學實驗室的實驗書。
代碼片段和文件信息
function?hide(orifilemsg1outfilelposrinterab)
%參數說明:
%?orifile:原始載體音頻信號
%?msg1:待隱藏的信息
%?outfile:隱藏后的音頻
%?l:音頻信號做DCT變換后的分段長度
%?pos:在每段中嵌入的起始位置
%?r:?每段選出的系數
%?inter:每段中,相鄰兩個嵌入點的間隔
%?a:量化步長
%?b:最鄰近的量化區間的距離
%?msg1:待隱藏的信息
%?outfile:隱藏后的音頻
fi?=?fopen(msg1‘r‘);
????[msgN]?=?fread(fi‘ubit1‘);
????fclose(fi);??
????[sampledataFSnbits]=wavread(orifile);
????sdmax?=?max(max(max(sampledata))max(abs(min(sampledata))));
????x?=?sampledata/sdmax;
????p=x;
????x1?=?x(:1);
????[Ln]?=?size(x1);
????bn?=?floor(L/l);
????if?N>bn
????????error(‘Message?is?too?long‘);
????end
??????audct?=?zeros(L1);
????for?i=1:bn
????????audct((i-1)*l+1:i*l)?=?dct(x1((i-1)*l+1:i*l));
????end
???????audctmax?=?max(max(max(audct))max(abs(min(audct))));
????audct?=?audct/audctmax;
????for?i=1:N????????
????????tmp?=?audct((i-1)*l+1:i*l);
????????for?j=1:r????????????
????????????t?=?tmp(pos+(j-1)*inter);
????????????si?=?floor(t/a);
????????????mid?=?(
- 上一篇:Helmholtz方程的有限元解法.
- 下一篇:小波分析matlab程序
評論
共有 條評論