Convolution is a mathematical operation that slides a small matrix (filter/kernel) across a larger matrix (image), computing element-wise multiplications and sums at each position.
Key Properties:
• Local Connectivity: Each output depends only on a small region
• Weight Sharing: Same filter applied everywhere
• Translation Equivariance: Shifted input → shifted output
• Feature Detection: Filters learn to detect patterns
The Formula:
Output(i,j) = Σ Σ Input(i+m, j+n) × Kernel(m,n)
Real-World Analogies
🔍 The Magnifying Glass
Sliding a magnifying glass over a document to examine each part - the lens is your kernel!
📌 The Pattern Stamp
Like using a stamp to check if a pattern matches at each position on a page.
🪟 The Sliding Window
Looking through a small window that slides across a large wall, seeing only what's visible through the window.
🔦 The Flashlight Beam
Scanning a dark room with a flashlight - you process the room one illuminated patch at a time.