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.

[RowLength,ColLength]=CalRandIndex(SelectNum,n)
function [RowLength,ColLength]=CalRandIndex(SelectNum,n)

MaxNum=4*n-4;
MaxDiffer=(n-1)/2;
MiddlePoint1=n-MaxDiffer;
MiddlePoint2=MaxNum-MaxDiffer;

if SelectNum<=n
    RowLength=-MaxDiffer;
    ColLength=SelectNum-MiddlePoint1;
elseif SelectNum>=(MaxNum-(n-1))
    RowLength=MaxDiffer;
    ColLength=SelectNum-MiddlePoint2;
else
    if mod(SelectNum,2)==0
        ColLength=-MaxDiffer;
        RowLength=-MaxDiffer+double(floor((SelectNum-n)/2))+1;
    else
        ColLength=MaxDiffer;
        RowLength=-MaxDiffer+(SelectNum-n)/2;
    end
end

Contact us