Contour enhancement via a singular free boundary problem