For a pixel in image I at I,j
Computing this for every pixel location
is the convolution of the image I with the template (or kernel)
consisting of a 3x3 array of 1s.
Note that is this O(n2m2)
for an nxn image and mxm template.
Note we have to normalize the template
to 1 to make sure we dont introduce any scaling into the image.