E = entropy(I) returns E, a scalar value representing the entropy of intensity image I. Entropy is a statistical measure of randomness that can be used to characterize the texture of the input image. Entropy is defined as
-sum(p.*log(p))
where p contains the histogram counts returned from imhist.