How do computers find edges in an image?

Of course, to a human this is a trivial task. But to a computer, all that it “sees” is a collection of RGB values.

One popular technique is called the Sobel operator.

Kernels & Convolutions

Kernel

In image processing, a kernel is also called a “mask” or “filter”.

This is kernel/mask/filter for horizontal edge detection:

This is a kernel for vertical edge detection:

Convolution

  • Padding
  • Stride

3D Convolution Animation

GIF Credit

Still curious?