Nonlinear optimisation method for image segmentation and noise reduction using geometrical intrinsic properties