Oil spill accidents in marine environments have a massive impact on ecosystems. Various methods have been developed to detect oil spills using high-resolution optical imagery. However, ocean waves caused by heavy winds occurring in the accident area cause sun glint in the image, and this severely impedes the ability to detect the oil spill area. The objective of this study was to detect oil spill areas from high-resolution optic images using the artificial neural network (ANN) through effective suppression of severe sun glint effects. To enable this, a directional median filter (DMF) was adapted, and its use was compared with that of a traditional low-pass filter. A performance test was conducted using a KOMPSAT-2 image acquired during oil spill accidents that occurred in the Gulf of Mexico in 2010. The proposed method involved two main steps: (i) The sun glint effects caused by the ocean waves were corrected using the DMF; and (ii) the ANN approach was used to detect the oil spill area. The results show the following: (i) The designed DMF, which considers the size and angle of ocean waves, was proficient in correcting the sun glint effect in a high-resolution optical image; and (ii) oil spill areas were efficiently detected using the ANN approach with the proposed filtering method. The oil spill area was classified with accuracies of approximately 98.12% and 89.56% using the receiver operating characteristic (ROC) curve and probability of detection (POD) measurements, respectively. These results show that the accuracy of the proposed method is improved by about 9% compared to the traditional detecting algorithm.