Wrote function to output image to new .pgm file
Wrote function to populate pixel energy matrix