Classification of Eye Diseases Using Optic Cup Segmentation and Optic Disc Ratio and Its Implementation Using VHDL

The proposed work consists reprocessing using morphological operations and then segmentation of optic disc and optic cup by using the morphological operations. These operations are minimizing errors detection limit of the optic disc due to blood vessels cross. Then, the cup to disc ratio (CDR) is calculated using these operations. The cup to disc ratio is more than 0.3 then patients are glaucoma otherwise normal. Spatially Weighted Fuzzy C Mean (SWFCM) clustering method is used to segment the optic disc and Superpixel algorithm is used to segment the optic cup. The segmented optic disc and cup are then used to compute the CDR for glaucoma screening. Optic disc and cup segmentation of fundus image are considered for Diabetic Retinopathy Detection and Glaucoma detection. In this paper, we are considering one simple image and its part will be implemented by using VHDL family Altra Quartus II, which is a programmable logic device design software produced by Altera. Quartus II enables analysis and synthesis of HDL designs, which enables the developer to compile their designs, perform timing analysis, examine RTL diagrams, simulate a design's reaction to different stimuli, and configure the target device with the programmer. Quartus includes an implementation of VHDL and Verilog for hardware description, visual editing of logic circuits, and vector waveform simulation. The implemented results using MATLAB shows accurate results obtained both for diabetic retinopathy as well as glaucoma.


Introduction
Glaucoma may be a chronic disease during which the optic nerves increasingly broke. It's the second leading reason for the cause of blindness and is expected to have an effect on around eighty million individuals by 2020. Progression of the malady results in loss of vision, that happens bit by bit over an extended amount of your time. Because the symptoms solely occur once the malady is sort of advanced, eye disease is named the silent outlaw of sight. Eye disease can't be cured, however, its progression is often delayed by treatment. Therefore, glaucoma is called the silent thief of sight. Disease in time is essential. However, several glaucoma patients are unaware of the disease till it's reached its advanced stage. In Singapore, over ninetieth of patients are unaware that they need this condition In Australia, regarding five-hundredths of individuals with the eye disease international organization it squares measure undiagnosed. Since eye disease progresses with few signs or symptoms and also the vision loss from eye disease is irreversible, screening of individuals at high risk for the diseases is important.

Existing Methods
Ravishankar et al. and other authors showed that blood vessels, exudates, microaneurysms, and hemorrhages can be accurately detected in the images using different image processing algorithms, involving morphological operations. These algorithms first detect the major blood vessels and then use the intersection of these to find the approximate location of the optic disk. Detection of the optic disk, fovea, and the blood vessels is used for extracting color information for better lesion detection. But the optical disk segmentation algorithm is rather complex, timeconsuming, and affected the overall efficiency of the system.

Proposed Method
This paper proposes superpixel classification primarily based disc and cup segmentations for eye disease screening. An identical conception has been used for vessel segmentation. We calculate center surround statistics from superpixels and unify them with histograms for disc and cup segmentation. We tend to incorporate previous data of the cup by together with location info for cup segmentation. Supported the metameric disc and cup, CDR is computed for eye disease screening. For detection of Diabetic Retinopathy from the color complex body, part image numerous steps are applied. The varied steps for detection of diabetic retinopathy are shown in Fig. 2. The constituent values of Color complex body part Image square measure for good distorted and also the superior information is employed for analysis of pictures. This suppresses unsought data and enhances needed options. Preprocess in brightness correction, edge detection, intensity adjustment, bar chart effort etc.

a) Pre Processing
For the detection of stages of Diabetic Retinopathy the color structure pictures area unit thought-about as associate degree input. These pictures area unit nothing, however, the color pictures that provide the small print regarding issue layer of the eye. These pictures area unit preprocessed to boost the standard of the image and this preprocessed image is employed for the more stages.
(1) Morphological Transformation Pre-processing is applied for detection of Dark lesions that have dire low content within the inexperienced color plane. Furthermore, the background intensity variation of the image within the inexperienced plane is a smaller amount. Therefore the inexperienced channel of a picture is obtained initially and for each component pixel within the image, a region is taken into account focused on the chosen component. If the grey level of the component is lesser than the fraction of the mean of the component is taken into account as darker than the encompassing pixels. The darker area units than the conventional issue layer are detected. Finally, a binary image is obtained with non zero values for selected dark pixels. Within the technique planned by Meindert Niemeijer et.al the inexperienced plane of the image. Undergo shade correction. The shade corrected image is operated reworked to section the vessels gift within the image.
In order to eliminate the blood vessels, a vascular tree algorithmic rule is planned. The vascular tree is taken into account because of the solely a part of the image that's uniform throughout. The morphological gap with a linear structuring part of size fifteen pixels is employed to get rid of rounded bright zones of size below fifteen pixels. The distinction is improved by getting the total of the highest hat transforms. The ensuing pictures area unit screaky and Gaussian smoothing is employed to eliminate the noise within the image. To fully eliminate dark lesions, a linear gap by reconstruction of size fifteen, a linear closing by reconstruction of size fifteen, and a linear gap of size twenty-nine is finished or else. The reconstructed image is ablated from the shade corrected image; the matched filter of size 11x11 pixels is then used. A threshold price is ready which ends up in an exceedingly binary image. The binary image isn't a reproduction of the first image as a result region growing is finished exploitation the darkest component because the place to begin. Akara Sopharak et al in their work to discover exudates created use of morphological filtering. The pre-processing of an image involves the conversion of RGB to Hyperspectral imaging (HSI) color image, because of the intensity elements area unit aloof from the remaining color elements. Distinction reconciling bar graph leveling is applied to tiny regions of the image. The small regions area unit combined by linear interpolation when leveling. Exudates area unit regions of high-intensity values pixels at the structure marked as one and pixels within the background marked as zero.   (1) Double Ring Filter After image pre-processing, candidate regions for microaneurysms were detected employing a double-ring filter. The diameters of five and thirteen pixels for inner and outer ring severally is employed for detection small aneurysms within the encompassing retinal regions of the image. Any potential false positives situated within the regions appreciate blood vessels were removed by automatic extraction of blood vessels from the pictures. 100 twenty-six image options were determined and twenty-eight elements were hand-picked by mistreatment principal part analysis. The candidate lesions were classified into microaneurysms or false positives mistreatment the rule-based technique and a synthetic neural network.
(2) Bar Graph Equalisation A neural network based mostly preprocessing stage for bar graph equalization and specialization is used. A windowing technique uses the regions coated by the window function of the input options. For preprocessing, the inexperienced plane shaded color pictures are thought of. If the exudates are the middle picture element then it's thought of as positive sample else it's thought of as negative sample. To find the exudates, a 9x9 sized window is employed. A targeting vector is formed supported the positive and negative samples and therefore the vector is ready as zero or one.
(3) Morphological Filtering Morphological closing ends up in a twisted vessel-like patterns being treated as MA, a perfect operator with all structuring components having giant diameter is employed The binary options, grey level, and color options are extracted for the detection of mas.

c) Exudates Detection
Exudates area unit any fluid that filters from cardiovascular system of the eye into lesions or areas of inflammation.
(1) Fuzzy C-Means agglomeration Fuzzy C-means agglomeration is employed to discover exudates supported four options and eight clusters area unit fashioned for forty retinal pictures. The first image with the exudates region absent is then deducted from the first image to seek out the area units wherever exudates are a gift. The cluster image is employed as a marker and original image as a mask and morphological reconstruction by dilation is applied. Then thresholding is applied and the distinction between the first and reconstructed image is found. The ensuing image is superimposed on the first retinal image. Akara Sopharak et al used fuzzy c-means agglomeration for the detection of exudates in tissue layer pictures. Within the pre-processing stage the image exudates area unit distinguished by means that of the strength. The image is regenerated from the RGB color area to Hyper Spectral Image (HSI) color area and median filtering is applied to the I plane of the image and a distinction increased adaptive bar graph exploit is applied. The quality deviation of the distinction increased image is employed jointly of the options for detective work the exudates. The hue of the HSI image is that the next feature to be extracted. The quantity of edge pixels is that the final feature for agglomeration. The optic disk is removed by victimization Associate in Nursing entropy feature. To make sure the neighboring pixels area unit enclosed, a dilation method is applied employing a disc structuring component. Then the number of white pixels within the image area unit found.
(2) K -means clustering K means clustering is employed to discover exudates and non-exudates, as a result, the amount of clusters shaped. Exudates are placed in high-intensity variation whereas the opposite lesions are a gift within the lowintensity variation. Most and minimum intensity values live calculated and function a distance measure. The method is recurrent and therefore the cluster centers are updated in every step. (

3) Contextual Clustering
The discourse data is employed to reinforce the detection rate of exudates. Fuzzy art neural network is additionally used for the detection of exudates. From the distinction increased image options adore convexoconcave space, solidity and orientation are extracted. The blind spot is eliminated supported the very fact that it's the article with the most important diameter of the image. Classification relies on four options particularly convexo-concave space, convexo-concave image.

d) Classifier
The classification task consists of derivation a general classification rule for unknown candidates from the coaching set. The strategy for the classification ought to be strong against outliers within the coaching set, as a result of it's terribly troublesome to get AN fully reliable ground truth and therefore the distribution of the options. There exist several classifiers for the detection of MA adore support vector machines, k-nearestneighbor (KNN) technique, linear discriminate analysis, Gaussian filter and neural network are used.
For the analysis, A Linear discriminate technique was used as a good classification and every one way that provided higher results were taken into thought. It's found that AD Tree-a tree-based mostly classifier, SVM classifier and supply Regression were used and therefore the performance is analyzed. Fifteen options are extracted from a hundred and fifteen, 867 positive and negative samples of exudates pixels. Classification is formed exploitation the Naïve Bayes classifier that repeatedly removes the options until the performance of classifier doesn't improve. The antecedently removed options are also thought of and a few options are found by Bayes classifier. By exploitation, these options, SVM classifier is trained. For every combination of parameters, tolerance and radial basis perform is decided.
For the classification of exudates, fifteen options are extracted from the image particularly the element intensity, variance, hue, variety RI HGJH SL[HOV DYHUDJH LQWHQVLW\ RI SL[HO ¶V FOXVWHU VL]H RI FOXVWHU DYHUDJH intensity of pixels within the neighborhood of pixels, distance between element cluster and blind spot, filter response of half dozen distinction of Gaussian filters. Bayes classifier is employed for the classification. The KNN classifiers that include assignment the category to a replacement candidate (X) to that the bulk among the K nearest neighbors of (X) belongs. The benefits of KNN classifiers are the strategy becomes strong against outliers and its statistic (i.e. No assumption concerning the feature distribution should be made) for the moderately giant price of K. One downside of KNN classifiers is that everyone neighbors have a constant weight for the choice, severally of their distance from the candidate to classify. Moreover, if the coaching set is incredibly uneven for the 2 categories significantly for big K the strategy may well be failing. So as to beat these issues and to fulfill them on top of necessities, the kernel technique is chosen for density estimation, combined with theorem risk decrease. Three stratified perception design, i.e. One input layer, single hidden layer and single output layer neural network is employed. The input consists of 243 neurons, fifty hidden neurons and output consists of one vegetative cell. A scaled conjugate gradient methodology was used. If the neural network classifier is employed then the output of a network is within the vary of zero to one. A neural network classifier with multilayer perceptron is employed. A log-Sigmoid transfer operate within the output layer and linear operate within the output layer is utilized that makes use of back propagation rule.

Results and Analysis
As mentioned in the previous section it's been noted that the varied classifiers were utilized by existing strategies and performance was evaluated. Completely different values of the parameters determined effective detection of Diabetic Retinopathy and glaucoma.
Results of diabetic retinopathy detection: Figure 8. Quartus® II Architecture & its sample output

Quartus® II Introduction for VHDL
The Quartus® II provides a general summary of a typical CAD flow for planning circuits that are enforced. by victimization FPGA devices, and shows, however, this flow is complete within the Quartus® II code. Computerassisted style (CAD) code makes it straightforward to implement a desired logic circuit by employing a programmable logic device, akin to a field-programmable gate array (FPGA) chip. It involves the subsequent basic steps: a) Design Entry ± such that the required circuit is specified either by employing a hardware description language, akin to Verilog or VHDL or by suggests that of a schematic diagram. b) Synthesis ± the CAD Synthesis tool synthesizes the circuit into a netlist that offers the logic parts (less) required to comprehend the circuit. c) Simulation ± the synthesized circuit is tested to verify its practical correctness; the simulation doesn't take into consideration any temporal order problems. d) Fitting ± the CAD Fitter tool determines the location of the less outlined within the netlist into the less in associate degree actual FPGA chip; it additionally chooses routing wires within the chip to create the specified connections. e) Timing Analysis ± propagation delays on the assorted ways within the fitted circuit are analyzed to supply a sign of the expected performance of the circuit The simulation summary represented below shows that simulation coverage percentage and start time and end time.
Here we get the similar output by using qutrus software programming in VHDL.

Conclusion
This paper proposes a novel method of classifying eye diseases using optic cup segmentation and cup to disc ratio. After image acquisition, preprocessing is done by applying thresholding, illumination and histogram equalization. The optic disk and cup are segmented using various techniques like Hough transform, k-means clustering, fuzzy c-means clustering, active contour method, matched filter approach, vessel bends, morphological operations etc. Then cup to disc ration is calculated and classification is done for deciding whether the condition of the eye is normal or glaucoma based on a threshold value of 0.3. The implemented results using MATLAB shows accurate results obtained both for diabetic retinopathy as well as glaucoma. The image processing algorithm was also implemented using VHDL coding with Altera Quartus® II and verified the output image.