Convolution: Kernels on an Image
Edge detection, blur, and sharpen are all the same nine-number trick. Slide a 3x3 kernel across an image and watch the multiply-and-sum behind each output pixel, the operation a CNN learns on its own.
Convolution: Kernels on an Image
A convolution slides a tiny grid of weights, the kernel, across an image. At each position it multiplies the kernel against the pixels underneath and sums them into one output pixel. That weighted local average is the whole operation. The surprise is how much falls out of just nine numbers: change the weights and the same machinery detects edges, blurs, or sharpens.
Pick a kernel, or edit the weights
Input, kernel, output
Move your pointer over the input to place the window, or press Step to advance it one pixel at a time. The highlighted 3x3 patch on the left feeds the one outlined pixel on the right.
Multiply, then add
Output pixel (11, 9) is the sum of nine products: each kernel weight times the input pixel beneath it. Cells marked with a dot read a clamped border pixel.