Wednesday, August 20, 2008

Both.seseion8

We correct our program and Finally could see pairing in histogram.
Changs in program are as follow:

  1. 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,

  2. to have possitive data we add a constant num (2^(b-1)) and after embedding minus data from that constant,

  3. use hist() structure for plotting histogram,

  4. correct "bitset(data(i),1,r(i));" to "data(i)=bitset(data(i),1,r(i)); "!!!

  5. 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:

  1. Write a program for extracting data.

1 comment:

Fereshteh Aalamifar said...

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?