In this paper we use neural networks to verify the similarity of real astronomical images to predefined reference profiles. We use an innovative technique to encode images that associates each of them with its most convenient moments, evaluated along the {x, y} axes; in this way we obtain a parsimonious but effective method with respect to the usual pixel by pixel description.