2D Motif Basis Applied to the Classification of Digital Images