Convolve

Convolve images and audio with a supplied filter image or impulse response.

What it does

Convolve slides a kernel across an image, or an impulse response across an audio signal, blending every sample with its neighbours by that kernel's weights. On images this builds custom blurs, sharpens, edge detectors and bokeh shapes from a small weight pattern rather than a fixed built-in filter. On audio the same maths is convolution reverb: an impulse response applies that space's colour to the signal.

Mode is chosen from what is wired in. An image or Colour Field on Image In runs the 2D image path; a Number Array or Signal runs the 1D audio path. Mix crossfades between the untouched input and the fully convolved result in both paths, and Mode switches between standard convolution and cross-correlation.

When to use it

ParameterTypeDefault
image_inOneOf([FieldOf(Raster), NumberArray, Signal])
kernel_inOneOf([FieldOf(Raster), NumberArray, Signal])
modeString"Convolve"
mixNumber0.500
normalize_kernelBooleantrue
strengthNumber1

Gotchas

Audio convolution is block-streamed, so a live per-frame signal works as input. There is no need to pre-render the whole clip.

For audio, wire the impulse response's buffer output into Kernel In, not waveform. Waveform is a single frame and does not carry the full impulse response.

Normalize Kernel is on by default so brightness is preserved, matching how Nuke, After Effects and GIMP handle custom convolution kernels. Turn it off for edge-detection kernels that sum to zero: with normalisation on, a zero-sum kernel is divided down to almost nothing.

Worked example

  1. Add a Convolve node and wire an image into Image In.

  2. Wire a small kernel image, or another Convolve-friendly source, into Kernel In. This is the weight pattern applied to every pixel.

  3. Leave Normalize Kernel on for a brightness-preserving blur or sharpen, or switch it off for a sum-to-zero edge-detect kernel.

  4. Bring Mix down from 1 toward 0 to blend back toward the original image.

See also

Blur · Sharpen · FFT · Rasters (images)