Optimization approaches for the detection of subsurface defects