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.

num_diff=diff_num(am)
function num_diff=diff_num(am)

[m,n]=size(am);
min_am=min(min(am));
[tm,tn]=find(am<0);
if max(size(tm))>0, error('impossible');end;
diffcount=0;
diffarray=(min_am-1)*ones(1,m*n);
for i=1:m
    for j=1:n
        this_x=am(i,j);
        [findm,findn]=find(diffarray==this_x);
        if max(size(findm))==0
            diffcount=diffcount+1;
            diffarray(diffcount)=this_x;
        end
            
    end
end
num_diff=diffcount;
            

Contact us