Diabetic retinopathy (DR) is an important cause of visual impairment in developed countries. Automatic recognition of DR lesions in fundus images can contribute to the diagnosis of the disease. The aim of this study is to automatically detect one of these lesions, hard exudates (EXs), in order to help ophthalmologists in the diagnosis and follow-up of the disease. We propose an algorithm which includes a neural network (NN) classifier for this task. Three NN classifiers were investigated: multilayer perceptron (MLP), radial basis function (RBF) and support vector machine (SVM). Our database was composed of 117 images with variable colour, brightness, and quality. 50 of them (from DR patients) were used to train the NN classifiers and 67 (40 from DR patients and 27 from healthy retinas) to test the method. Using a lesion-based criterion, we achieved a mean sensitivity (SE(l)) of 88.14% and a mean positive predictive value (PPV(l)) of 80.72% for MLP. With RBF we obtained SE(l)=88.49% and PPV(l)=77.41%, while we reached SE(l)=87.61% and PPV(l)=83.51% using SVM. With an image-based criterion, a mean sensitivity (SE(i)) of 100%, a mean specificity (SP(i)) of 92.59% and a mean accuracy (AC(i)) of 97.01% were obtained with MLP. Using RBF we achieved SE(i)=100%, SP(i)=81.48% and AC(i)=92.54%. With SVM the image-based results were SE(i)=100%, SP(i)=77.78% and AC(i)=91.04%.