The identify utility can be persuaded to give statistical information about the channels in an image, specifically the minimum, maximum, mean and standard deviation. I'm part way through writing some code which also computes the same statistics. The first three agree exactly with what identify computes. The standard deviation not only differs, I know exactly how it differs.

According to all good stats books the S.D. of N values is defined as (I hope the pseudo-\Tex notation is clear)

sqrt ((1/N-1) * Sum_{i=1}^N (x_i - mean)^2)

when the

**mean is estimated from the data**. If the mean is known

*a priori*, then, and only then, the denominator (N-1) should be replaced by N.

My code uses N-1. If it is changed to N the result agrees with identify's.

My claim is that the mean of an arbitrary image is not an

*a priori*known quantity and must be estimated from the data. Consequently, I assert there is a bug in the ImageMagic code.

Has this been discussed before? How should I submit a bug report?

Paul