An automatic method to detect hard exudates, a lesion associated with diabetic retinopathy, is proposed. The algorithm found on their color, using a statistical classification, and their sharp edges, applying an edge detector, to localize them. A sensitivity of 79.62% with a mean number of 3 false positives per image is obtained in a database of 20 retinal image with variable color, brightness and quality. In that way, we evaluate the robustness of the method in order to make adequate to a clinical environment. Further efforts will be done to improve its performance.