Segmentation of the Optic Disc and Optic Cup Using Histogram Feature-Based Adaptive Threshold for Cup to Disk Ratio

Glaucoma is a condition of increased intraocular pressure within the eyes. Such increase then causes the damage on optic nerves as the organ bringing information to be processed in brain. One of the parameters to detect the glaucoma is the ratio between the optic cup and optic disc that can be identified through an examination towards the retinal fundus image of the patient. The ratio is obtained by firstly calculating the width of the area of the optic cup and the optic disc. This research was aimed to propose a method of the segmentation of the optic cup and optic disc with the adaptive threshold. The value of the adaptive threshold was obtained once calculating the mean value and standard deviation on the retinal fundus image of the patient. Before conducting the segmentation, the red component of the image would firstly be extracted followed by doing the contrast stretching. The last one was to perform the morphological operation such as closing and opening to remove the blood vessel to make the ratio calculation more accurate. This method has been tested in a number of retinal fundus images coming from DRISTHI-


Introduction
Glaucoma is an eye disease that can cause the loss of sight if not early treated.In common, its emergence is related to the genetic factor and its symptom is unseen until certain time.Glaucoma is the second main factor of the loss of sight after the cataract in the world and in Indonesia.Different from the cataract in which the loss of sight can be healed after the cataract operation, the blindness (loss of sight) due to glaucoma is permanent.Glaucoma has caused the damage in the optic nerve due to the increase of intraocular pressure within eye [1].The optic nerve itself is a nerve tissue that acts to continue the stimuli of light coming from the retina to the brain.The optic nerve brings all information that will be processed in the brain.Thus, human are able to see an object or a thing.Based upon the cause of the increase of the intraocular pressure on the eye, then the glaucoma can be divided into two: open angle glaucoma and angle closure glaucoma.Open Angle Glaucoma (OAG) is a type of glaucoma that is mostly occurred by 90% of total cases of glaucoma [2].It develops gradually and sometimes is present without any signs of sight disorders for couple years.The main cause of OAG is related to the aqueous humor flowing through trabecular meshwork within the eye experiencing a blockage in its canal [3].Meanwhile, Angle Closure Glaucoma (ACG) is a type of glaucoma taken place when the aqueous humor flowing through the trabecular meshwork is blocked due to the formation of the angle between iris and cornea [4].
The early detection of the glaucoma can prevent a total loss of sight.The use of Optical Coherence Tomography (OCT) and Heidelberg Retinal Tomography (HRT) mostly used by the psychiatrists nowadays still has a weakness in terms of the high cost compared to the detection of glaucoma using the image from fundus camera [5].Fundus camera is a low-level microscope located inside the camera and used to document the retina [6].One of parameters to detect the glaucoma possible to be detected by processing the image from the fundus camera is the cup to disk ratio or the comparison between optic cup and optic disc.Optic disc is a part of retina in which the axon from the optic nerve comes from and leaves the eye, optic disc and optic cup in the eye as seen in Fig. 1.Using the use of the image processing technique, the optic disc and optic cup can be segmented or separated prior to be calculated for each of their ratio.Ratio between optic disc and optic cup within the normal eyes was at 0.3 for the glaucoma of the ration ratio above 0.3 [7].In this research, a segmenting method of optic disc and optic cup used the adaptive threshold based upon the histogram feature from the image of the camera fundus such as the mean values and standard deviation.After successfully segmenting the optic disc and optic cup, they would further be calculated for the ratio between the optic cup and optic disc.Retinal fundus image from DRISTHI-GS will be used to test and develop the proposed method.DRISTHI-GS used PNG format at the resolution of 2049x1750 pixels.The example of the retinal fundus image of DRISTHI-GS is presented in Fig. 1 [8].DRISTHI-GS image database also provides the result of the segmentation of optic disc and optic cup in ground truth version.In addition, the measurement result of the cup to disk ratio was based on the measurement of four experts provided.Furthermore, retinal fundus image from RIM-ONE is also used, but it has smaller resolution of 503x268 pixels in JPG format.RIM-ONE database also provides a ground truth version, but only using two experts for validate the calculation [9].

Optic disc and optic cup segmentation
One of parameters to detect the glaucoma is the ratio between the optic cup and optic disc that is above 0.3 for the eyes suffering from glaucoma.If it is less than 0.3, it means that the eyes are normal [7].To identify the ratio of both, each of the optic cup and optic disc must be segmented or separated from their retinal image to make the measurement of the ratio more accurate.The diagram of the block from the proposed method to segment the optic cup and optic disc is presented in Fig. 2.
The retinal fundus image with a poor contrast will affect the process of the segmentation of optic disc and optic cup.Noted here, image with the low contrast frequently occurs due to the poor or unequal lighting.This can be caused by the sensors of image capturing that are not linear [10].To change the distribution of the pixel intensity, a contrast stretching is necessary to be conducted using the formula below [11].
( , ) ( , ) Based upon the formula above, f(y, x) states the value of a pixel on the f image and g(y, x) states the pixel from the processing result of f(y, x).Contrast will increase if the value of α > 1 and contrast will decrease if α < 1.
To segment the optic disc and optic cup this paper propose the threshold method.The segmentation with threshold refers to the simplest segmentation method with the value lower than the value of the threshold treated as the first and larger area compared to the values of the threshold categorized as the second area.In this case, one of the areas is positioned as the background.The segmentation with threshold method can be conducted using the formula below [12].
In the formula, T refers to the threshold, f(x, y) is the value of the image of f and g(x, y) is the pixel of the result of the segmentation of the image of f(x, y).In practice, the value 1 or 0 in equation can be exchanged.The threshold value will later be adaptive dependent upon the value of the histogram feature such as the mean and the standard deviation on image.Mean refers to the rate value of the image histogram; while the standard deviation is a size describing the level of data spread from the mean values.To calculate the mean value, it can be applied using the following equation [11].
In this case, m refers to mean value, I is the grey border in the image of f, and p(i) states the probability of the appearance of i, and L states the highest value of the grey border.The formula above will result if the average of the object brightness.Meanwhile, the formula for the standard deviation is presented as follows [11].
In this case, V 2 called as the variant or the normalized two-order moment as p(i) states the probability of the appearance i and as the function of opportunity.L states the highest border values and m refers to the mean value.This feature provides the size of the contrast.The mean value and standard deviation can be observed from the distribution of the histogram of an image.The histogram of image is a diagram illustrating the frequency of each intensity value emerging in all pixels of an image.A large intensity value shows the white color while the small one shows the black one.The large frequency value states that the pixels have very large number of intensities [11].An even distribution of histogram after the process of contrast stretching will help to determine an accurate threshold value.Fig. 3(a Having conducted an in-depth analysis to obtain the threshold value when doing the segmentation of the optic disc based upon the highest intensity, the mean value and the standard deviation from the retinal fundus image can be used through the following formula.

2* Tdisc mean std
(5) Meanwhile for the segmentation of the optic cup, it can be applied using the following formula.

4* Tcup mean std (6)
The value of 2 and 4 at Formula 5 and 6 is a constanta in which used to obtain the threshold value when doing the segmentation of optic disc and optic cup By setting the constanta value of 2, then multiplied it with the value of standard deviation and also mean value is added, it can be obtained a threshold value approaches the highest intensity value of the image, so the segmentation process will be more accurate.While the optic cup has a higher brightness level compared to the optic disc, therefore the intensity value of optic cup is also bigger, so it requires the bigger constanta value, in this case at 4.
To remove the blood vessels, a number of the techniques of morphological operation have been used such as opening and closing.The operation of the opening tends to remove the bright but small parts.The closing operation meanwhile is to maintain the small and bright objects.Both opening and closing operation in their process are involved in the dilation and erosion operation.Dilation process refers to a process of operation used to obtain the effect of broadening towards the pixel valued 1; meanwhile, the erosion process is a process that has an effect to reduce the image structure [11].The opening operation can be conducted using the following formula [13].
) ) (7) where the opening process A by B refers to the erosion process A by B and then the results of the erosion is followed with the dilation process by B. Meanwhile, the closing process can be conducted using the following formula [13].
where the closing process A by B refers to the dilation process A by B and the result of the dilation is followed with the erosion process by B. Once the morphological operation has been done, each of optic disc and optic cup that has been segmented were counted for the width and the number of the white pixels in each of the optic cup and the optic disc.To calculate the ratio between the optic disc and cup to the disc ratio (CDR) was conducted by dividing the number of the white pixels in optic cup with the number of white pixels in the optic disc.The formula used is as follows.
white pixels of optic cup CDR white pixels of optic disc

Result and discussion
In this research, a total of 100 retinal fundus image will be used to test the proposed method, each of DRISTHI-GS and RIM-ONE provide 50 images [8], [9].The image The contrast stretching was conducted to make the distribution of the pixel intensity even.This can facilitate the process of determining the threshold value.Fig. 5 shows the image with the red component before and after the contrast stretching.After passing through the process of the contrast stretching, the optic disc and optic cup were segmented with the image of the background using the threshold value obtained from Equation 5 and Equation 6.The threshold value was obtained through the calculation of the mean and the standard deviation of the image.Furthermore, the morphological process was used to remove the blood vessel to make the calculation of the width of the optic disc and optic cup more accurate.The result of this segmentation later on would be in the form of binary image as seen in Fig. 6.To identify the accuracy of the result of the segmentation from the proposed method, it can be compared with the version of ground truth.show a graph comparison between cup to disk ratio using proposed method and also by the experts, four experts from DRISTHI-GS and two experts from RIM-ONE.DRISTHI-GS provides retinal fundus image which affected by glaucoma, it can be seen from CDR calculation result by the expert or proposed method that exceed 0.3, while RIM-ONE provides a healthy retinal fundus image.It can be seen that the result of CDR with proposed method was not much different from the result of the measurement of the experts.
The proposed method is quite suitable to do the segmentation of the optic disc and the optic cup for the CDR, both for the eye which affected by glaucoma or not, it can be seen in Fig. 7(a) and (b).This cannot be apart from the accurate determination of the threshold value based upon the feature of the histogram of mean and standard deviation.The process of the calculation involving both features can make it simple to obtain the accurate threshold value for the segmentation of the optic disc and optic cup.
The significant different result in the calculation between proposed method and the expert has caused a lot by the image acquisition process which is not good, for example because the lighting is too bright which make the optic disc area has the same pixel intensity with another area of the retina, so that the segmentation process becomes more difficult.

Conclusion
The segmentation method with adaptive threshold has been developed in this research.Such method began by extracting an image to take its red component before conducting the contrast stretching to make the intensity distribution even.Furthermore, it was to conduct the segmentation with the adaptive threshold method in which the threshold value was obtained from the measurement of the mean and standard deviation.The last process was the morphological process in the form of closing and opening to remove the blood vessels.The method was tested in the data of the retinal fundus image for diagnosing the glaucoma disease that is by segmenting the optic cup and optic disc from their background image.After this, the ratio was calculated between optic cup and optic disc in which the ratio above 0.3, then the eyes are suffering from the glaucoma and if the ratio is less than 0.3, then the eyes is categorized normal.The results of the calculation of the ratio between the optic cup and optic disc used the segmentation method proposed showed insignificant difference compared to the ones conducted by the experts.This method can be a media for the ophthalmologists to ascertain more their diagnosis when performing an examination to the patients.In addition, it is expected that this method can be used for the image with poor quality.

Figure 1 .Figure 2 .
Figure 1.Optic disc and optic cup in retinal fundus image [8] Image acquisition (RGB Image) ) shows an image histogram before given stretching and Fig. 3(b) is the image histogram after stretching.If looking at the Fig. 3(b), it is found the intensity value of pixel at 250 with the frequency of about 0.1.It can be stated that the optic disc and optic cup are located in the intensity and the frequency value.It is because the optic disc has the highest level of brightness compared to the other parts of the retinal fundus image.Hence, the threshold value for the segmentation of the optic disc and optic cup can be obtained from the intensity.

Figure 5 .
Figure 5. Contrast stretching in red component, (a) Before given stretching, (b) After given stretching

Figure 6 .Figure 7 . 5 Fig. 7 (
Figure 6.Image segmentation, (a) Optic disc using proposed method, (b) Optic disc in ground truth version, (c) Optic cup using proposed method, (d) Optic cup in ground truth version