Diabetes disrupts the operation of the eye and leads to vision loss, affecting particularly the nerve layer and capillary vessels in this layer by changes in the blood vessels of the retina. Suddenly loss and blurred vision problems occur in the image, depending on the phase of the disease, called diabetic retinopathy. Hard exudates are one of the primary signs of diabetic retinopathy. Automatic recognition of hard exudates in retinal images can contribute to detection of the disease. We present an automatic screening system for the detection of hard exudates. This system consists of two main steps. Firstly, the features were extracted from patch images consisting of hard exudate and normal regions using the DAISY algorithm based on the histogram of oriented gradients. After, we utilized the recursive feature elimination (RFE) method, using logistic regression (LR) and support vector classifier (SVC) estimators on the raw dataset. Therefore, we obtained two datasets containing the most important features. The number of important features in each dataset created with LR and SVC was 126 and 259, respectively. Afterward, we observed different classifier algorithms' performances by using 5-fold cross validation on these important features' dataset and it was observed that the random forest (RF) classifier is the best classifier. Secondly, we obtained important features from the feature vector that corresponds with the region of interest in accordance with the keypoint information in a new retinal fundus image. Then we performed detection of hard exudate regions on the retinal fundus image by using the RF classifier.