Neural Ninjas CV Labs · Reference Companion

The Complete Kernel Reference

Every kernel in classical computer vision — smoothing, sharpening, edges, emboss, motion — is the same 3×3 or 5×5 grid of numbers with different values in different spots. This lab is the full map: every kernel type, what each position in the grid means, and what happens the instant you change one number.

Center The pixel being replaced. Its own weight decides how much of itself survives into the output.
Ready.
What this number means
Nudge 0
Guided experiments — isolate one number at a time

The five things every number in a kernel controls

Position

Centre = the pixel itself. Edge-adjacent (N/S/E/W) = the closest neighbours, strongest spatial link. Corner (diagonal) = weaker link, one step further. Where a number sits changes whose influence it controls.

Sign

Positive weights add a neighbour in. Negative weights subtract it out. All-positive kernels can only ever smooth or brighten. Mixed signs are what let a kernel detect change instead of just blending.

Magnitude, sum, and size

A number's size relative to its neighbours decides how much it dominates the average. The kernel's total sum decides overall brightness drift (sum=1 stable, sum=0 edge-only, sum>1 brightens). The kernel's physical size decides how far the influence reaches.

Predict, then verify

You take any working blur kernel and multiply every single number in it by 2, without changing the divisor. What happens to the output image?