Hard exudates are one of the most characteristic and dangerous signs of diabetic retinopathy. They can be marked during the routine ophthalmological examination and seen in color fundus photographs (i.e., using a fundus camera). The purpose of this paper is to introduce an algorithm that can extract pathological changes (i.e., hard exudates) in diabetic retinopathy. This was a retrospective, nonrandomized study. A total of 100 photos were included in the analysis-50 sick and 50 normal eyes. Small lesions in diabetic retinopathy could be automatically diagnosed by the system with an accuracy of 98%. During the experiments, the authors used classical image processing methods such as binarization or median filtration, and data was read from the d-Eye sensor. Sixty-seven patients (39 females and 28 males with ages ranging between 50 and 64) were examined. The results have shown that the proposed solution accuracy level equals 98%. Moreover, the algorithm returns correct classification decisions for high quality images and low quality samples. Furthermore, we consider taking retina photos using mobile phones rather than fundus cameras, which is more practical. The paper presents an innovative approach. The results are introduced and the algorithm is described.