Page 1 of 1

Photoshop filter "minimum" equivalent in IM ?

Posted: 2013-01-14T15:06:16-07:00
by badabou
Hello,

There's there an equivalent filter in Photoshop "minimum" (filter > others > minimum) in Imagemagick ?

Here is an preview :

Image

Thanks

Re: Photoshop filter "minimum" equivalent in IM ?

Posted: 2013-01-14T20:21:39-07:00
by fmw42
convert image -statistic minimum 3x3 output

3x3 corresponds to radius=1
5x5 corresponds to radius=2
etc

see
http://www.imagemagick.org/script/comma ... #statistic

Re: Photoshop filter "minimum" equivalent in IM ?

Posted: 2013-01-14T23:59:53-07:00
by anthony
In a similar way with more control on the 'neighbourhood' use Morphology Erode.
Or if you want to preserve colors ErodeIntensity whcih compared pixels using the grayscale intensity of the pixel as a whole.
(Eventually I'd like a method that defines what 'intensity' means for a number of operators.

See Morphology, Intensity Variants
http://www.imagemagick.org/Usage/morphology/#intensity

Re: Photoshop filter "minimum" equivalent in IM ?

Posted: 2013-01-15T09:11:28-07:00
by badabou
Thanks.

But I use this version of imagemagick that does not support this operator, you have there an alternative ?

# convert -version
Version: ImageMagick 6.5.9-3 2012-11-04 Q16 http://www.imagemagick.org
Copyright: Copyright (C) 1999-2010 ImageMagick Studio LLC
Features:

Re: Photoshop filter "minimum" equivalent in IM ?

Posted: 2013-01-15T10:05:26-07:00
by fmw42
see my response above, though -statistic, may be too new also as I think it was only created at IM 6.6.8-6

Your version of IM is way too old (more than 200 versions). Perhaps you should consider upgrading.

Have you tried

convert image -morphology erode diamond:1 output


Your version may just be enough for that

Re: Photoshop filter "minimum" equivalent in IM ?

Posted: 2013-01-16T03:04:22-07:00
by badabou
Thanks, this work !

For your information, when I wanted to update imagemagick, imagick extension not working properly with my scripts.

Re: Photoshop filter "minimum" equivalent in IM ?

Posted: 2013-01-16T11:49:50-07:00
by fmw42
badabou wrote:Thanks, this work !

For your information, when I wanted to update imagemagick, imagick extension not working properly with my scripts.
Try reloading Imagick and use the latest version http://pecl.php.net/package/imagick/3.1.0RC2