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.

DistTable=CalDistTable(ImName,Dimention)
function  DistTable=CalDistTable(ImName,Dimention)
WeiTable=WeiCalulate(Dimention);
img0=double(imread([ImName,'.png']));
[Rows, Cols]=size(img0);
DistTable=ones(Rows,Cols);
length=double((Dimention-1)/2);
for m=(1+length):(Rows-length)
    for n=(1+length):(Cols-length)
        MetriBlk=img0((m-length):(m+length),(n-length):(n+length));
        InterBlk=MetriBlk.*WeiTable;
        DistTable(m,n)=sum(sum(InterBlk));
    end
end
for m=1:Rows
    for n=1:Cols
        if img0(m,n)==0
            DistTable(m,n)=1-DistTable(m,n);
        end
    end
end
        

Contact us