Singular free boundary problem from image processing