The Sliding Window
A convolution kernel (or filter) is a small matrix — typically 3×3 or 5×5 — that is slid across every pixel of an image. At each position, the kernel values are multiplied element-wise with the underlying pixel values and summed to produce a single output pixel.
// 3×3 Sharpen kernel
const sharpen = [
[ 0, -1, 0],
[-1, 5, -1],
[ 0, -1, 0]
];
// Apply: for each pixel (x, y)
let sum = 0;
for (let ky = -1; ky <= 1; ky++)
for (let kx = -1; kx <= 1; kx++)
sum += image[y+ky][x+kx] * sharpen[ky+1][kx+1];Common Kernels
Different kernels produce dramatically different effects. The Gaussian blur kernel averages nearby pixels weighted by a bell curve. The Sobel operator uses two kernels — one for horizontal edges, one for vertical — and combines them via √(Gx² + Gy²).
Chaining Operations
In BVDART, convolution is the namesake technique. Artworks are built by composing chains of kernel operations — blur, then edge-detect, then sharpen — each one revealing hidden structure in noise fields and procedural textures. The order matters: the same kernels in a different sequence produce entirely different compositions.
