Skip to content
AI360XpertBeta
Playgrounds

Foundations

Image Kernels

How a small matrix of weights (a kernel) slides over a larger grid (an image) to compute local features via dot products.

Stage 1 of 4: The Input

Vertical Edge image, Vertical Edge kernel. Window at row 0, column 0: 0×-1 + 0×0 + 0×1 + 0×-1 + 0×0 + 0×1 + 0×-1 + 0×0 + 0×1 = 0. 16 scan positions in total.

  • Input Pixel
  • Kernel Window
  • Output Cell

Swap the input. A filter only fires on an image that contains its pattern.

Input Pixels36Input Pixels: 36

An image is just a grid of values. Switch between the two images and read the pixel values — 36 of them, each one an intensity.

Check your understanding

See how small grids of weights slide across an image to detect edges and patterns.

Image Kernels

Before neural networks learn their own filters, traditional computer vision relies on hand-crafted kernels. These small matrices slide across an image to find patterns, like edges or specific textures.

This lab visualizes that mathematical sliding process—the discrete convolution. Watch the dot product update cell by cell to produce a new feature map.

Switch the image and watch the same kernel go silent: a filter is a template, and the dot product only responds when the underlying pattern is actually there.

Reference

Kernel (Filter)
A small matrix of weights used to extract features
Feature Map
The output image produced by the convolution
Dot Product
Element-wise multiplication followed by a sum
Gain
The sum of a kernel’s weights. Unity gain (sum = 1) preserves overall brightness; zero gain (sum = 0) is what makes an edge detector return nothing on a flat region.
Cross-correlation
A true convolution flips the kernel first; every framework skips the flip because the weights are learned either way. The name stuck.

Break it on purpose

Point a filter at an image that does not contain its pattern — the Horizontal Edge kernel on the Vertical Edge image, or the Vertical Edge kernel on the Horizontal Edge image — and all 16 feature-map cells read exactly 0. Nothing is broken: the filter is reporting truthfully that the feature it looks for is absent.