Structural approach to discriminate planar shapes