Page 1 of 1

-fx and image statistics do not work?

Posted: 2009-03-24T08:28:46-07:00
by gemutlich
Hello,
I would like to compute the standard deviation (or, actually the variance) of an image. When I try something like this:

Code: Select all

convert DarkAv.png -format '%[fx:w]' info:
I can easily get the width of an image. According to http://www.imagemagick.org/script/fx.php I should also be able to use "standard_deviation". However, when I try

Code: Select all

convert DarkAv.png -format '%[fx:standard_deviation]' info:
it says that convert is unable to parse the expression `standard_deviation'.
What am I doing wrong?
Thanks in advance!
Marcus

Re: -fx and image statistics do not work?

Posted: 2009-03-24T08:55:59-07:00
by magick
Could be a version problem. We're using ImageMagick 6.5.0-6 and it returns the correct results for %[fx:standard_deviation].

Re: -fx and image statistics do not work?

Posted: 2009-03-24T11:13:20-07:00
by fmw42
gemutlich wrote:Hello,
I would like to compute the standard deviation (or, actually the variance) of an image. When I try something like this:

Code: Select all

convert DarkAv.png -format '%[fx:w]' info:
I can easily get the width of an image. According to http://www.imagemagick.org/script/fx.php I should also be able to use "standard_deviation". However, when I try

Code: Select all

convert DarkAv.png -format '%[fx:standard_deviation]' info:
it says that convert is unable to parse the expression `standard_deviation'.
What am I doing wrong?
Thanks in advance!
Marcus

Try standard-deviation rather than standard_deviation. Both work for me on IM 6.5.0-6, but perhaps your version was before the change to make both work.

Re: -fx and image statistics do not work?

Posted: 2009-03-25T02:50:34-07:00
by gemutlich
magick wrote:Could be a version problem. We're using ImageMagick 6.5.0-6 and it returns the correct results for %[fx:standard_deviation].
Thanks! As you suspected it is a version problem. I had 6.4.0 and now after upgrading to 6.5.0 it works as advertised.

Marcus