I wrote a new program which saves all audio files's data into a folder.We can simply import data and use it later.or do an automatic statistical research in matlab.(the program is written below, pay attention to red colored lines)
i added only one more loop to our previous program.
notice that eightname is a matrix which has the name of all the files.(the same 94 8-bit files we found!) this matrix is made by "getfiles" about which I have explained in a few posts ago.
%determining input and output
%importing input and recognizing fs and bits/sample
sizef=sizef(1);
for k=1:sizef
eightname=char(eightbit(k));
[data fs b]=eval('wavread (eightname)');
sizem=size(data);
%double->integer data
data=data.*2^(b-1)+2^(b-1);
data=uint8(data);
%count
countero=zeros(256,1);
for j=0:255
for i=1:sizem(1)
if data(i)==j
countero(j+1)=countero(j+1)+1;
end
end
end
%producing random data
r=randint(sizem(1),1);
%embedding random data to original data
for i=1:sizem(1)
data(i)=bitset(data(i),1,r(i));
end
%count
counterm=zeros(256,1);
for j=0:255
for i=1:sizem(1)
if data(i)==j
counterm(j+1)=counterm(j+1)+1;
end
end
end
%getting subtract
j=0;
for i=1:2:255
j=j+1;
km(j,1)=abs(counterm(i)-counterm(i+1));
end
j=0;
for i=1:2:255
j=j+1;
ko(j,1)=abs(countero(i)-countero(i+1));
end
matname=[eightname '.mat']
save([eightname '.mat'])
k=k+1;
end
also I made an exel file of about 10 columns. I calculated average of subs and average of every row in exel. I think we can find some useful points in average of every column. take a look on the file please.
see that average of data has decreased noticeably in modified files.
and maybe, as parisa said before, we can consider every row's average as the thereshold in order to discreminate pairing from non-pairing rows. then we will count number of positive answers. we expect to have considerably more positive answers in modified audio files.
Subscribe to:
Post Comments (Atom)
2 comments:
thanks for your post
I have some problem:
in exel file I see you get the average of eac culomn not each row!
also I think the average of each culomn shouldn't be change in origina and embedded data?
your welcome!
;)
Post a Comment