Turning many images to one average image