Algosim documentation: convolve

convolve

Applies a convolution filter to a pixmap and returns the result.

Syntax

Description

If pm is a pixmap and A a square matrix of odd size, then convolve(pm, A) applies the convolution filter with kernel A to pm and returns the result.

A predefined convolution kernel can be returned by the ConvolutionKernel function.

Examples

convolve(ExampleData("Sally"), RandomMatrix(11) / 20)

Image 1

convolve(ExampleData("Sally"), ConvolutionKernel("3×3 sharpen"))

Image 2

convolve(ExampleData("Sally"), ConvolutionKernel("3×3 Sobel 1") + ConvolutionKernel("3×3 Sobel 2"))

Image 3

See also