We propose an automated segmentation method to detect, segment, and quantify hyperreflective foci (HFs) in three-dimensional (3-D) spectral domain optical coherence tomography (SD-OCT). The algorithm is divided into three stages: preprocessing, layer segmentation, and HF segmentation. In this paper, a supervised classifier (random forest) was used to produce the set of boundary probabilities in which an optimal graph search method was then applied to identify and produce the layer segmentation using the Sobel edge algorithm. An automated grow-cut algorithm was applied to segment the HFs. The proposed algorithm was tested on 20 3-D SD-OCT volumes from 20 patients diagnosed with proliferative diabetic retinopathy (PDR) and diabetic macular edema (DME). The average dice similarity coefficient and correlation coefficient (
) are 62.30%, 96.90% for PDR, and 63.80%, 97.50% for DME, respectively. The proposed algorithm can provide clinicians with accurate quantitative information, such as the size and volume of the HFs. This can assist in clinical diagnosis, treatment, disease monitoring, and progression.