Detecting objects under challenging illumination conditions