function H = entropy(image)
% compute the entropy of an image 


bins = min(min(image)):max(max(image));
s = size(image);
v = reshape(image, [1 s(1)*s(2)]);
h = hist(v, bins);
h = h / sum(h);
H =  - h * log(h+eps)'/ log(2);

