convolveΒΆ

module daffodil.filter.convolve
auto convolved(V)(const Image!V image, const real[] matrix, int width, int[2] center)
auto convolved(string axis, V)(const Image!V image, const real[] matrix, int center)
auto convolved(string axis, V)(const Image!V image, const real[] matrix)

Convolve a flat 2D matrix with a given center over an image and return the result.

With a matrix [0.5, 0.5] with width 2 and center [0, 0] convolved over an image each resulting pixel will be a 50:50 mix of itself and its right neighbour.

TODO: Abstract away matrix, width and center into a kernel