Convolution with non-square kernels

Magick++ is an object-oriented C++ interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick++.
Post Reply
JACH
Posts: 1
Joined: 2012-06-29T03:40:00-07:00
Authentication code: 13

Convolution with non-square kernels

Post by JACH » 2012-06-29T03:54:30-07:00

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?

User avatar
fmw42
Posts: 25765
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Convolution with non-square kernels

Post by fmw42 » 2012-06-29T12:22:38-07:00

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.

Post Reply