Page 1 of 1

Convolution with non-square kernels

Posted: 2012-06-29T03:54:30-07:00
by JACH
Hi @all,

I'm currently working on a project where I have to use Magick++ (6.5.1).
At the moment I'm trying to find a way to convolve an image with an non-square kernel. The convolve-method of Magick::Image however seems to work only with square-kernels, as it only takes one integer for the kernels dimensions. I found an old thread from 2008 (viewtopic.php?f=3&t=11122) where non-square kernels where added to the wishlist.
What happened to that wish? Is there now a way to too this, other than padding the kernel with zeros?
And btw: How does the convolve-method deal with the border-problem?

Re: Convolution with non-square kernels

Posted: 2012-06-29T12:22:38-07:00
by fmw42
It was done in -morphology convolve/correlate in IM 6

see
http://www.imagemagick.org/Usage/convolve/


I do not know if it was folded back into -convolve in IM 6, but I believe it will be in IM 7.