Added calculation of average image temperature