Adding to DetectEdges to improve obstacle detection