Home▸Algorithms & AI▸How Convolution Kernels Transform Images (2D)

🧮 How Convolution Kernels Transform Images (2D)

2D Canvas companion: watch a 3x3 kernel slide across a pixel grid and build an output feature map live, for blur, sharpen, edge-detect and emboss filters.

Algorithms & AI2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-convolution-kernel-filters-image-visual-guide-lab ↗ Open standalone

This 2D companion draws the same 3x3-kernel convolution as the 3D lab on a flat canvas: an input pixel grid on the left, a live output feature map on the right, and a highlighted window sweeping across the input as each dot product is computed. Pick a kernel and source image, then watch blur, sharpen, edge-detect and emboss each transform the same picture differently.

Frequently Asked Questions

What does the kernel window highlight show?

The bright rectangle marks the 3x3 neighbourhood of pixels the kernel is currently reading from the input grid; edge pixels are clamped so the window never reads outside the image.

Why do different kernels produce such different results?

Each kernel is just a different 3x3 weight pattern. Averaging weights blur, a strong positive center with negative neighbours sharpens, and opposite-signed neighbours cancel flat regions but light up where brightness changes sharply — an edge.

⚙ Under the hood

2D Canvas convolution lab: a 3x3 kernel slides across a pixel grid and builds a live output feature map, for blur, sharpen, edge-detect and emboss filters.

convolutionimage processingneural networkscomputer visionfiltering

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)