Code covered by the BSD License  

Highlights from
Binary Image Watermarking/Data Hiding: Data, Algorithms, and Distortion Measure

Binary Image Watermarking/Data Hiding: Data, Algorithms, and Distortion Measure

by

 

26 Apr 2012 (Updated )

A package on binary image watermarking/data hiding, including data, algorithms & distortion measure.

corrs_ms.m
%Please refer to Table II of the SPL paper.
suba=[1.5333,1.8375,3.0333,3.5958];%mean subjective rank

drdm3_15=zeros(7,4);

testim16=[    
0.47497 0.57001 0.64000 0.75046		 
0.47592 0.57003 0.64001 0.73206		 
0.47859 0.57004 0.64003 0.73117		 
0.48071 0.57006 0.64007 0.73053		 
];

im0name='TestSource.png';
img0=imread(im0name);

k=0;
for m=3:2:15
    k=k+1;
    sumdrdm=zeros(1,4);
    for i=1:4        
        one4drdm=zeros(1,4);
        for j=1:4
            drdvalue=testim16(i,j);
            im1name=['TestSourceAbsError40AveDist',num2str(sprintf('%.5f',drdvalue)),'.png'];
            img1=imread(im1name);
            drdm=CalDRD(double(img0),double(img1),m);
            one4drdm(1,j)=drdm;
        end
        sumdrdm=sumdrdm+one4drdm;
    end
    sumdrdm=sumdrdm/4;
    drdm3_15(k,1:4)=sumdrdm;
end
save drdm3_15 drdm3_15

corrs=zeros(7,1);
for i=1:7
    corrs(i)=corr2(drdm3_15(i,:),suba);%calculate the correlations
end
save corrs corrs

wids=zeros(7,1);
for i=1:7
    wids(i)=drdm3_15(i,4)-drdm3_15(i,1);
end

Contact us