CQW holiday project: temperature measurement

imagine to measure the temperature \(T\) of a black body by determining the mean photon wavelength \(\langle\lambda\rangle\) through an arithmetic average over many individual photon wavelengths \(\lambda_i\). how accurate is the estimate of the temperature after counting \(N\) photons, and how does the measurement time for reaching a certain precision \(\Delta T/T\) scale with \(T\)?

bonus question: would the measurement work with every moment \(\langle\lambda^n\rangle\)? Would a photon count enable you to measure the temperature as well?