-fx and image statistics do not work?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
gemutlich

-fx and image statistics do not work?

Post 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
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: -fx and image statistics do not work?

Post 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].
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -fx and image statistics do not work?

Post 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.
gemutlich

Re: -fx and image statistics do not work?

Post 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
Post Reply