possible bug in -convolve for zero-sum kernels

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

possible bug in -convolve for zero-sum kernels

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

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

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