Concept

Convolution Kernel as a Finite Difference Operator

A convolution kernel can act as a finite difference operator to locate pixel changes for edge detection. For example, a 1×21 \times 2 kernel like [1,1][1, -1] computes the difference between horizontally adjacent pixels, xi,jx(i+1),jx_{i,j} - x_{(i+1),j}. This cross-correlation operation serves as a discrete approximation of the first derivative in the horizontal direction. Mathematically, for an image function f(i,j)f(i,j), its derivative is if(i,j)=limϵ0f(i,j)f(i+ϵ,j)ϵ-\partial_i f(i,j) = \lim_{\epsilon \to 0} \frac{f(i,j) - f(i+\epsilon,j)}{\epsilon}. By applying this kernel, the output is zero where adjacent pixels are identical and non-zero at boundaries, effectively detecting edges.

Image 0

0

1

Updated 2026-05-12

Tags

Data Science

D2L

Dive into Deep Learning @ D2L