Changs in program are as follow:
- multiple daata by 2^(b-1) nor 2^b; beacuse data is between (-1 & 1) nor( -.5 &.5) so if we multiple by 2^b e have only even numbers,
- to have possitive data we add a constant num (2^(b-1)) and after embedding minus data from that constant,
- use hist() structure for plotting histogram,
- correct "bitset(data(i),1,r(i));" to "data(i)=bitset(data(i),1,r(i)); "!!!
- correct "eval('wavwrite(data,size(1),o)');" to "eval('wavwrite(data,fs,b,o)');" (if we don't give b as NBITS ,take NBITS=16 by defualt and can cause problem in *.wav file.) .
you can download program here.
Also you can see the histograms bellow:


To do list for next session:
- Write a program for extracting data.
1 comment:
which histogram contains embedding data?
I think first one, am i right?
correct "bitset(data(i),1,r(i));" to "data(i)=bitset(data(i),1,r(i)); "!!!
that was the most terrible mistake which had caused main problems.
how did you solve hist() problem?
as i can remember, this function made columns between 2 integers, but we would like to plot one column for every integer?
I think writing a program which can extract our data is very simple. just getbit the LSB bits of all bytes and gather them together in a matrix. that can be done in a "for" loop.
but you cannot produce the original audio file from a modified one, since you cannot guess LSB bits, am i right?
Post a Comment