Discrete Regularization for Perceptual Image Segmentation via Semi-Supervised Learning and Optimal Control