At edge cases, we can pad our image with 0s so the filter weights aren’t multiplied with nonexistent values. Another common solution is to pad the image by copying its edge pixel values.

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

(Page 8)