statistic documentation

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

statistic documentation

Post by snibgo »

The documentation http://www.imagemagick.org/script/comma ... #statistic says "-statistic RMS" is a possibility, but doesn't mention "-statistic StandardDeviation". In fact, the reverse is true.

The documented description of RMS, "statistical measure of the magnitude of a varying quantity", actually describes StandardDeviation.
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: statistic documentation

Post by fmw42 »

snibgo wrote:The documentation http://www.imagemagick.org/script/comma ... #statistic says "-statistic RMS" is a possibility, but doesn't mention "-statistic StandardDeviation". In fact, the reverse is true.

The documented description of RMS, "statistical measure of the magnitude of a varying quantity", actually describes StandardDeviation.

I asked Magick to add this in the next release (6.8.9.4). It computes the rms of all the pixels in the neighborhood as opposed to a simple average. It is not the std.

The rms = for each channel computes the sqrt of the average over all pixels in the neighborhood of graylevel^2.

How would you like rms to be documented? I will change it if you like.

Looking at the code. There is a standard deviation (either standard_deviation or standard-deviation are acceptable). I will add it to the list.

I also note that from the code, it looks like the gradient is just the difference between the max and min values in the neighborhood for each channel. I will edit the documentation for that also.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: statistic documentation

Post by snibgo »

Ah -- RMS is a planned new feature. Fair enough. So each colour channel will become the root of the mean squared value of that channel within the rectangle? That's fine. (Why do you mention "graylevel"? Is there a conversion to gray?) Thanks.

Each channel has only gray values as opposed to color values. I did not want to confuse the rms with sqrt((R^2+G^2+B^2)/3)

As you say, it is just the RMS of the channel value within the rectangle for each channel.
snibgo's IM pages: im.snibgo.com
Post Reply