Lighnting detection and tracking with consumer electronics