← Neural NetworksToolsInVisionLearning Center
Convolutional Neural Networks · Lesson 45

Filters and Convolution

See how learnable kernels scan images and respond to useful patterns.

Watch the lesson

Filters and Convolution explained visually

2:20

Connect familiar image filters with the learnable kernels inside a CNN.

Lesson overview

What you will learn

Follow filters, pooling, flattening, and classification through complete CNN examples.

  1. SMALL LEARNABLE MATRIX
  2. ELEMENTWISE RESPONSE
  3. EDGE FILTER
  4. TEXTURE FILTER
01

SMALL LEARNABLE MATRIX

A filter is a small matrix of learnable values that examines one image region.

02

ELEMENTWISE RESPONSE

Convolution multiplies corresponding values and combines them into one response.

03

EDGE FILTER

Different filters can respond to edges, textures, curves, or other useful patterns.

04

TEXTURE FILTER

Backpropagation and optimization learn the filter values from training examples.

Knowledge check

Quick check: test your understanding

What is another name for a filter?

A kernel.

What produces one convolution response?

Multiplying corresponding values and adding the products.

How are CNN filter values selected?

Training learns them through backpropagation and optimization.

Accessible referenceLesson 45 transcript308 words · Matches the published narration and captionsOpen transcript

A filter, also called a kernel, is a small matrix of learnable values. A common filter size is three by three, which means the filter contains nine values. During convolution, the filter is placed over a small region of the image. Each filter value is multiplied by the corresponding image value.

The products are added together to produce one output value. The filter then moves to another position and repeats the calculation. Each filter searches for a particular type of pattern. Consider a photograph of a building. One filter may respond strongly to vertical edges created by walls and windows.

Another may detect horizontal edges along the roof. Image-processing filters can be designed manually. For example, a Sobel filter uses fixed values to emphasize horizontal or vertical edges. A CNN works differently because it learns useful filter values during training. At the beginning, the filter values may be initialized randomly.

The network applies them, produces a prediction, and calculates a loss. Backpropagation determines how each filter value contributed to the error. The optimizer then updates those values. After many training examples, different filters may become sensitive to patterns that help solve the task. A filter used for animal classification may learn textures resembling fur or stripes.

A filter used for road analysis may respond to lane markings or vehicle boundaries. The same convolution process can also produce familiar image effects. A blur filter combines neighboring pixels to smooth detail. A sharpening filter emphasizes differences between nearby values. Edge filters highlight rapid changes in brightness.

CNN filters use the same general mathematical operation, but training determines which patterns become useful. The key idea is that a filter converts a small input region into one response. Sliding that filter across the image shows where its learned pattern appears. In the next lesson, we will calculate one convolution step by step.