Gladni blokovi
AI FOR VET • MODULE 7
Computer Vision Foundations: 2D Convolutional Kernels
How Convolutional Neural Networks (CNN) extract edges, textures and features from images.
🎯 Learning Outcomes / Ishodi učenja:
- Understand a digital image as a 2D matrix of pixel brightness values.
- Calculate 3×3 convolution kernel dot products step-by-step.
- Apply smoothing/blur, sharpening, and edge detection (Sobel, Laplacian).
- Inspect the mathematical calculation by tapping any pixel in the output.
A convolution kernel is a small 3×3 magnifying glass sliding over every image pixel. It multiplies the 9 neighboring pixels by its weights and sums them up. All modern vision AI (face recognition, defect detection, autonomous cars) begins with convolution.
S(i, j) = ∑ ∑ I(i − m, j − n) · K(m, n)
Tap any pixel on the result canvas to reveal its 9 inputs, weights, and divisor.
🔬 Interactive Laboratory / Interaktivna laboratorija:
🔍 Guided Investigation / Istraživački zadatak:
- Interactive inspector: Click any pixel in the output image to see the full formula and calculation.
- Edge detection: Select preset Sobel horizontal or Sobel vertical. How do edges highlight?
- Gaussian blur: Switch image to Noisy and select Gaussian blur. Watch noise disappear.