Page 1 of 1

possible bug in -convolve for zero-sum kernels

Posted: 2012-08-02T10:01:04-07:00
by fmw42
IM 6.7.8.7 Q16 Mac OSX Snow Leopard

-convolve with a zero sum (edge extraction) kernel is not behaving as it used to. The problem started at IM 6.7.6.6 from my tests. Anthony thinks it may have reverted to the GPU version rather than his -morphology version.


Input:

Image

Filter:

filt="
-1 -2 -1 \
-2 12 -2 \
-1 -2 -1 \
"

Recent versions after IM 6.7.6.5 including IM 6.7.8.7 produce the following:

convert lenag.jpg -convolve "$filt" lenag_filt_imb.jpg
Image

Even adding color management does not help
convert lenag.jpg -set colorspace RGB -convolve "$filt" lenag_filt_imc.jpg


Older version of IM (before 6.7.6.6) with -convolve produce:

im6 convert lenag.jpg -convolve "$filt" lenag_filt_im6.jpg
Image


IM 6.7.8.7 using -morphology convolve or correlate produce:

convert lenag.jpg -morphology correlate "$filt" lenag_filt_morph.jpg
Image

Re: possible bug in -convolve for zero-sum kernels

Posted: 2012-08-04T14:29:18-07:00
by magick
We can reproduce the problem you posted and have a patch. Look for it in ImageMagick 6.7.8-8 Beta by sometime tomorrow. Thanks.