Piecewise linear approximation of vector-valued images and curves via second-order variational model