takes in a binary image, loops through a 3x3 working matrix, smoothes pixels.