Shape analysis and symmetry detection in gray