Because the filter function is computed over each pixel in an image, the function may end up being computed over "out of bounds" pixels when the filter aligns with an edge pixel. To counteract this, we can "pad" the image with 0s.

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 3)