key: cord-0821151-l2nn8qdl authors: Pathak, Shashwat; Raj, Rahul; Singh, Kartik; Verma, Pawan Kumar; Kumar, Basant title: Development of portable and robust cataract detection and grading system by analyzing multiple texture features for Tele-Ophthalmology date: 2022-03-18 journal: Multimed Tools Appl DOI: 10.1007/s11042-022-12544-5 sha: b9dff10b5d37b5d0831551d33deef51dfa424bae doc_id: 821151 cord_uid: l2nn8qdl This paper presents a low cost, robust, portable and automated cataract detection system which can detect the presence of cataract from the colored digital eye images and grade their severity. Ophthalmologists detect cataract through visual screening using ophthalmoscope and slit lamps. Conventionally a patient has to visit an ophthalmologist for eye screening and treatment follows the course. Developing countries lack the proper health infrastructure and face huge scarcity of trained medical professionals as well as technicians. The condition is not very satisfactory with the rural and remote areas of developed nations. To bridge this barrier between the patient and the availability of resources, current work focuses on the development of portable low-cost, robust cataract screening and grading system. Similar works use fundus and retinal images which use costly imaging modules and image based detection algorithms which use much complex neural network models. Current work derives its benefit from the advancements in digital image processing techniques. A set of preprocessing has been done on the colored eye image and later texture information in form of mean intensity, uniformity, standard deviation and randomness has been calculated and mapped with the diagnostic opinion of doctor for cataract screening of over 200 patients. For different grades of cataract severity edge pixel count was calculated as per doctor’s opinion and later these data are used for calculating the thresholds using hybrid k-means algorithm, for giving a decision on the presence of cataract and grade its severity. Low value of uniformity and high value of other texture parameters confirm the presence of cataract as clouding in eye lens causes the uniformity function to take lower value due to presence of coarse texture. Higher the edge pixel count value, this confirms the presence of starting of cataract as solidified regions in lens are nonuniform. Lower value corresponds to fully solidified region or matured cataract. Proposed algorithm was initially developed on MATLAB, and tested on over 300 patients in an eye camp. The system has shown more than 98% accuracy in detection and grading of cataract. Later a cloud based system was developed with 3D printed image acquisition module to manifest an automated, portable and efficient cataract detection system for Tele-Ophthalmology. The proposed system uses a very simple and efficient technique by mapping the diagnostic opinion of the doctor as well, giving very promising results which suggest its potential use in teleophthalmology applications to reduce the cost of delivering eye care services and increasing its reach effectively. Developed system is simple in design and easy to operate and suitable for mass screening of cataracts. Due to non-invasive and non-mydriatic and mountable nature of device, in person screening is not required. Hence, social distancing norms are easy to follow and device is very useful in COVID-19 like situation. Eye disorders leading to loss of vision are mostly preventive in nature if they are diagnosed early and treated accordingly. They affect aging population more and condition worsens in economically backward countries where testing of the eye imposes economic burden over the patient along with the deteriorating vision [13] . The leading causes of blindness and low vision are cataract, glaucoma, age related macular degeneration and diabetic retinopathy. The World Health Report published in 2018 states that around 1.3 billion people live with some form of vision impairment out of which only 36 million people are completely blind. Most of these belong to above 50 years age group. Uncorrected refractive errors being the main cause of moderate and severe visual impairment; cataracts remain the leading cause of blindness in middle-and low-income countries out of which 80% of all these visual impairments can be prevented or treated permanently [29] . The augmentation of cataracts to blindness, all over the world, is likely to advance due to an aging population and unsuccessful attempts to control this blinding condition in developing and poor countries [1, 11] . World Health Organization (WHO) defines cataract as clouding of lens of the eye, which impedes the passage of light [5] . Motivation lies in the fact that 80% of all visual impairment, found globally, is intercept able as well as curable. Cataract is a gradual clouding of the clear crystalline lens of the eye which results in a blurry or hazy image, and a sensitivity to light. Normally, the lens is completely clear and acts to adjust the focus of light rays entering the eye onto the retina to form a clear image. Adult Indian population is more prone to cataract formation. Cataract is the leading cause of avoidable blindness. Today, ophthalmologists use a slit lamp or ophthalmoscope to diagnose cataracts. This equipment is quite expensive and requires special training to use it. Unfortunately, a lot of developing countries have a confined number of health facilities and ophthalmologists, while a lot of cataract effected live in developing countries [27] . Depending upon cataract occurrence in the eye lens cataract can be classified into: Nuclear, Cortical and Post Subcapsular Cataract (PSC). Accounting the severity of the cataract: normal, mild, medium and severe levels are defined for optical eye images. Digital Image Processing in conjugation with machine learning has simplified the diagnosis of eye related diseases. It is accomplished by extraction of significant region and identifying the features from an eye image; e.g., clouding in eye lens can be detected by identifying different image parameters. Presented work describes a robust cataract screening system which can even grade the severity of cataract so that patient can be advised for the treatment as early as possible, system should be simple and easy to use. The work described in this paper explains the development of a portable and robust cataract detection system which is easy to use and which can grade cataract as per the severity of the cataract. Rest of the paper is organized as: Section II presents the literature survey of the current problem. Algorithm developed for cataract detection is discussed in section III. Results and discussion have been given in section IV. Finally section V concludes the overall work with inclusion of future work. For eye screening using digital image processing, detection of the target area which is eye Pupil in this case is required. There are several good techniques found in literature which successfully and efficiently extract the Pupil. Automated cataract detection starts after accomplishing the task of Pupil extraction. Authors in [4, 7-9, 18, 23, 30] used several effective techniques based on use of different light sources, modelling and analysis of peculiar shapes, use of different transforms, enhanced Hough transform methods, analyzing mean gray levels for distinction between two circular regions and fuzzy based edge detection. Method using fuzzy based edge detection [8] has been developed and used in real-time detections in proposed system. Similarly, various cataract detection and grading methods are presented in Table 1 with their comparative limitations and system complexities to highlight the significance of proposed system. Current work is extension to our earlier work [20] with added feature of grading of cataracts and development of IoT based device and a cloud computing based platform for mass detection of cataracts. Different existing techniques are presented, related to cataract detection and its grading in this section. Presented comparison covers different types of image, image processing techniques and their fundamentals. The motivation for present work is derived from the limitations of the mentioned methods, complexity of system, ease of use and accuracy for example in some of the reported work input image must be retinal image whose imaging module is very expensive. Therefore, the present work aims at development of an efficient and robust cataract detection algorithm and further develop a low cost easy to use cataract detection and grading system based on digital color images from a webcam/digital camera as an input image for screening of cataract. The algorithm of mention system is presented in next section. multiple texture features (a) For the accurate screening of cataract from a digital eye image: Eye lens can be analyzed by analyzing Pupil region which is circular in shape and found with same color in all the ethnicities across the globe. Preprocessing, feature extraction, followed by decision making summarize the presented work. Image preprocessing includes conservative smoothing, image denoising, Gaussian filtering and edge detection using fuzzy based edge detector [8] . Preprocessing of digital eye is followed by contrast enhancement. After this step, de-noising isotropic Gaussian filter is used for image de-noising [15] . Resulted image is then filtered with a bi-directional Sobel kernel to extract the first derivative [6] . Later histogram equalization was performed to enhance the image. After the pre-processing, the Pupil region is extracted from the parent image. This detection and grading algorithm is only based on texture content. Features such as image intensity, uniformity, standard deviation and randomness are calculated to define the threshold between R. Srivastava et al. [24] Detection and grading of cataracts through slit lamp images Costly acquisition module, needs trained technician, Complex algorithm, No integrated system 8. Yang et al. [31] Detection and grading of cataracts through fundus images Early detection was not confirmed, needed exhaustive dataset to train the system, No integrated system 9. Gao Xinting et al. [10] Detection the healthy and cataractous eye. In cataractous eye, relative white color is is found inside the Pupil which corresponds to high intensity levels in digital eye image. In the early stage, a very thin layer of white color starts spreading over the lens. Secondly, this whitish color spread randomly inside the lens. This type of distribution shows a coarse texture inside the Pupil. Uniformity would be maximum when all gray levels have equal values. Practically, all nonserious conditions contain a smooth texture with higher value of uniformity as in the comparison of coarse texture. In terms of image processing, standard deviation shows how much dispersion or variation exists in pixels value from the average (mean, or expected value). It is a most extensively used method in statistics, used for measurement of diversity or variability. Low standard deviation value indicates that the pixels value is in close proximity to the average value, whereas, higher values can be inferred as the pixel values are broadly spread out over a large range of values [21] . Standard deviation filter calculates the standard deviation for each pixel group in the input map lying within a neighboring area around each grid cell and this value is attributed to the center pixel in the output map. The formula to calculate the standard deviation is given in eq. (1): Here, x i and x represent the individual pixel value and mean pixel value for the input map. r and c the row and column sizes of the filter. Standard deviation calculations adds robustness to the proposed algorithm by selecting most suitable pixel value amongst the similar neighboring pixels. Entropy is defined as statistical measure of randomness to characterize the texture of the input image. The randomness refers to variations in the intensity values, or gray levels for an image. The entropy H for an image is defined as in eq. (2): Here p k is the probability associated with gray level k and M is the number of gray levels. For a gray-image, there are 256 color states. If all such states are equally employed, as they are in the situation that its histogram is perfectly equalized, the spread of color states is maximum and also the entropy of the image [12] . On the other hand, if the thresholding of image is performed so that it has only two states, the entropy is low. If all pixels in the image contain the same value, the entropy of the image is zero. As the entropy of the image is decreased, its information content is also decreased as it is moved from a full gray-scale image with high entropy, to a thresholded binary (two states) image having low entropy, to a singlevalued image having zero entropy. For a clear unclouded eye lens, intensity, standard deviation and randomness values are quite low together with high uniformity. In cataract eyes, Pupil is filled with white matter which increases the brightness of it, hence the mean intensity, standard deviation, and randomness have high values and uniformity is quite low. (b) For grading of cataract: Proposed work describes a relative method for automatic grading of cataract to reduce the errors in person specific traditional manual grading. The contribution of present work is extended by utilizing gradient-based features for automated cataract grading. Gradients distinguish healthy lens from clouded one, as former has distinct edges while edges fade away as severity of cataract grows. After the extraction of Pupil region from the parent eye image, number of bright pixels in the edged black and white (b/w) image are counted in both horizontal and vertical directions [24] . For an image I(x,y) representing a sub-image of size m × m, its gradient is represented by eq. (3): The number of prominent edge pixels along x and y directions are p x and p y respectively.These can be represented by Eqs. (4) & (5) . For an image size of 256*256, value of m will be 256. Here, pixel coordinates along x and y directions are mapped through i and j. Similarly, θ x and θ y represent gradient thresholds along x and y directions respectively. Heaviside step function (H) is defined by Eq. (6): H n ½ ¼ 0; for n < 0 1; for n ≥0 For each eye condition, these discussed features their have distinct values. These values are calculated over a large training set to define threshold between healthy and diseased eyes ( Table 1) . For mapping the values of the described parameters with Doctor's opinion, test results of over 200 subjects diagnosed by eye expert in a clinic was calculated and a classification was done for healthy eye, mild and severe cataract suffering eye (Fig. 1) . Eye images were captured from Microsoft HD webcam from the front at a distance of 15 cm. from eye and light intensity was fixed at 300 lx. After this hybrid K-means algorithm has been applied to the data obtained for each above discussed parameter for an eye image. The algorithm is hybrid one with one swap followed by some number of iterations of Lloyd's [14] . Mean of each cluster (owing to different range of values based on severity) of data was calculated based upon least distance method. This iteration was performed over initial 200 images. After the mean value of each class was determined an averaging was performed in between two subsequent classes of data means for determining the range of parameters as per the classification of the cataract based on its severity (Fig. 2.) . The corresponding threshold values for each of these parameters are listed in Table 2 . Based on the values of detected parameter for an eye image, proposed algorithms screens the cataract. For adding the robustness to the result at least two parameter's values are selected for decision in the algorithm for testing of an eye image during field trial (Fig. 3) . After cataract detection, cataract grades are categorized on the basis of bright edge pixels present in training Fig. 2 Classification of data based on adaptive K-means algorithm image after edge detection (Table 3 ). For a less severe case or the case where cataract is suspected to begin, the protein formation is non uniform so there are several solidified regions whereas in severe cases whole region is solidified. So more edges are detected in b/w image in starting cases. The value of these bright pixels keeps on decreasing with increase in the grade of cataract. For the first grade, the no. of pixels present per image is more than 750 while for the last grade the same number is less than 300 per image, which is significantly lower than that obtained in first grade of cataract. Based on this observation, higher and lower grades are differentiated. The range of bright pixels related to different grades is described in Table 2 : After the pre-processing, the system is ready to extract the different features. The threshold for these features are mentioned in Table 2 and according to that, the algorithms is trained to detect the clouding in the lens and grade its severity (Fig. 3) . The developed algorithm was applied over 300 testing images taken, from the patients visiting the Doctor, from the same webcam and the results are reported here in Table 4 . Parameter values were acquired for each image with the decision given by the proposed algorithm. This decision was later compared with the doctor's opinion for performance evaluation of the proposed cataract detection and grading system. The calculated features for 10 such eye images declared healthy or absence of cataract by the developed system with the opinion of Doctor mapped with the results obtained from the proposed system as well are presented in Table 4 Fig. 3 Schematic of field trial process and performance evaluation of proposed automated cataract detection and grading system In cataract, lens is clouded and Pupil appears very bright and has hence we get high intensity values. The test results of 10 eye images detected for the presence of cataract with Doctor's opinion in the field trial along with feature details are given in Table 5 : In a healthy eye, lens is found to be clear with no opaqueness. Due to clear nature of lens we get quite low mean intensity, standard deviation values with high uniformity due to presence of almost similar pixel groups all over the region. This fact is well confirmed through the flat histogram plot as shown in Fig. 4 , where we are getting almost similar numbers of pixels over range of intensity. Due to cataract, Pupil appears whitish because of scattering and reflection effects in opaque lens. This results in high mean intensity value with high standard deviation value due to very weak correlation in pixels groups with low uniformity due to non-uniform distribution of pixel values (Fig. 5.) . Standard deviation values further adds robustness to the claims of developed algorithm as they show as high value ranging from close to 2 up to 3.5 whereas normal eye's standard variation remains in between 1 and 2. After the screening of cataract, the effected images are observed to find the severity of grade. The grade is predicted by counting the of number of bright pixels present in edged B/W image. After pre-processing, the image is edge detected by canny operator to find the visibility of lens landmarks. The landmarks visibility gives the information of cataract grade. The number of bright pixels are counted, present on that edged B/W image (Eqs. 4, 5 and 6). Different edged images associated with different grades are shown in Fig. 6 (a-e): Depicted images in Fig. 6 (a-e) associated with different grades, provide the information for population of bright pixels. Each grade has different range of bright pixels. These ranges of bright pixels are showed in Fig. 7 : Graph in Fig. 7 , describes the number of pixels associated with different grades. Experiments were performed on a 100 cataract images to grade the severity of cataract, out of which data of 20 such images is been reported here in this paper. Different images with appropriate grades are illustrated in Table 6 : All the described procedures were carried out in MATLAB 2013b. For designing a portable system utilizing the proposed algorithm for automated detection and grading of cataract from Image1 643 2 Mild Image2 784 1 Beginning Image3 696 2 Very mild Image4 705 2 Very mild Image5 905 1 Beginning Image6 737 2 Mild Image7 950 1 Beginning Image8 610 2 Mild Image9 1100 1 Beginning Image10 574 3 Mild Image11 835 1 Beginning Image12 388 4 High Image13 742 1 Beginning Image14 609 2 Mild Image15 764 1 Beginning Image16 1007 1 Beginning Image17 524 3 Mild Image18 664 2 Very Mild Image19 229 5 Very High, Matured Image20 885 1 Beginning colored digital images of human subjects, a graphic user interface (GUI) was also created (Fig. 8) . This facilitated the ease of use for testing purposes during testing and field trials. Results of few images are attached in Fig. 8 which shows the input images for cataract screening and subsequent grading, and the corresponding results are shown with the corresponding images. After accomplishing the task of developing and testing a robust cataract detection and grading algorithm, a system was designed based on server based cloud-platform to integrate To accomplish this few designs were considered. For accommodating anthropological features, we considered mean Inter Pupillary Distance (IPD) of 63 mm and worst case focal length for eye to be 90 mm. Two different tubes containing webcams at end was incorporated, with opening of 20* 10 mm for ultravoilet LED sockets at a distance of 20 mm from eye end. The 3D model with dimensions and actual 3D printed device is given in Fig. 9 . This has resulted into a sleeker and hence more portable device (Figs. 9 and 10). DIVYA DRISHTI platform has been developed which receives the images from the developed module and analyses it as per the described process in previous sections. This platform can be accessed from the internet, along with the printed device, for detection and grading of cataracts. As more and more data is accumulated, AI algorithm, as described, adjusts the thresholds and hence accuracy of system is improved. This system is fully automated, as the operator has to only click the images and rest all processing is accomplished by the platform. This fuzzy based algorithm was developed [17, 28] and incorporated in the current system. A fuzzy approach was designed and tested for real-time [8] , faithful edge estimation (Fig. 11.) . This method enhanced the results of conventional CHT with increased iris localization and Pupil detection accuracy. Normally, we observe CHT results with several circles within eye image, due to this proper detection of circular Iris and Pupil is not achieved and further distinguishing in between these two poses as an impossible task. Now Pupil was automatically extracted as depicted in Fig. 12 rather than performing manual cropping as shown in Fig. 8 , with operations performed in MATLAB. Early cataract screening plays a vital role in making early treatment and slowing the progression of cataract. This paper presented the development of an automated system to detect the presence of cataract, evaluated on the basis of multiple texture information of collected from digital color eye image of human subjects, and grade its severity based on total number of edge counts. Experiments were performed with a low cost compact digital camera. Different method of image processing techniques such as conservative smoothing, image de-noising, contrast enhancement and canny edge detection are implemented to enhance the quality of eye image and after it, described features were calculated to define a threshold between normal and diseased condition by mapping the opinion of doctor at training stage of threshold detection. Pupil detection using developed approach [8] Edge detection in both vertical and horizontal region is performed to get total pixel count which corresponds to number of edges in b/w image for the purpose of cataract grading. Proposed method was found to be close to 98% accurate in detection of cataract. Later a cloud based system was developed with 3D printed image acquisition module to manifest an automated, portable and efficient cataract detection system for Tele-Ophthalmology. Essence of the presented work lies in the fact that the acquisition model is low cost, simple in design and use and the developed algorithm is very light compared to deep learning model based counterparts. Also due to mountable nature of device, person independent screening can be carried out in COVID-19 like situation unlike in normal conditions where person dependent screening was performed. A feature comparison with different mentioned methods have been compiled in table no. 6 for quick review. Adaptive k-means algorithm updates the threshold after reception of new data as it performs machine learning in this part. Future work includes the inclusion of bigger database for threshold detection to enable better classification of mild cataracts and develop an indigenous deep learning model for creating a gold standard for Indian Geography. An Indian Patent titled "A Method and a System for Automatic Detection and Grading of Cataract" has been filed on 27th April 2019 for the developed device. The accomplishments of the global initiative VISION 2020: the right to sight and the focus for the next 8 years of the campaign New approach for objective cataract classification based on ultrasound techniques using multiclass SVM classifiers Automatic cataract classification based on ultrasound technique using machine learning: a comparative study Accurate Pupil extraction algorithm by using integrated method A shell model for real-time simulation of intraocular implant deployment An adaptive Gaussian filter for noise reduction and edge detection An efficient approach for Pupil detection in iris images An Efficient Fuzzy Based Edge Estimation for Iris Localization and Pupil Detection in Human Eye for Automated Cataract Detection System A new approach for Pupil detection in iris recognition system Automatic feature learning to grade nuclear cataracts based on deep learning Cataract blindness -challenges for 21 st century Entropy-based image merging An efficient k-means clustering algorithm: analysis and implementation Algorithm and technique on various edge detection: a survey A computer-aided diagnosis system of nuclear cataract Image edge extraction based on fuzzy theory and Sobel operator Pupil detection and tracking using multiple light sources Automated classification of normal, cataract and post cataract optical eye images using SVM classifier A robust automated cataract detection algorithm using diagnostic opinion based parameter thresholding for telemedicine application Image enhancement for fingerprint minutiae-based algorithms using CLAHE, standard deviation analysis and sliding neighborhood An image based classification method for cataract Iris recognition system using a canny edge detection and a circular hough transform Automatic nuclear cataract grading using image gradients A simple and robust method to screen cataracts using specular reflection appearance Compact cataract screening system: Design and practical data acquisition Compact cataract screening system: Design and practical data acquisition An optimal fuzzy system for edge detection in color images using bacterial foraging algorithm Visual impairment and blindness Pupil localization for multi-view eyeballs by ASM and eye gray distribution Exploiting ensemble learning for automatic cataract detection and grading Classification of retinal image for automatic cataract detection Acknowledgements Authors are very thankful to Ministry of Electronics and IT (MeitY), Government of India for funding the development of this device. We thank the Incubation Center IIT Patna for helping us develop this system, Ophthalmologists and all the supporting staff from LLHRC, Barauni for their invaluable support in development of the presented system, their full support during field trial and testing of initial algorithm to the final developed cataract screening and grading system. Publisher's note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.