Serial and parallel approaches for image segmentation by numerical minimization of a second-order functional