Skip to main content

The Sliding Template

This video presents the same text shown beside it, spoken and on screen. It adds nothing the text does not say.

State

Convolution slides a small template of weights across the grid, computing the same weighted sum at every position — reporting, for each neighborhood, how strongly it matches the template's pattern.

Show

One line of numbers proves the idea. Take a row with a hard boundary in it — 0, 0, 0, 9, 9, 9 — and slide the two-cell template (−1, +1), which asks: how much brighter is the right cell than the left? Position by position, the outputs read 0, 0, 9, 0, 0. Uniform stretches score zero; the edge announces itself with a spike. One template, arithmetic only, and the grid's first secret — where things change — has been extracted. Reverse the row to 9, 9, 9, 0, 0, 0 and the spike returns as negative 9: the template reports direction of change, dark-to-bright positive, bright-to-dark negative.

Watch for

The local constraint is the wisdom — nearby pixels are related, far ones mostly are not, so the machinery is told to look locally.