Recognition of Geometrical Shapes by Dictionary Learning