Interactive Lab · Computer Vision

How does a CNN actually "see" an image?

There's no magic and no hand-coded rules. A convolutional net slides a tiny 3×3 grid of numbersa kernelacross every pixel, multiplies, and sums. That single dumb operation can find edges, blur, sharpen, or emboss depending only on the nine weights. Change the weights below and watch the image transform live, then meet the punchline: a CNN learns those weights on its own.

🎬 Watch the 45-second explainer, then try it yourself below ↓

▶ The playground, pick a kernel or type your own nine numbers

Input image

→

Output, filtered

The kernel · editable

preset · Edge-detect weight sum · 0 divisor · 1 bias · 128
offfast

🧭 Where this fits

Convolution is the eye of computer vision: the same 3×3 kernels you just hand-tuned are what a CNN *learns*, edge detectors in layer 1, textures in layer 2, faces by layer 5. It also lives in Photoshop filters, medical imaging, and audio processing; understanding kernels by hand is how you read what a trained convnet is doing.

The code that's actually running



  

🔮 Predict, then test

Pick Sobel-X and look at which edges glow, now switch to Sobel-Y. Before you click: predict which edges each one lights up (vertical or horizontal?) and why. Then set every weight to 0 except the center = 1, what should come out? Finally, make the center 5 and the four sides −1: is that sharpening or blurring, and how can you tell from the numbers alone?

The takeaway

Your new mental model of a conv layer