A confocal microscope can produce gray-scale images of the different layers of the cornea. We have addressed the problem of classifying these images, i.e. recognizing the layer displayed, using the shape of the cells contained, which is uniquely related to each specific layer. A first method was designed, based first on the binarization of the image and then on the description of the cell shape by means of Hu variables (central moments). An artificial neural network was used to classify each image according to the values assumed by these variables. A Matlab prototype of the classification system was developed, considering images of three corneal layers (Bowman membrane, stroma, endothelium) in normal subjects. The system was tested on 46 images, and good results were obtained. To avoid the critical step of binarization, an alternative cell shape description was investigated, based on Zernike moments, and a new network was developed and trained. The results achieved were better than those obtained with the previous technique, and also, no binarization was necessary.