First, we pad our image with 0s. This is because overlaying our filter on edge pixels can mean that the filter will be applied to nonexistent values.

Illustration of a filter overlaid on the edge pixels of an image.

Illustration of an image with 0s lining each pixel around the image.

(Page 7)