Convolution playground
Select a result pixel to see exactly how it was computed.
PNG/JPEG/WebP up to 5 MiB and 4 MP. Working copy up to 128 px; all in your browser.
A computed example is shown. Changing settings requires JavaScript and Canvas.
Padding: left 1, right 1, top 1, bottom 1.
Edit any number. The divisor below sets normalization.
1×1 mixing after filtering
One weight per input channel for the selected output.
Exact values are in the point inspector
Grayscale 0…1: black to white.
Exact values are in the point inspector
Grayscale 0…1: black to white.
Select pixels with a pointer, touch or arrow keys. Calculations retain the original numbers; result colors show the selected map’s common range.
Operation and channel connections
Each input channel has its own output. This black-and-white example has one channel.
The color pattern and a photo have 3 RGB channels. Choose Feature patterns for 1–4 separate channels.
Window, stride and boundaries
All values in the selected calculation
Three experiments with a clear result
- Single bright pixel + Mean. Before changing anything, predict which nine cells will be nonzero. Inspect one: 1/9. Switch to Identity: exactly one bright pixel should remain.
- Binary edge + Sobel X. In a uniform area, positive and negative contributions cancel. At the edge they do not. Select both locations and identify the difference in their calculations.
- Gray ramp + Mean. Under Window, stride and boundaries, change only stride from 1 to 2. Weights stay fixed, but fewer window positions fit. Check the output size and two neighboring positions.
What the settings mean
Stride sets the distance between windows; dilation sets the distance between samples within a kernel. Padding lets windows reach beyond the image; the boundary rule supplies values there. Channel connections determine which input maps contribute to each output.
Images enter as browser-decoded RGB, not RAW or linear light. The teaching calculation retains fractional and negative values rather than clipping them to display colors. No neural network is trained here.