Intelligent detection of light in low light conditions