We study some numerical properties of a nonconvex variational problem which arises as the continuous limit of a discrete optimization method designed for the smoothing of images with preservation of discontinuities. The functional that has to be minimized fails to attain a minimum value. Instead, minimizing sequences develop gradient oscillations which allow them to reduce the value of the functional. The oscillations of the gradient exhibit analogies with microstructures in ordered materials. The pattern of the oscillations is analysed numerically by using discrete parametrized measures.