Contour Extraction Algorithm Using a Robust Neural Network