International Journal of Electrical and Computer Engineering (IJECE) Vol. No. June 2025, pp. ISSN: 2088-8708. DOI: 10. 11591/ijece. Development of watershed algorithm for identification of diabetic retinopathy based on fundus images Surmayanti1. Sumijan1. Saiful Bukhori2 Department of Informatics Management. Computer Science Faculty. Universitas Putra Indonesia YPTK. Padang. Indonesia Department of Information Technology. Computer Science Faculty. Universitas Putra Indonesia YPTK. Padang. Indonesia Department of Information Technology. Universitas Jember. Jember. Indonesia Article Info ABSTRACT Article history: Diabetic retinopathy (DR) is a serious complication of diabetes that can lead to blindness if not detected early. This research presents a novel method for the identification of DR using fundus images, employing the Watershed Algorithm for accurate image segmentation and the gray level co-occurrence matrix (GLCM) for texture feature extraction. The image processing pipeline involves several stages, including grayscale conversion, noise reduction through Gaussian and median filters, and Otsu's thresholding to isolate key features such as retinal lesions. The watershed algorithm is applied to delineate the boundaries of abnormal regions, while the GLCM method extracts texture features like contrast, correlation, energy, and homogeneity, which are essential for diagnosing retinal abnormalities. The proposed approach demonstrates a high accuracy rate of 92%, successfully identifying abnormalities in 46 out of 50 fundus images. The method shows significant potential for enhancing early detection of DR, providing accurate segmentation and texture analysis, making it a valuable tool for medical professionals in diagnosing retinal diseases. Received Nov 26, 2024 Revised Mar 12, 2025 Accepted Mar 20, 2025 Keywords: Diabetic retinopathy Extraction method Fundus image Identification Watershed algorithm This is an open access article under the CC BY-SA license. Corresponding Author: Surmayanti Department of Informatics Management. Faculty of Computer Science. Universitas Putra Indonesia YPTK Padang 25221. Padang. West Sumatera. Indonesia Email: surmayanti@upiyptk. INTRODUCTION Diabetic retinopathy (DR) is a leading cause of blindness worldwide, primarily affecting individuals with diabetes due to uncontrolled blood sugar levels that damage the retinal blood vessels . Early diagnosis and treatment of DR are crucial to prevent irreversible vision loss. however, existing manual screening methods are time-intensive, require specialized expertise from ophthalmologists, and are impractical for large-scale implementation . Previous solutions, such as those employing basic morphological operations or convolutional neural networks (CNN. , have made significant strides in automating DR detection but face limitations . These include challenges in accurately segmenting pathological features like lesions and exudates in noisy or complex fundus images, high computational costs, and limited generalizability across diverse datasets . Our research aims to overcome these constraints by integrating the watershed algorithm for precise image segmentation and the gray level co-occurrence matrix (GLCM) for robust texture feature extraction . This novel approach seeks to enhance segmentation accuracy, improve feature analysis, and provide an efficient, scalable solution for early DR detection, ultimately addressing the limitations of existing methodologies and supporting timely diagnosis and intervention . Journal homepage: http://ijece. ISSN: 2088-8708 Morphological operations in the field of digital image processing are techniques that use structuring elements to process and analyze shapes and structures within images . In the context of fundus images for the identification of DR, morphological operations play a crucial role in extracting and identifying pathological features such as microaneurysms, hard exudates, and hemorrhages . Basic morphological techniques like dilation and erosion help enlarge and shrink object areas to fill gaps or remove noise. The combination of dilation and erosion, known as opening and closing operations, is used to improve image quality by removing small noise and smoothing object contours . , . For instance, the opening operation can be used to remove noise from the background of fundus images, while the closing operation can help fill gaps in damaged vascular Additionally, operations such as top-hat and bottom-hat transformations are used to highlight bright or dark features on an uneven background, aiding in the detection of microaneurysms and exudates. Skeletonization is another technique that reduces vascular objects to thin lines, maintaining the topological structure for further analysis . The implementation of morphological operations allows for enhanced contrast and visibility of pathological features, facilitating automatic detection and analysis of DR using machine learning algorithms. By improving the quality of fundus images and highlighting critical features, morphological operations significantly contribute to the accuracy and efficiency of early DR detection systems, which are essential for preventing blindness in diabetic patients. Research on this topic has previously been conducted by Saman et al. , focusing on the automatic detection and severity classification of DR. The aim was to develop a method for the automatic detection of DR and propose a model to determine its progression/severity using fundus images. This method was designed to detect DR effectively and efficiently before causing eye damage, without requiring an ophthalmologist's Manual screening necessitates ophthalmologists and substantial time resources. Detecting exudates is crucial for diagnosing DR. The approach included: . extracting significant features from the images, such as blood vessels, the optic disc (OD), exudates, and microaneurysms using morphological operations, and i. classifying the severity as mild or moderate using a support vector machine (SVM) classifier to assist The proposed method's performance was evaluated and approved by ophthalmologists. This paper contributes to the field of automatic detection of abnormal structures and their severity. Another study by Sarki et al. examined image preprocessing in the classification and identification of DR. This paper systematically studied the importance of image processing for DR classification. The proposed automatic classification framework for DR was achieved through several steps: image quality enhancement, image segmentation . egion of interes. , image augmentation . eometric transformatio. , and classification. Optimal results were obtained using traditional image processing methods combined with a newly constructed CNN The newly built CNN, combined with traditional image processing approaches, showed the best performance with high accuracy in DR classification. Experimental results demonstrated adequate accuracy, specificity, and sensitivity. Furthermore. Long et al. conducted research on machine learning-based detection and classification of DR. Fundus imaging tools and open-domain datasets for DR-related research were introduced. Various diagnostic methods based on machine learning were also introduced, including exudate and microaneurysm detection methods. DR classification methods with different severity scales, and segmentation methods for the optic disc and blood vessels. The application of machine learning models in real-life scenarios was also discussed. Morphological operations in digital image processing have seen significant advancements in recent years, especially with the integration of new techniques and computational improvements. Classical morphological operations like dilation, erosion, opening, and closing have been expanded with more complex For example, top-hat and bottom-hat transformations are now commonly used to highlight specific features in images. Additionally, techniques such as skeletonization have been improved to provide more accurate representations of the morphological structure of objects in images. Integrating morphological operations with machine learning, particularly neural networks, has paved the way for more accurate and efficient detection and classification. For instance. CNN often use morphological operations as part of the preprocessing stage to improve image quality before feature extraction and further classification. Studies have shown that this combination can enhance the accuracy of detecting pathological features like microaneurysms and exudates in medical images, specifically in fundus images. DR remains a significant cause of blindness, particularly in diabetic populations, due to delayed detection and diagnosis. Existing methodologies for DR detection, such as those by Saman et al. , employed image processing with morphological operations and machine learning models to classify severity but faced challenges in achieving precision under varying image qualities. Similarly. Sarki et al. developed CNNs combined with preprocessing techniques, yielding high accuracy but requiring substantial computational Despite these advancements, unresolved challenges include the optimization of segmentation techniques and robust feature extraction for diverse datasets. Our research introduces a novel integration of the watershed algorithm and the GLCM for precise segmentation and texture feature extraction, respectively. These contributions address gaps in efficiency and reliability, demonstrating a robust approach for early-stage Int J Elec & Comp Eng. Vol. No. June 2025: 2845-2856 Int J Elec & Comp Eng ISSN: 2088-8708 DR diagnosis. The subsequent sections detail our methodological innovations, validate our findings, and compare them against prior benchmarks. Despite significant advancements in digital image processing and machine learning, existing methods often lack the precision and efficiency needed for early-stage detection of DR. Moreover, many approaches do not adequately integrate morphological operations to enhance the visibility and identification of pathological This gap highlights the need for novel methodologies that optimize image preprocessing, improve feature extraction, and leverage advanced machine learning algorithms to provide accurate, automated DR Addressing these challenges, this paper proposes the development of enhanced morphological operations and their integration with machine learning techniques to create a robust and efficient system for detecting and classifying DR with high precision, enabling timely interventions to prevent vision loss. This research develops morphological operation methods to identify DR based on fundus images. The novelty of this research lies in the creation of a new operation method resulting from the development of morphological operations, which can detect DR based on fundus images more precisely and accurately. METHOD Framework research This study conducted the development of morphology operation for identification of DR based on fundus images. Therefore, the researcher designed a research framework first before conducting the research. The following Figure 1 is the research framework in this study. The provided research framework represents a comprehensive image processing pipeline applied to fundus images for medical analysis, consisting of three main stages: input, processing, and result. The process begins with the acquisition of an input image, specifically a fundus image, which is commonly used in medical diagnosis to detect retinal diseases. This image serves as the raw data for the subsequent processing tasks. the processing stage, two key phases are involved: pre-processing and image segmentation/extraction. During pre-processing, the image is enhanced to improve its quality by reducing noise and transforming it into a more suitable format for segmentation. First, the red, green, and blue (RGB) fundus image is converted to grayscale to reduce computational complexity and focus on intensity variations crucial for medical image analysis. Noise reduction is then conducted in two stages: hard noise reduction using a Gaussian filter to remove highfrequency noise, followed by soft noise reduction through a median filter to smooth the image and preserve OtsuAos thresholding method is then employed to binarize the image by automatically selecting an optimal threshold. After pre-processing, the next step involves image segmentation, which isolates regions of interest that may indicate specific features such as DR. A distance transform is applied to identify the foreground, and morphological operations are used to distinguish the background. The watershed algorithm is then applied to segment distinct objects in the image based on intensity gradients. Once the image is segmented, image extraction occurs through the use of the GLCM method, which extracts key texture features including contrast, correlation, energy, and homogeneity. Finally, the Result stage presents the outcome of the segmentation and feature extraction processes. The output is a processed image with distinct segmented regions, highlighting areas that could be of clinical interest, such as abnormal tissue or lesions. Figure 1. Research framework Framework research details Input image . undus imag. Typically, a high-quality fundus camera is used to capture images of the retina. Ophthalmologists utilize an ophthalmoscope, a simple tool with a light source, to examine the eyeAos interior. The input image represents a color image of the retina. Fundus cameras are generally used to capture retinal images, resulting Development of watershed algorithm for identification of diabetic retinopathy based A (Surmayant. A ISSN: 2088-8708 in a binary image as the output. The process begins by inputting an image of a DR fundus. An example of DR fundus image data is shown in Figure 2. Figure 2. Input image . undus imag. Pre-processing RGB to grayscale Grayscale might be enough to identify some objects. Color photos can add extra complexity and need more memory space since they carry more information than black-and-white graphics . Grayscale conversion of color retina images lowers the amount of pixels that need to be processed. An picture is said to be grayscale if only intensity information can be determined from a single sample pixel value . Mapping different color channels (R. G, and B) into a single grayscale value in terms of a weighted sum is the process of grayscale conversion. The following is the formula for converting grayscale based on illumination ya = 0. 2989 O ycI 0. 5870 O ya 0,1140 O yaA The color of a pixel is represented by the letters R. G, and B, respectively. Human perceptions of color are represented by the R. G, and B coefficients. Grayscale converts RGB . -dimensional pixel value. into 1D values, which are simpler. Make use of the rgb2gray . Hard noise reduction: gaussian filter Hard noise reduction using the gaussian filter in digital images, particularly in fundus images, refers to the process of smoothing the image by reducing high-frequency noise or sharp intensity variations that can interfere with image analysis . The Gaussian Filter is widely used because of its ability to preserve edges and smoothen out noise efficiently . This helps in reducing random noise without blurring the edges For fundus images, this means enhancing visibility of critical structures while removing irrelevant noise, aiding in clearer diagnostics. The Gaussian Filter is represented mathematically as . cu, y. = 2yuUyua ycu2 yc2 This function creates a filter where values closer to the center . cu, y. is the value of the Gaussian filter at coordinates . cu, y. , yua is the standard deviation, which controls the amount of smoothing, . cu, y. are the pixel coordinates relative to the center of the kernel. In fundus imaging, using the Gaussian filter for hard noise reduction is an essential preprocessing step. It helps in reducing unnecessary noise while preserving important medical features that are critical for diagnostic purposes. Soft noise reduction: median filter Soft noise reduction using the median filter is a method commonly applied to digital images, including fundus images, to reduce noise while preserving important structural details, especially edges . The median filter is particularly effective in addressing this type of noise without overly blurring the edges of key structures . The primary purpose of using the Median filter is to remove impulse noise . uch as salt-and-pepper nois. from the image while maintaining the sharpness of important features. While the median filter does not have a mathematical formula in the same way as other filters, its operation can be described algorithmically as follows: Int J Elec & Comp Eng. Vol. No. June 2025: 2845-2856 Int J Elec & Comp Eng ISSN: 2088-8708 Oe For each pixel in the image, a neighborhood . sually a square or rectangular windo. around the pixel is Oe The pixel values within this neighborhood are sorted in ascending order. Oe The pixel at the center of the neighborhood is replaced with the median value from the sorted list of neighboring pixel values. In fundus imaging, applying the Median Filter for soft noise reduction is essential for improving image quality, particularly when the image is affected by impulse noise. Unlike other smoothing techniques, the median filter preserves edges, which is crucial for maintaining the integrity of important retinal structures such as blood vessels and lesions. By reducing noise in this manner, the median filter enhances the clarity of the image, making it more suitable for subsequent processing stages like segmentation or feature extraction. Thresholding: Otsu's thresholding Thresholding is a fundamental image segmentation technique used to differentiate objects of interest from the background in digital images, including fundus images . Thresholding simplifies image analysis by converting grayscale images into binary images, where the pixel intensity is either set to a background or foreground value, based on a threshold . The method works by exhaustively searching for the threshold that separates the foreground . he object of interest, like blood vessels or lesion. from the background. The formula for Otsu's method can be expressed as . = yc1. where: yc is the threshold value, yc1. and yc2. are the weights of the two classes . oreground and backgroun. , yua12 . and yua22 . are the variances of the two classes. The purpose of using Otsu's thresholding in fundus images is to accurately segment important structures, such as blood vessels and lesions, from the background for further analysis. It is particularly useful in medical diagnostics, where precise segmentation is critical for detecting abnormalities. OtsuAos thresholding is a powerful tool for segmenting fundus images by selecting an optimal threshold value, leading to improved medical image analysis and assisting in the early detection of eye diseases. Processing . Image segmentation Marker foreground: distance transform Marker foreground with distance transform is a crucial method in image segmentation, particularly for medical imaging such as fundus images . Fundus images are used to examine the interior surface of the eye, including the retina, blood vessels, and optic disc, essential for diagnosing various eye diseases like DR or glaucoma . The distance transform is used in segmentation to compute the minimum distance from each pixel within an object . , a retinal blood vesse. to the nearest boundary or background pixel. It helps in identifying distinct regions by transforming the binary segmented image into a distance map, where higher values represent pixels farther from the object's edges. The distance transform can be mathematically expressed as . = ycoycnycu ycc. cy, yc. ycOOyaA where ya. is the distance of pixel, yaA represents the boundary pixels, ycc . cy,y. is the Euclidean distance between pixel yc. Once the distance transform is calculated, markers for the foreground and background are assigned, which can then be used in watershed segmentation to clearly define object boundaries. Watershed algorithm The watershed algorithm is inspired by the way water flows over a landscape. In image segmentation, the intensity values of pixels are treated as elevations in a topographic surface . The algorithm simulates the flooding of this surface, where water starts from the lowest intensity points . ften corresponding to dark pixels or features in the imag. and gradually rises . The "watershed" is formed where the water from different catchment basins . meets, effectively creating boundaries that separate distinct regions in the Let ya. cu,y. represent the intensity of a pixel at coordinates . cu,y. in the fundus image. The algorithm first identifies local minima . here the pixel intensity is the lowest compared to surrounding pixel. , which act as markers for segmentation. The flooding process is controlled by rising thresholds ycN, and the segmentation is defined when two regions meet. An example of a formula involved in the flooding process is: ={. cu,y. OOya Oya. cu,y. =min. } . where ycO. represents the watershed regions formed at local minima of the image intensity function ya. cu,y. Development of watershed algorithm for identification of diabetic retinopathy based A (Surmayant. A ISSN: 2088-8708 . Image extraction GLCM method The GLCM method is a widely-used technique for texture analysis in digital image processing, particularly for feature extraction in fundus images . Fundus images, which capture the retina and its structures, are often analyzed for diagnosing medical conditions such as DR and glaucoma . Texture features extracted from these images provide valuable information about the imageAos content, such as the patterns and structures of blood vessels or lesions. The GLCM method works by calculating how frequently pairs of pixel intensity values . ray level. occur in a specific spatial relationship within an image. From this matrix, various statistical features like Contrast. Correlation. Energy, and Homogeneity can be computed to characterize the texture of the image. Oe Contrast: Measures the intensity difference between a pixel and its neighbor over the entire image, reflecting the degree of local variation . yaycuycuycycycaycyc: Ocycnyc . cn Oe y. 2 ycE. cn, y. where ycE. cn,y. is the probability of occurrence of pixel pair values ycn and yc. Oe Correlation: Represents how correlated a pixel is with its neighbors, indicating the linear dependency of gray levels . yaycuycycyceycoycaycycnycuycu: Ocycn,yc. cn Oe yuNyc. c Oe yuNy. cn, y. where yuN and yua are the means and standard deviations of gray levels. Oe Energy: Reflects the uniformity of the image texture, with higher energy indicating a more uniform or smooth texture . yaycuyceycyciyc: Ocycn,yc ycE. cn, y. Oe Homogeneity: Measures the closeness of the distribution of elements in the GLCM to the diagonal, where homogenous textures have high values . yaycuycoycuyciyceycuyceycnycyc: Ocycn,yc ycE. cn,y. cn,y. RESULTS AND DISCUSSION Result of input image . undus imag. The goal of image input is to provide visual data or information for further processing, analysis, or Image acquisition during a medical examination, such as fundus imaging for DR, involves employing specialist equipment, such as a fundus camera or other imaging devices, to take pictures of the internal structures of the eye. Fundus pictures in patients with DR produce intricate retinal visualizations. Afterwards, based on the patient's eye condition, eye physicians use these photos for diagnosis, follow-up, and therapy planning. Improved image quality provides more useful data for medical diagnosis and therapy. utilized 50 fundus pictures from a single subject for our study. In this article, we just display 8 photographs as an example. The input image is displayed in Table 1. Table 1. Input image . undus imag. Patient Input Image (Fundus Imag. Patient Input Image (Fundus Imag. Patient Input Image (Fundus Imag. Patient Input Image (Fundus Imag. Table 1 shows input images of fundus scans from 10 different patients. Fundus images, as seen in the figure, are critical in analyzing the retina, optic disc, and blood vessels for early detection of retinal diseases Int J Elec & Comp Eng. Vol. No. June 2025: 2845-2856 Int J Elec & Comp Eng ISSN: 2088-8708 such as DR and glaucoma. Upon examining the input images, notable variations can be observed in terms of clarity, brightness, and the visibility of important retinal structures like the optic disc and blood vessels. Some images, such as those from Patients 1 and 6, display a relatively clearer view of the optic disc and surrounding retinal vessels, while others, such as those from Patients 3 and 8, show signs of possible abnormalities like lesions or opacities, which may indicate the presence of disease. The input images vary in contrast, with some images appearing more reddish or yellowish, which could be due to differing lighting conditions or variations in patient eye conditions. This variability in image quality presents a challenge for image segmentation and further analysis, such as lesion detection or texture analysis, which is essential for diagnosing retinal conditions. In summary, the input fundus images highlight diverse retinal conditions across different patients. Some images appear to be in good condition for analysis, while others show signs of potential abnormalities, indicating the need for advanced image processing techniques to extract valuable features for medical diagnosis. Result of preprocessing Before the DR fundus image process is carried out, which will be used in the processing stage, the original image or fundus image is first converted into a grayscale image, then the image is Hard Noise Reduction, with the Gaussian Filter, then Soft Noise Reduction method with the Median Filter method, and Thresholding with the Otsu's Thresholding method. Below the result of preprocessing is shown in Table 2. Table 2. Preprocessing result Patient Input Image (Fundus Imag. RGB to Grayscale Hard Noise Reduction Soft Noise Reduction Thresholding Table 2 displays the results of the preprocessing steps applied to fundus images from eight different This preprocessing pipeline includes the conversion from RGB to grayscale, followed by noise reduction . oth hard and sof. , and finally, a thresholding operation. The RGB to grayscale conversion effectively reduces the complexity of the image by simplifying the color information into intensity levels. This step is crucial for further image processing tasks as it focuses on pixel intensity variations rather than color variations, which are more relevant in medical imaging for analyzing retinal structures. The grayscale images in the table retain the overall structure of the retina, optic disc, and visible abnormalities, providing a foundation for subsequent noise removal and segmentation steps. The preprocessing pipeline includes both hard noise reduction and soft noise reduction to improve the image quality and suppress unwanted noise that could affect segmentation accuracy. Hard noise reduction Development of watershed algorithm for identification of diabetic retinopathy based A (Surmayant. A ISSN: 2088-8708 removes high-frequency noise components, which may represent small and irrelevant structures or artifacts in the image. As shown in the table, hard noise reduction has significantly reduced these artifacts in the images, though some image structures have been over-simplified, losing finer details. Soft noise reduction, on the other hand, retains more of the image's structural information while still suppressing noise. The results demonstrate that the images maintain more fine details compared to hard noise reduction, while still smoothing out less relevant areas. This balance between noise suppression and structure retention is crucial for enhancing significant features, such as lesions or vessel patterns, in fundus images. Thresholding is the final step in the preprocessing pipeline, converting the grayscale images into binary images. In this step, areas of interest are highlighted in white, while the background is represented as black. This technique effectively segments out important regions such as lesions or other abnormal areas from the background. In the table, the thresholding step has successfully isolated key features from the background, making it easier to identify critical regions of interest in the images. The result is a clean segmentation of significant abnormalities, potentially enhancing the accuracy of further analysis and feature extraction processes. The preprocessing results demonstrate an effective pipeline for preparing fundus images for further medical analysis and segmentation tasks. The grayscale conversion simplifies the image, noise reduction enhances image quality by suppressing irrelevant information, and thresholding isolates key features for medical diagnosis. While hard noise reduction might over-simplify some image details, soft noise reduction strikes a good balance by retaining essential structural information. The segmentation achieved through thresholding presents a clear binary representation of the regions of interest, which is useful for further analysis such as the detection of retinal diseases. This preprocessing pipeline, as shown in the table, effectively enhances the fundus images, making them suitable for the next stages of feature extraction and classification, crucial for accurate diagnosis in ophthalmology. Result of processing The results presented in Table 3 illustrate the image segmentation and feature extraction processes applied to fundus images from eight patients. The table is divided into two main sections: Image Segmentation and Image Extraction using the GLCM Method. The segmentation process includes thresholding, marker foreground detection, and the application of the Watershed Algorithm, which highlights different regions of interest in the fundus images. Additionally, the GLCM method is used to extract texture features, including contrast, correlation, energy, and homogeneity, providing quantitative insights into the texture properties of the segmented regions. These features are crucial for diagnosing and differentiating retinal conditions based on variations in the fundus images. Below the result of preprocessing is shown in Table 3. The image segmentation and feature extraction pipeline presented in Table 3 demonstrate a robust approach to analyzing fundus images. The Watershed Algorithm successfully segments regions of interest, while the GLCM method provides critical texture features that are essential for diagnosing retinal abnormalities. Each patient's fundus image reveals distinct characteristics, with variations in contrast, correlation, energy, and Higher contrast values are typically associated with more pronounced lesions or abnormalities, while higher homogeneity and energy values suggest smoother and more uniform retinal structures. This analysis highlights how a combination of image segmentation techniques and texture analysis can effectively isolate and quantify abnormalities in fundus images, providing valuable insights for medical professionals in diagnosing conditions such as DR or macular degeneration. The results emphasize the importance of preprocessing and segmentation in enhancing the clarity and precision of medical image analysis. The accuracy of the image processing and feature extraction methods applied in this research demonstrates a solid performance. From the 50 fundus images used as input data, the segmentation and analysis techniques were able to accurately identify abnormalities in 46 images, resulting in an accuracy rate of 92%. This high accuracy confirms that the combination of the Watershed Algorithm for image segmentation and the GLCM method for texture feature extraction is effective in detecting key pathological features, such as lesions and retinal abnormalities, with minimal misclassification. The robust segmentation, along with the reliable texture analysis, highlights the efficacy of this approach in providing consistent and accurate diagnostic support, making it a valuable tool for retinal disease analysis. Our results substantiate significant advancements over prior studies. The integration of the Watershed Algorithm enabled more precise segmentation compared to Saman et al. which relied on basic morphological operations. Our system achieved an accuracy of 92%, outperforming the 87% accuracy of Sarki et al. particularly in handling images with noise and irregularities. Furthermore, our GLCM-based texture extraction demonstrated enhanced differentiation of retinal features, with metrics such as contrast and correlation showing consistent improvements across datasets. For instance, the energy metric in our study 9640 for uniform textures, surpassing previous results that did not emphasize texture uniformity. These findings underscore our framework's robustness, scalability, and potential as a diagnostic tool in clinical Int J Elec & Comp Eng. Vol. No. June 2025: 2845-2856 Int J Elec & Comp Eng ISSN: 2088-8708 Previous studies have explored various approaches to detecting DR, but they still faced limitations in certain aspects. For instance. Saman et al. used basic morphological operations such as dilation and erosion to detect and classify DR, but this approach was less effective in handling overlapping features and noise in On the other hand. Sarki et al. developed a framework based on CNNs combined with traditional preprocessing techniques. Although achieving high accuracy, this method required significant computational resources and was less flexible for diverse datasets. Research by Long et al. emphasized machine learningbased methods for segmentation and classification. however, the integration of morphological operations for improved segmentation remained minimal. Furthermore, texture analysis has often been overlooked as an important diagnostic parameter. By integrating texture features through GLCM, this study highlights the importance of texture uniformity and differentiation in diagnosing retinal abnormalities. This research builds a new foundation for more precise and efficient automated DR diagnosis. Table 3. Processing result Patient Thresholding Image Segmentation Marker Watershed Foreground Algorithm Contrast Image extraction (GLCM Metho. Correlation Energy Homogeneity CONCLUSION This research demonstrates the effectiveness of combining the Watershed Algorithm for precise image segmentation and the GLCM for texture feature extraction in detecting DR from fundus images. With an accuracy of 92%, our approach significantly advances automated DR detection by addressing limitations in segmentation precision and texture analysis found in previous methodologies. These findings contribute to the field by offering a scalable, efficient, and reliable diagnostic tool that can enhance early detection and timely intervention, ultimately reducing the risk of blindness in diabetic patients. Despite these achievements, questions remain regarding the application of this method to larger, more diverse datasets and its integration with real-time diagnostic systems in clinical settings. Future work should focus on enhancing the robustness of the algorithm for handling variations in image quality and expanding the method to include multi-class classification for different stages of DR severity. Additionally, integrating this approach with advanced machine learning techniques, such as deep learning-based models, can further improve accuracy and Exploring its application to other retinal diseases, such as macular degeneration or glaucoma, and Development of watershed algorithm for identification of diabetic retinopathy based A (Surmayant. A ISSN: 2088-8708 implementing it within portable diagnostic devices or telemedicine platforms, could significantly broaden its By addressing these areas, this research lays a foundation for developing comprehensive and impactful automated diagnostic systems in ophthalmology, supporting broader access to high-quality eye care. ACKNOWLEDGMENTS The authors would like to express their sincere gratitude to Prof. Dr. Sarjon Defit. Kom. Kom. as Rector of Universitas Putra Indonesia YPTK Padang and Assoc. Prof. Dr. Muhammad Ridwan. as the foundation's president of Yayasan Perguruan Tinggi Komputer (YPTK) Padang for providing the necessary facilities and support throughout this research. FUNDING INFORMATION This research was not supported by any grants from funding bodies in the public, private, or not-forprofit sectors. AUTHOR CONTRIBUTIONS STATEMENT This journal uses the Contributor Roles Taxonomy (CRediT) to recognize individual author contributions, reduce authorship disputes, and facilitate collaboration. Name of Author Surmayanti Sumijan Saiful Bukhori C : Conceptualization M : Methodology So : Software Va : Validation Fo : Formal analysis ue ue ue ue ue ue ue ue ue ue ue I : Investigation R : Resources D : Data Curation O : Writing - Original Draft E : Writing - Review & Editing ue ue ue ue ue ue ue ue Vi : Visualization Su : Supervision P : Project administration Fu : Funding acquisition CONFLICT OF INTEREST STATEMENT Authors state no conflict of interest. INFORMED CONSENT We have obtained informed consent from all individuals included in this study. ETHICAL APPROVAL The research related to animal use has been complied with all the relevant national regulations and institutional policies for the care and use of animals. DATA AVAILABILITY The data that support the findings of this study are available from the corresponding author, [S], upon reasonable request. REFERENCES