Sparse coding of natural contours