Added function to sum 9x9 neighborhood and determine current pixel is target or background