We are interested in minimizing functionals with l2 data and gradient fitting term and (absolute) l1 regularization term with higher order derivatives in a discrete setting. We examine the structure of the solution in 1d by reformulating the original problem into a contact problem which can be solved by dual optimization techniques. The solution turns out to be a discrete polynomial spline whose knots coincide with the contact points. In 2d we modify Chambolle's algorithm to solve the minimization problem with absolute l1 norm and second order derivatives. This requires the application of fast cosine transforms. We demonstrate by numerical denoising examples that the l2 gradient fitting term can be used to avoid both edge blurring and staircasing effects