A looming detector for collision avoidance