
I'm tring extracting from a jpeg image like this (in.jpg)

only the pixels that have a NOT GRAY color.
My idea is producing a black&white mask like this (mask.png)

and go to this final result (out.png)

So... I know that gray pixels have R=G=B or saturation=0.
The first step I tried was:
convert in.jpg -fx "saturation>0" mask.png
BUT I receive an error:
convert: unable to parse expression 'saturation'
Is this a bug or the "saturation" expression don't exist anymore?
I'm running imagemagick 6.2.9 Q8 on Windows XP.
Thanks everyone can help me.