A quantitative analysis of source detection approaches in optical, infrared, and radio astronomical images