testing brightness threshold to detect brightness changes