Pattern Recognition by Detection of Local Symmetries