System for detecting and classifying objects