Eliminating the effects of refractive indices for both white smokes and black smokes in optical fire detector