Page 2 of 3

Re: Problems with Image Statistics (fx:maxima etc.)

Posted: 2017-03-05T14:46:55-07:00
by miket
Fred, I think there are still a few incorrect values even in your example !

For example, the blue channel should have a max of 0.75 and a min of 0.25. Your example above is giving 1 & 0 respectively.
I think the max/min for individual channels is now reporting the max/min of all channels.

Regards

Mike

Re: Problems with Image Statistics (fx:maxima etc.)

Posted: 2017-03-05T14:49:53-07:00
by fmw42
I think you are correct. I missed that. I have changed my notes above.

Re: Problems with Image Statistics (fx:maxima etc.)

Posted: 2017-03-05T15:13:36-07:00
by miket
Also, think it's purely coincidence that red and green max/min values are correct. My figures suggests they are currently reflecting the overall max/min (which, in your example, coincidentally is also 1 & 0).

Re: Problems with Image Statistics (fx:maxima etc.)

Posted: 2017-03-05T17:38:52-07:00
by fmw42
Also, think it's purely coincidence that red and green max/min values are correct
I agree. The same code likely processed r,g,b channels. I think it is because the values are already 0 and 1 that we get the right answer.

Re: Problems with Image Statistics (fx:maxima etc.)

Posted: 2017-03-06T17:07:37-07:00
by fmw42
Here is another simple test that shows that there are issues with the overall mean in both IM 6.9.7.10 Q16 and IM 7.0.5.1 Q16 HDRI. Note that 0.5 is the correct value if you ignore transparency.

Code: Select all

convert test.png -format "%[fx:mean]" info:
0.500002

Code: Select all

magick test.png -format "%[fx:mean]" info:
0.558334

Code: Select all

identify -verbose test.png
Overall:
mean: 28944.7 (0.441667)

Code: Select all

magick identify -verbose test.png
Image statistics:
Overall:
mean: 36590.4 (0.558334)

Re: Problems with Image Statistics (fx:maxima etc.)

Posted: 2017-03-06T17:41:14-07:00
by magick
Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ http://www.imagemagick.org/download/beta/ by sometime tomorrow.

Re: Problems with Image Statistics (fx:maxima etc.)

Posted: 2017-03-07T06:27:14-07:00
by miket
A further observation (which may help in tracking down this bug) is that calling an fx:mean.g causes Identify to stop working correctly.

Using: HDRI - Version: ImageMagick 7.0.5-1 Q16 x86_64 2017-03-05

By way of example

Code: Select all

# Load in image
    my $image = Image::Magick->new;
    open(IMAGE, 'r.png');
    $image->Read(file=>\*IMAGE);
    close(IMAGE);
# Check values
    $image->Identify();
# Call fx:mean
    print "Mean g = ".$image->Get('%[fx:mean.g]')."\n";
#Check values
    $image->Identify();
    $image->Display();
The first call to Identify yields this (all seems OK)

Code: Select all

Image: /tmp/magick-7481OttXQw0DHfog
  Format: PNG (Portable Network Graphics)
  Mime type: image/png
  Class: DirectClass
  Geometry: 70x46+0+0
  Units: Undefined
  Type: TrueColor
  Endianess: Undefined
  Colorspace: sRGB
  Depth: 8-bit
  Channel depth:
    Red: 8-bit
    Green: 8-bit
    Blue: 8-bit
  Channel statistics:
    Pixels: 3220
    Red:
      min: 35 (0.137255)
      max: 255 (1)
      mean: 145.712 (0.57142)
      standard deviation: 69.306 (0.271788)
      kurtosis: -1.386
      skewness: 0.146302
      entropy: 0.966517
    Green:
      min: 22 (0.0862745)
      max: 255 (1)
      mean: 89.2602 (0.35004)
      standard deviation: 52.4779 (0.205796)
      kurtosis: 2.63548
      skewness: 1.81809
      entropy: 0.863321
    Blue:
      min: 24 (0.0941176)
      max: 255 (1)
      mean: 80.4683 (0.315562)
      standard deviation: 55.12 (0.216157)
      kurtosis: 3.01445
      skewness: 1.97858
      entropy: 0.847573
  Image statistics:
    Overall:
      min: 22 (0.0862745)
      max: 255 (1)
      mean: 105.147 (0.412341)
      standard deviation: 66.082 (0.259145)
      kurtosis: -0.206434
      skewness: 1.06132
      entropy: 0.89247
  Rendering intent: Perceptual
  Gamma: 0.45455
  Chromaticity:
    red primary: (0.64,0.33)
    green primary: (0.3,0.6)
    blue primary: (0.15,0.06)
    white point: (0.3127,0.329)
  Matte color: grey74
  Background color: white
  Border color: srgb(223,223,223)
  Transparent color: none
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 70x46+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Zip
  Orientation: Undefined
  Properties:
    date:create: 2017-03-07T13:08:30+00:00
    date:modify: 2017-03-07T13:08:30+00:00
    filter:brightness:kurtosis: 0.588352
    filter:brightness:mean: 29310.5
    filter:brightness:skewness: 0.850459
    filter:brightness:standard-deviation: 13019.8
    filter:saturation:kurtosis: -1.03996
    filter:saturation:mean: 27068.9
    filter:saturation:skewness: 0.44897
    filter:saturation:standard-deviation: 19280.3
    png:bKGD: chunk was found (see Background color, above)
    png:cHRM: chunk was found (see Chromaticity, above)
    png:gAMA: gamma=0.45454544 (See Gamma, above)
    png:IHDR.bit-depth-orig: 8
    png:IHDR.bit_depth: 8
    png:IHDR.color-type-orig: 2
    png:IHDR.color_type: 2 (Truecolor)
    png:IHDR.interlace_method: 0 (Not interlaced)
    png:IHDR.width,height: 70, 46
    png:sRGB: intent=0 (Perceptual Intent)
    png:text: 10 tEXt/zTXt/iTXt chunks were found
    signature: f7b3db46d6f696ea8392f0ad0be945dd502a806e2c1e9c082efef517191758f7
  Tainted: False
  Filesize: 7.36KB
  Number pixels: 3.22K
  User time: 0.000u
  Elapsed time: 0:01.000
  Version: ImageMagick 7.0.5-1 Q16 x86_64 2017-03-05 http://www.imagemagick.org
But the second call (following fx:mean.g execution) yields wierd results for the red & blue channel.

Code: Select all

Image: /tmp/magick-7481OttXQw0DHfog
  Format: PNG (Portable Network Graphics)
  Mime type: image/png
  Class: DirectClass
  Geometry: 70x46+0+0
  Units: Undefined
  Type: TrueColor
  Endianess: Undefined
  Colorspace: sRGB
  Depth: 8-bit
  Channel depth:
    Red: 1-bit
    Green: 8-bit
    Blue: 1-bit
  Channel statistics:
    Pixels: 3220
    Red:
      min: inf (2.7431e+303)
      max: -inf (-2.7431e+303)
      mean: 0 (0)
      standard deviation: -0 (-0)
      kurtosis: -3
      skewness: 0
      entropy: 0
    Green:
      min: 22 (0.0862745)
      max: 255 (1)
      mean: 89.2602 (0.35004)
      standard deviation: 52.4779 (0.205796)
      kurtosis: 2.63548
      skewness: 1.81809
      entropy: 0.863321
    Blue:
      min: inf (2.7431e+303)
      max: -inf (-2.7431e+303)
      mean: 0 (0)
      standard deviation: -0 (-0)
      kurtosis: -3
      skewness: 0
      entropy: 0
  Image statistics:
    Overall:
      min: 22 (0.0862745)
      max: 255 (1)
      mean: 89.2602 (0.35004)
      standard deviation: 52.4779 (0.205796)
      kurtosis: 2.63548
      skewness: 1.81809
      entropy: 0.287774
  Rendering intent: Perceptual
  Gamma: 0.45455
  Chromaticity:
    red primary: (0.64,0.33)
    green primary: (0.3,0.6)
    blue primary: (0.15,0.06)
    white point: (0.3127,0.329)
  Matte color: grey74
  Background color: white
  Border color: srgb(223,223,223)
  Transparent color: none
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 70x46+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Zip
  Orientation: Undefined
  Properties:
    date:create: 2017-03-07T13:08:30+00:00
    date:modify: 2017-03-07T13:08:30+00:00
    filter:brightness:kurtosis: 0.588352
    filter:brightness:mean: 29310.5
    filter:brightness:skewness: 0.850459
    filter:brightness:standard-deviation: 13019.8
    filter:saturation:kurtosis: -1.03996
    filter:saturation:mean: 27068.9
    filter:saturation:skewness: 0.44897
    filter:saturation:standard-deviation: 19280.3
    png:bKGD: chunk was found (see Background color, above)
    png:cHRM: chunk was found (see Chromaticity, above)
    png:gAMA: gamma=0.45454544 (See Gamma, above)
    png:IHDR.bit-depth-orig: 8
    png:IHDR.bit_depth: 8
    png:IHDR.color-type-orig: 2
    png:IHDR.color_type: 2 (Truecolor)
    png:IHDR.interlace_method: 0 (Not interlaced)
    png:IHDR.width,height: 70, 46
    png:sRGB: intent=0 (Perceptual Intent)
    png:text: 10 tEXt/zTXt/iTXt chunks were found
    signature: f7b3db46d6f696ea8392f0ad0be945dd502a806e2c1e9c082efef517191758f7
  Tainted: False
  Filesize: 7.36KB
  Number pixels: 3.22K
  Pixels per second: 107KB
  User time: 0.030u
  Elapsed time: 0:01.029
  Version: ImageMagick 7.0.5-1 Q16 x86_64 2017-03-05 http://www.imagemagick.org
Also, this demonstrates the strange appearance of a 4th channel when converting from sRGB to XYZ

Code: Select all

# Load in image
    my $image = Image::Magick->new;
    open(IMAGE, 'r.png');
    $image->Read(file=>\*IMAGE);
    close(IMAGE);

    $image->Set(alpha=>'Set');
    $image->Identify();
# Set colorspace to XYZ
    $image->Colorspace(colorspace=>"XYZ");
# Check values
    $image->Identify();
First identify after adding alpha - all seems OK

Code: Select all

Image: /tmp/magick-7522Kf6zxDfhLnDl
  Format: PNG (Portable Network Graphics)
  Mime type: image/png
  Class: DirectClass
  Geometry: 70x46+0+0
  Units: Undefined
  Type: TrueColorAlpha
  Endianess: Undefined
  Colorspace: sRGB
  Depth: 8-bit
  Channel depth:
    Red: 8-bit
    Green: 8-bit
    Blue: 8-bit
    Alpha: 1-bit
  Channel statistics:
    Pixels: 3220
    Red:
      min: 35 (0.137255)
      max: 255 (1)
      mean: 145.712 (0.57142)
      standard deviation: 69.306 (0.271788)
      kurtosis: -1.386
      skewness: 0.146302
      entropy: 0.966517
    Green:
      min: 22 (0.0862745)
      max: 255 (1)
      mean: 89.2602 (0.35004)
      standard deviation: 52.4779 (0.205796)
      kurtosis: 2.63548
      skewness: 1.81809
      entropy: 0.863321
    Blue:
      min: 24 (0.0941176)
      max: 255 (1)
      mean: 80.4683 (0.315562)
      standard deviation: 55.12 (0.216157)
      kurtosis: 3.01445
      skewness: 1.97858
      entropy: 0.847573
    Alpha:
      min: 255 (1)
      max: 255 (1)
      mean: 255 (1)
      standard deviation: 0 (0)
      kurtosis: -3
      skewness: 1e+45
      entropy: -nan
  Image statistics:
    Overall:
      min: 22 (0.0862745)
      max: 255 (1)
      mean: 142.61 (0.559256)
      standard deviation: 86.5208 (0.339297)
      kurtosis: -1.67099
      skewness: 0.273474
      entropy: -nan
  Rendering intent: Perceptual
  Gamma: 0.45455
  Chromaticity:
    red primary: (0.64,0.33)
    green primary: (0.3,0.6)
    blue primary: (0.15,0.06)
    white point: (0.3127,0.329)
  Matte color: grey74
  Background color: white
  Border color: srgb(223,223,223)
  Transparent color: none
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 70x46+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Zip
  Orientation: Undefined
  Properties:
    date:create: 2017-03-07T13:19:59+00:00
    date:modify: 2017-03-07T13:19:59+00:00
    filter:brightness:kurtosis: 0.588352
    filter:brightness:mean: 29310.5
    filter:brightness:skewness: 0.850459
    filter:brightness:standard-deviation: 13019.8
    filter:saturation:kurtosis: -1.03996
    filter:saturation:mean: 27068.9
    filter:saturation:skewness: 0.44897
    filter:saturation:standard-deviation: 19280.3
    png:bKGD: chunk was found (see Background color, above)
    png:cHRM: chunk was found (see Chromaticity, above)
    png:gAMA: gamma=0.45454544 (See Gamma, above)
    png:IHDR.bit-depth-orig: 8
    png:IHDR.bit_depth: 8
    png:IHDR.color-type-orig: 2
    png:IHDR.color_type: 2 (Truecolor)
    png:IHDR.interlace_method: 0 (Not interlaced)
    png:IHDR.width,height: 70, 46
    png:sRGB: intent=0 (Perceptual Intent)
    png:text: 10 tEXt/zTXt/iTXt chunks were found
    signature: 646ac633d5b5553721e032d2c9f8f54ffc19d315832bbf808c2b7321b1067293
  Tainted: True
  Filesize: 7.36KB
  Number pixels: 3.22K
  User time: 0.000u
  Elapsed time: 0:01.000
  Version: ImageMagick 7.0.5-1 Q16 x86_64 2017-03-05 http://www.imagemagick.org
... and after the conversion to XYZ - Note the appearance of channel 3 (a 4th channel in addition to the alpha channel).

Code: Select all

Image: /tmp/magick-7522Kf6zxDfhLnDl
  Format: PNG (Portable Network Graphics)
  Mime type: image/png
  Class: DirectClass
  Geometry: 70x46+0+0
  Units: Undefined
  Type: TrueColorAlpha
  Endianess: Undefined
  Colorspace: XYZ
  Depth: 8/16-bit
  Channel depth:
    Channel 0: 16-bit
    Channel 1: 16-bit
    Channel 2: 16-bit
    Channel 3: 1-bit
    Alpha: 1-bit
  Channel statistics:
    Pixels: 3220
    Channel 0:
      min: 4.67681 (0.0183404)
      max: 242.37 (0.95047)
      mean: 59.3238 (0.232642)
      standard deviation: 53.9999 (0.211764)
      kurtosis: 3.09181
      skewness: 1.71244
      entropy: 0.99008
    Channel 1:
      min: 4.71418 (0.018487)
      max: 255 (1)
      mean: 49.9844 (0.196017)
      standard deviation: 53.9142 (0.211428)
      kurtosis: 6.58834
      skewness: 2.58778
      entropy: 0.989499
    Channel 2:
      min: 4.05614 (0.0159064)
      max: 277.652 (1.08883)
      mean: 38.7033 (0.151778)
      standard deviation: 62.891 (0.246631)
      kurtosis: 6.5241
      skewness: 2.74042
      entropy: 0.970848
    Channel 3:
      min: inf (2.7431e+303)
      max: -inf (-2.7431e+303)
      mean: 0 (0)
      standard deviation: -0 (-0)
      kurtosis: -3
      skewness: 0
      entropy: 0
    Alpha:
      min: 255 (1)
      max: 255 (1)
      mean: 255 (1)
      standard deviation: 0 (0)
      kurtosis: -3
      skewness: 1e+45
      entropy: -nan
  Image statistics:
    Overall:
      min: 4.05614 (0.0159064)
      max: 277.652 (1.08883)
      mean: 100.753 (0.395109)
      standard deviation: 102.12 (0.400472)
      kurtosis: -1.29352
      skewness: 0.714799
      entropy: -nan
  Rendering intent: Undefined
  Gamma: 1
  Matte color: grey74
  Background color: white
  Border color: srgb(223,223,223)
  Transparent color: none
  Interlace: None
  Intensity: Undefined
  Compose: Over
  Page geometry: 70x46+0+0
  Dispose: Undefined
  Iterations: 0
  Compression: Zip
  Orientation: Undefined
  Properties:
    date:create: 2017-03-07T13:19:59+00:00
    date:modify: 2017-03-07T13:19:59+00:00
    filter:brightness:kurtosis: 0.588352
    filter:brightness:mean: 29310.5
    filter:brightness:skewness: 0.850459
    filter:brightness:standard-deviation: 13019.8
    filter:saturation:kurtosis: -1.03996
    filter:saturation:mean: 27068.9
    filter:saturation:skewness: 0.44897
    filter:saturation:standard-deviation: 19280.3
    png:bKGD: chunk was found (see Background color, above)
    png:cHRM: chunk was found (see Chromaticity, above)
    png:gAMA: gamma=0.45454544 (See Gamma, above)
    png:IHDR.bit-depth-orig: 8
    png:IHDR.bit_depth: 8
    png:IHDR.color-type-orig: 2
    png:IHDR.color_type: 2 (Truecolor)
    png:IHDR.interlace_method: 0 (Not interlaced)
    png:IHDR.width,height: 70, 46
    png:sRGB: intent=0 (Perceptual Intent)
    png:text: 10 tEXt/zTXt/iTXt chunks were found
    signature: 0f68be1e03acd2acd9fed6839a05475cb0f5025797d317130edc1f96a779effe
  Tainted: True
  Filesize: 7.36KB
  Number pixels: 3.22K
  Pixels per second: 107KB
  User time: 0.050u
  Elapsed time: 0:01.030
  Version: ImageMagick 7.0.5-1 Q16 x86_64 2017-03-05 http://www.imagemagick.org
mike@mike-VirtualBox:
This one may be a separate bug (but might be connected to the statistics issue), which appeared after the recent inclusion of the Colorspace() function into perlmagick. (see viewtopic.php?f=7&t=30994

Re: Problems with Image Statistics (fx:maxima etc.)

Posted: 2017-03-07T17:55:26-07:00
by magick
Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ http://www.imagemagick.org/download/beta/ by sometime tomorrow.

Re: Problems with Image Statistics (fx:maxima etc.)

Posted: 2017-03-10T06:07:41-07:00
by miket
Eureka :) :)

I've installed Beta version: ImageMagick 7.0.5-2 Q16 x86_64 2017-03-10 and all the issues seem to have been resolved. Many thanks for your work wizards :D.

All the fx:maxima, fx:minima & fx:mean are giving the correct results on all channels. I note that the "o" (overall channel) gives the max, min and mean INCLUDING the alpha channel, when it's switched ON and EXCLUDES the alpha channel when switched off - which is just right (for my requirements)

The perl Statistics method appears to work just fine.

And the Identify glitch (following a fx; call) appears to be fixed.

Fred - I have NOT checked the standard deviation values. You may wish to check these are giving the results you expect.

Many thanks again for bottoming this issue out.

Mike

Re: Problems with Image Statistics (fx:maxima etc.)

Posted: 2017-03-10T10:49:13-07:00
by fmw42
I am not sure what you mean by "o"? If you do fx:min.o, it is the same as fx:min.a (both represent transparency/opacity). To get the overall values just use fx:min

Re: Problems with Image Statistics (fx:maxima etc.)

Posted: 2017-03-10T18:33:34-07:00
by miket
:oops: Oooops - I stand corrected (it's been a long day).

From my tests, the fx:maxima, fx:minima %max & %min fx:mean & %mean functions (giving values across all channels) now seem to be operating correctly, giving values for all 3 channels (RGB) when alpha is off and 4 channels when alpha is on (RGBA).

However, the "o" channel values DO appear to give the same results as the 3/4 channel combined values above, which is incorrect. The "o" channel should give the max, min & mean for the opacity channel - (which I guess is the same as the alpha channel ?). I think this is the only point that still needs to be addressed.

Mike

Re: Problems with Image Statistics (fx:maxima etc.)

Posted: 2017-03-10T20:32:35-07:00
by fmw42
It is possible that .o is the inverted (negated) value of .a. I am not sure how IM is handling that, esp in IM 7.

The IM developer will have to comment on this.

Re: Problems with Image Statistics (fx:maxima etc.)

Posted: 2017-03-10T20:42:55-07:00
by miket
I thought I recalled reading something along those lines (opacity the invert of alpha). However, the test results I'm getting don't look like that's the issue. The "o" channel seem to be a duplicate of the "overall" statistics rather than the opacity values.

....... nearly there :)

Re: Problems with Image Statistics (fx:maxima etc.)

Posted: 2017-03-10T21:36:54-07:00
by fmw42
In IM 6, .a and .o are identical

Code: Select all

convert test.png -format "min=%[fx:minima.a], max=%[fx:maxima.a], mean=%[fx:mean.a], std=%[fx:standard_deviation.a]\n" info:
min=0.2, max=1, mean=0.266667, std=0.377124

convert test.png -format "min=%[fx:minima.o], max=%[fx:maxima.o], mean=%[fx:mean.o], std=%[fx:standard_deviation.o]\n" info:
min=0.2, max=1, mean=0.266667, std=0.377124

Re: Problems with Image Statistics (fx:maxima etc.)

Posted: 2017-03-11T14:55:52-07:00
by fmw42
Using IM 6.9.8.0 and IM 7.0.5.2, I am still seeing differences:

IM 6 verbose info:

Code: Select all

 Channel statistics:
    Pixels: 3
    Red:
      min: 0 (0)
      max: 65535 (1)
      mean: 43690 (0.666667)
      standard deviation: 37836.6 (0.57735)
      kurtosis: -2.33333
      skewness: -0.3849
      entropy: 0.918296
    Green:
      min: 0 (0)
      max: 65535 (1)
      mean: 21845 (0.333333)
      standard deviation: 37836.6 (0.57735)
      kurtosis: -2.33333
      skewness: 0.3849
      entropy: 0.918296
    Blue:
      min: 16384 (0.250004)
      max: 49151 (0.749996)
      mean: 32767.7 (0.500003)
      standard deviation: 16383.5 (0.249996)
      kurtosis: -2.33333
      skewness: -2.03457e-05
      entropy: 1
    Alpha:
      min: 13107 (0.2)
      max: 65535 (1)
      mean: 48059 (0.733333)
      standard deviation: 30269.3 (0.46188)
      kurtosis: -2.33333
      skewness: 0.3849
      entropy: 0.918296
  Image statistics:
    Overall:
      min: 0 (0)
      max: 65535 (1)
      mean: 28944.7 (0.441667)
      standard deviation: 29135.5 (0.44458)
      kurtosis: -1.9149
      skewness: 0.1516
      entropy: 0.938722
IM 7 verbose info:

Code: Select all

 Channel statistics:
    Pixels: 3
    Red:
      min: 0 (0)
      max: 65535 (1)
      mean: 43690 (0.666667)
      standard deviation: 37836.6 (0.57735)
      kurtosis: -2.33333
      skewness: -0.3849
      entropy: 0.918296
    Green:
      min: 0 (0)
      max: 65535 (1)
      mean: 21845 (0.333333)
      standard deviation: 37836.6 (0.57735)
      kurtosis: -2.33333
      skewness: 0.3849
      entropy: 0.918296
    Blue:
      min: 16384 (0.250004)
      max: 49151 (0.749996)
      mean: 32767.7 (0.500003)
      standard deviation: 16383.5 (0.249996)
      kurtosis: -2.33333
      skewness: -2.03457e-05
      entropy: 1
    Alpha:
      min: 13107 (0.2)
      max: 65535 (1)
      mean: 48059 (0.733333)
      standard deviation: 30269.3 (0.46188)
      kurtosis: -2.33333
      skewness: -0.3849
      entropy: 0.918296
  Image statistics:
    Overall:
      min: 0 (0)
      max: 65535 (1)
      mean: 36590.4 (0.558334)
      standard deviation: 29135.5 (0.44458)
      kurtosis: -1.9149
      skewness: -0.151608
      entropy: 0.938722
Everything is the same except for the overall means:

IM 6: mean: 28944.7 (0.441667)
IM 7: mean: 36590.4 (0.558334)



IM 6 FX stats:

Code: Select all

convert test.png -format "min=%[fx:minima.r], max=%[fx:maxima.r], mean=%[fx:mean.r], std=%[fx:standard_deviation.r]\n" info:
min=0, max=1, mean=0.666667, std=0.471405

convert test.png -format "min=%[fx:minima.g], max=%[fx:maxima.g], mean=%[fx:mean.g], std=%[fx:standard_deviation.g]\n" info:
min=0, max=1, mean=0.333333, std=0.471405

convert test.png -format "min=%[fx:minima.b], max=%[fx:maxima.b], mean=%[fx:mean.b], std=%[fx:standard_deviation.b]\n" info:
min=0.250004, max=0.749996, mean=0.500003, std=0.204121

convert test.png -format "min=%[fx:minima.a], max=%[fx:maxima.a], mean=%[fx:mean.a], std=%[fx:standard_deviation.a]\n" info:
min=0.2, max=1, mean=0.266667, std=0.377124

convert test.png -format "min=%[fx:minima.o], max=%[fx:maxima.o], mean=%[fx:mean.o], std=%[fx:standard_deviation.o]\n" info:
min=0.2, max=1, mean=0.266667, std=0.377124

convert test.png  -format "min=%[fx:minima], max=%[fx:maxima], mean=%[fx:mean], std=%[fx:standard_deviation]\n" info:
min=0, max=1, mean=0.500002, std=0.402538

IM 7 FX stats:

Code: Select all

magick test.png -format "min=%[fx:minima.r], max=%[fx:maxima.r], mean=%[fx:mean.r], std=%[fx:standard_deviation.r]\n" info:
min=0, max=1, mean=0.666667, std=0.57735

magick test.png -format "min=%[fx:minima.g], max=%[fx:maxima.g], mean=%[fx:mean.g], std=%[fx:standard_deviation.g]\n" info:
min=0, max=1, mean=0.333333, std=0.57735

magick test.png -format "min=%[fx:minima.b], max=%[fx:maxima.b], mean=%[fx:mean.b], std=%[fx:standard_deviation.b]\n" info:
min=0.250004, max=0.749996, mean=0.500003, std=0.249996

magick test.png -format "min=%[fx:minima.a], max=%[fx:maxima.a], mean=%[fx:mean.a], std=%[fx:standard_deviation.a]\n" info:
min=0.2, max=1, mean=0.733333, std=0.46188

magick test.png -format "min=%[fx:minima.o], max=%[fx:maxima.o], mean=%[fx:mean.o], std=%[fx:standard_deviation.o]\n" info:
min=0, max=1, mean=0.558334, std=0.444579

magick test.png  -format "min=%[fx:minima], max=%[fx:maxima], mean=%[fx:mean], std=%[fx:standard_deviation]\n" info:
min=0, max=1, mean=0.558334, std=0.444579

Four issues:

1) The std values are different between IM 6 and IM 7. I presume IM 6 is biased and IM 7 is unbiased

2) The overall means are different betweeen IM 6 and IM 7

3) In IM 6, the .o and .a values are the same. But IM 7, they are not the same. In IM 7 the .o values seem to be the same as the overall values

4) The IM 6 overall mean from the verbose info does not agree with the IM 6 overall mean from FX