Boost logo

Boost :

From: Mateusz Loskot (mateusz_at_[hidden])
Date: 2019-07-22 19:24:09


On Mon, 15 Jul 2019 at 22:37, Mateusz Loskot <mateusz_at_[hidden]> wrote:
>
> In this thread, I'm archiving some comments related to discussion
> we recently held with Miral on Gitter due to issues with implementation
> of convolution in the current Numeric extension.

To wrap this thread up:

Miral has implemented a basic convolution routine for her needs.

Pranam Lashkari helped greatly reviewing both, Miral's code and
the Numeric implementation, comparing both, and identified
mistakes in our usage of the existing routines.

Long story short:

Since the Numeric's convolve_rows/cols are generic implementation of
convolution,
for the mean kernel (and any other averaging kernels) they do not
apply the division
by number of kernel elements after addition of the 'pixel *
kernel'-weighted results.
So, this averageing has to be 'built-in' into the kernel itself to
accommodate for
that important property of the mean kernel.
Hence, the normalized mean kernel is required!
(otherwise, the convolution will produce garbage.)

Best regards,

-- 
Mateusz Loskot, http://mateusz.loskot.net

Boost list run by Boost-Gil-Owners