Generating average images.