Bytes
rocket

Free Masterclass on Mar 21

Beginner AI Workshop: Build an AI Agent & Start Your AI Career

Convolution and Filters

Last Updated: 3rd February, 2026

At the core of every Convolutional Neural Network (CNN) is a mathematical operation called convolution. This operation allows CNNs to detect patterns in images the same way our eyes identify edges, textures, and shapes. Understanding convolution is essential, because it forms the foundation of how CNNs “see.”

What is Convolution?

Convolution is a process that combines two main components:

  1. The input image — represented as a matrix of pixel values.
  2. A filter (or kernel) — a smaller matrix, such as 3 × 3 or 5 × 5, designed to detect specific patterns.

The filter slides across the image like a scanner. At each position, it multiplies its values with the underlying image pixels and sums the result. The output of this operation forms a feature map, which highlights where the filter’s pattern is present in the image.

For example:

Filter (Edge Detector)OperationOutput
[[-1, 0, 1], [-1, 0, 1], [-1, 0, 1]]Detects vertical edgesEdge map highlighting boundaries

CNNs use multiple filters at each layer, allowing them to learn increasingly complex patterns:

  • Early layers: detect lines, edges, and basic curves.
  • Middle layers: detect textures, corners, and abstract shapes.
  • Deep layers: detect full objects like faces, vehicles, or animals.

This hierarchy gives CNNs their superpower — the ability to learn meaningful visual features automatically.

Example:

Image (3x3):      Filter:         Result:
1 2 1             0 1 0           8
0 1 0     *       1 -4 1   =     -4
2 1 2             0 1 0           8

In CNNs:

  • The image is convolved with several filters.
  • Each filter learns a different visual feature.

Picture22.png

Module 2: Inside Convolutional Neural Networks (CNNs)Convolution and Filters

Top Tutorials

Logo
Data Science

Python

Python is a popular and versatile programming language used for a wide variety of tasks, including web development, data analysis, artificial intelligence, and more.

8 Modules37 Lessons59857 Learners
Start Learning
Logo
Data Science

SQL

The SQL for Beginners Tutorial is a concise and easy-to-follow guide designed for individuals new to Structured Query Language (SQL). It covers the fundamentals of SQL, a powerful programming language used for managing relational databases. The tutorial introduces key concepts such as creating, retrieving, updating, and deleting data in a database using SQL queries.

9 Modules40 Lessons13986 Learners
Start Learning
Logo
Data Science

Data Science

Learn Data Science for free with our data science tutorial. Explore essential skills, tools, and techniques to master Data Science and kickstart your career

8 Modules31 Lessons8792 Learners
Start Learning
  • Official Address
  • 4th floor, 133/2, Janardhan Towers, Residency Road, Bengaluru, Karnataka, 560025
  • Communication Address
  • Follow Us
  • facebookinstagramlinkedintwitteryoutubetelegram

© 2026 AlmaBetter