A grid of numbers
A grayscale image has a value at each position. A color image often has red, green and blue channels, though representations and scales vary. Pixel numbers alone do not tell the model what objects mean.
A local pattern
A filter can combine nearby pixel values. In the experiment, a fixed 2 × 2 filter [1, −1; 1, −1] computes left-column brightness minus right-column brightness. Its sign changes when the bright side changes. Change the top-left brightness. The grid shows the image; the filter result compares total brightness on the left with the right.
INTERACTIVE EXPLORATION
Change a pixel and detect an edge
Adjust the top-left pixel in a 2 × 2 grayscale image. Apply the fixed filter [1, −1; 1, −1] as written.
From patterns to learned features
Convolutional networks use shared local filters across locations and learn their weights from data. In many ML libraries the operation called convolution is technically cross-correlation; this example uses the filter as written.
Check your understanding
If all four pixels have the same value, what does the displayed left-minus-right filter output?
Zero. The positive and negative contributions cancel.