Most instructions on the web mention to do
convert *.tif -evaluate-sequence median output.tif
However, in recent versions of ImageMagick, this spits out a multi-page TIFF file that contains all the input images, one per page, instead of actually evaluating the median.
I found out that this occurs only when evaluating a long list of images, because of memory/disk space quotas respected by ImageMagick, even though my system has much more resources than those quotas.
To change the quotas, edit /etc/ImageMagick-6/policy.xml, particularly these two lines:
<policy domain="resource" name="memory" value="512MiB"/>
<policy domain="resource" name="disk" value="2GiB"/>
and increase them based on how much system resources you have. After that it worked for me. The "disk" quota is probably the most important one if evaluating the median of a long list of images.
I'm sharing this information here in case anyone else happens upon it by Googling.
Suggestion to the ImageMagick authors, in case they happen upon this by Googling: It would have been nice if ImageMagick produced an error message saying to edit the above file instead of dying with a multi-page TIFF, but thanks anyway!
It works fine for me on IM 6.9.10.64 Q16 Mac OSX with libtiff 4.0.10. I get only one page in my output TIFF.
Input:



convert lena.jpg lena.tif
convert mandril3.jpg mandril.tif
convert zelda1.jpg zelda.tif
convert *.tif -evaluate-sequence median result.tif

What is your ImageMagick version, platform and version of libtiff? Perhaps you need to upgrade. Or might you have mistyped either -evaluate-sequence or median?
Post your TIFF files and I will test them for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With