Total-Variation Based Piecewise Affine Regularization