Audio to binary conversion

4 ビュー (過去 30 日間)
Sara MH
Sara MH 2017 年 12 月 26 日
編集済み: Walter Roberson 2018 年 1 月 12 日
Hello
i'm working on a project related to steganography ( audio steganography), and at first i want to convert an existing wav file to audio and extract the LSB's of it using a MATLAB script. how can i start?
i used this code:
[filename, pathname] = uigetfile('*.wav', 'Pick an audio');
wavebinary = dec2bin( typecast( single(filename(:)), 'uint8'), 8 ) - '0';
[r c] = size(wavebinary);
wavb= [];
wavd=[];
for k=1:r
wavb=horzcat(num2str(wavebinary(k,1:8),wavb));
x=bin2dec(wavb(1:8));
wavd=horzcat(x,wavd);
wavb=[];
end
wavd=fliplr(wavd);
it gives me a 36*8 martix don't know why
and i need more samples.. how can i do that?
  2 件のコメント
Image Analyst
Image Analyst 2017 年 12 月 26 日
Have you tried bitget()?
Sara MH
Sara MH 2017 年 12 月 26 日
it gives Undefined function 'bitget' for input arguments of type 'char'. as i tried to put wavebinary =bitget(filename);

サインインしてコメントする。

採用された回答

Walter Roberson
Walter Roberson 2017 年 12 月 26 日
Your code never reads the file. Your code is transforming the file NAME to binary.
  38 件のコメント
Sara MH
Sara MH 2018 年 1 月 12 日
can i contact you? i want some help in this
Walter Roberson
Walter Roberson 2018 年 1 月 12 日
編集済み: Walter Roberson 2018 年 1 月 12 日
No, I prefer questions to be posted in public. Also, I am not interested in steganography itself.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeAudio I/O and Waveform Generation についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by