Study of Segmentation Technique and Stereology to Detect PCO Follicles on USG Images

Corresponding Author: Untari Novia Wisesty School of Computing, Telkom University, Bandung, Indonesia Email: untarinw@telkomuniversity.ac.id Abstract: Polycystic Ovary Syndrome is a hormonal health problem in women who are in the reproductive period. One feature of this syndrome is that there are 12 or more follicles in the ovary with a diameter of 2-9 mm. This syndrome can cause menstrual cycles problems and even a problem in conceiving a child. Currently, follicle detection is still done manually by Obstetricians and it takes a long time to get accurate result. Therefore, a system that can detect follicles and calculate its size automatically is required. This paper uses Global Basic Threshold and Otsu Threshold method to get the form of follicles in the process of image binarization and follicle segmentation and stereology approach to calculate the number and diameter of the follicle. The result of system testing shows that the system with Global Basic Threshold method and stereology had a sensitivity rate of 86%, a specificity of 15 and a 33% detection size error rate. While using the method Otsu Threshold and stereology showed sensitivity results of 89%, specificity 14 and 35% detection size error rate.


Introduction
Health is one of the human quality factors in which there are many important issues. Health problems that are sensitive enough and can disrupt the integrity of a household is a matter of fertility. Fertility problems occur due to disruption of the reproductive system in women and the decrease in the quality and quantity of sperm in men. Therefore, early screening of fertility in women is very important to determine whether the woman has polycystic ovary syndrome or not.
PCOS (Polycystic Ovary Syndrome) is a hormone health problem experienced by women in reproductive times where there are small cysts in the ovaries. This is caused by the inhibition of the follicle maturation process and disrupts ovulation resulting in accumulation of cystic follicles. According to a Rotterdam conference held in 2003, a woman is said to have PCOS if it meets two out of three symptoms: (1) failure of ovulation; (2) the increasing level of androgen hormones; or (3) the presence of polycystic ovarian state (Johnson et al., 2012). Morphologically, Polycystic Ovaries (PCOs) are ovaries that have twelve or more follicles 2-9 mm in diameter and/or an increase in ovarian volume up to more than 10 ml (Rotterdam, 2004). PCO can be detected through ultrasound tests. The test will show the number and size of the follicle in the ovaries. Furthermore, the ultrasound image will be diagnosed manually by the physician, so it takes a long time to get the high level of accuracy.
Based on previous research, PCO can be detected using two approaches, i.e., machine learning and stereology. Accuracy of the machine learning approach to detect PCO follicles was 82.55% (Setiawati et al., 2015), 92.86% (Lawrence et al., 2007), 84% (Deng et al., 2008), 89.4% (Deng et al., 2011), 93.93% (Wisesty et al., 2016) and 100% (Cahyono et al., 2017), respectively. While for research using stereology, detection success was 78% and size detection error was 12% . In this study using Global Basic Threshold and Otsu Threshold method to get the follicles form in the process of image binarization and image segmentation and stereology approach to calculate the number and diameter of the follicle. The Global Basic Threshold method can select the threshold value in the binary process automatically based on the average of the image intensity, while the Otsu Threshold method uses a good discriminant analysis approach to separate several groups that are joined together. Using the proposed system scheme, it is expected to assist the medical world in detecting PCO follicles.

Proposed Scheme
This research builds a polycystic ovary classification system based on ovarian ultrasound image using Rotterdam criterion, that is detecting ovarium having twelve or more follicles 2-9 mm in diameter. The system uses a thresholding method to obtain follicle forms and stereology approach to calculate the number and size of the follicle, so that it can classify whether the ovary includes PCO or non-PCO based on the Rotterdam criteria. Flowchart system scheme built on this research can be seen in Fig. 1: a. Ultrasound image: The input of the system scheme is a grayscale colored ultrasound image data with JPG format. The ultrasound images consist of two ovaries, namely the right and left ovaries. b. Cropping Image: A system built to detect follicles on one ovary only, so a cropping needs to be done to separate the right and left ovaries. The size of cropping is selected based on the position of the follicle presents in the ovary. The right ovary measures 300×166 pixels, while the left ovary measures 280×195 pixels. c. Histogram equalization: Used to improve image quality so that the image becomes brighter, this is because this process performs uniform intensity on an image (Wisesty et al., 2016). d. Image enhancement: The brightness level of an image can be adjusted, one of the methods is by multiplying the original image and the scalar value. The brightness level of the image is proportional to the scalar value used. The larger the scalar value used, the brighter the image will be and vice versa. e. Threshold method: This study will compare 2 types of threshold method to get form of follicle. The method used in this research is Global Basic Threshold and Otsu Threshold. The threshold value obtained is used as a separator between the background class and the object class (foreground) in binarization proses. The binarization process is needed to facilitate the image morphology and detection of follicles which will later be measured in diameter based on stereological methods. Below is an algorithm of the Global Basic Threshold (in Algorithm 1) and Otsu Threshold (in Algorithm 2). The value of T in the Global Basic Threshold is derived from finding the average value of the intensity of the input image. The Otsu Threshold method is the optimal method in determining the threshold value because it uses the discriminant analysis approach. The value of T obtained will be used in the image binarization.
2: Image Input f. 3: Select an initial estimate for the T value (threshold) by averaging the image pixel value f. 4: Segment image pixels using the T value, which will result in 2 groups of pixels, G1 is the group with pixel intensity > T and G2 is the pixel group with pixel intensity ≤ T. 5: Calculate the average intensity values µ 1 and µ 2 for each pixel group G1 and G2. 6: Calculate the new threshold T with the formula: Repeat steps 2-4 until the T difference is less than the value given.

7: End
Algorithm 2: Threshold Value Determination Using Otsu Threshold Method (Greensted, 2010) 1: Start 2: Calculate the image histogram. 3: For T = 0 to 255 do 4: Calculate the weights of C 1 (W f ) and C 2 (W b ): 5: Calculate the class average of C 1 (µ f ) and C 2 (µ b ): 6: Calculate the variance between classes C 1 and C 2 : 7: End For 8: Find the value of T that causes the maximum interclass variance. 9: End    f. Image Binarization: The process of converting the image color to a black-and-white (binary) format. Binary image formation is based on the threshold value used as a separator between the background class (intensity value 0) and the foreground class (intensity value 1). The method to separate the background and foreground classes based on the threshold value can be done by the formula: g. Image morphology: Image processing that is based on object shape of the image. This operation can only be done on binary images. Basic morphological operations are dilation and erosion. Dilation is the process of adding pixels based on the element structure used, resulting in an object with a size larger than before. Whereas, erosion is the process of pixel removal because the pixel is outside the element structure that is used to produce an object with an increasingly small area. h. Inverse Image: In binary image, image negation can be done by using Boolean operator, i.e., not, where the pixel value 0 will change to 1 and the pixel value 1 will change to 0. i. Image Cleansing (Removal of Specific Objects): The result of image morphology still produces objects that are not in accordance with the minimum size of the PCO follicles, so removal of objects with a diameter of <2 mm is required. In addition, the existence of objects attached to the border image will interfere with the next process. Therefore, the object with diameter less than 2 mm or attached to the border image are considered noise, so it needs to be deleted on the object. j. Addition of Segmentation Method: Carried out in the hope that the follicular form obtained from the system approaches the follicular form obtained from the validation of the physician. The method used in the addition of the segmentation process is the Watershed method, because the Watershed method can separate the objects that are attached to each other and are either used on images that have homogeneous intensity. k. Stereology: The calculation of the follicle diameter is done using wide circle area approach. The wide circle area can be used to calculate the follicle diameter. However, since follicle detection is based on ultrasound images, the follicle area obtained is still in pixels. So, it needs to be converted into units of millimeters by the formula: with Area value is the number of pixels that make up the follicle and the threshold is a divisor value to convert pixel units into millimeters. Usually in the 50-60-pixel ovarian ultrasound image has 1 cm in its original size, this means that every millimeter has 5-6 pixels, so the threshold value used is 5.5 pixels/mm (Potocnik and Zazula, 2002). l. Classification Results: Indicates whether the ovary includes PCO or non-PCO based on the number and size of the follicles contained in Rotterdam criteria, i.e. the presence of twelve or more follicles of 2-9 mm in diameter. m. Validation: Is a step to compare the number and size of the follicle diameter of the system results with the diagnosis of the physician, to determine the ability of the system to detect PCO follicles. n. Performance Results: calculated based on three parameters, namely sensitivity, specificity and follicle size detection errors. The basic things to know to calculate the performance are: • Specificity: The ability of the system to detect non-PCO follicles: Detection Size Error (MAPE): parameters for calculating detection size error that are compared between the size of the system results and the validation results of the physician. MAPE calculations can be done by the formula : where, n is the number of follicles that detected by the physician, D f is the follicle size detected by the physician and f D ⌢ is the follicle size of the system.

Analysis and Experimental Results
Based on the system that has been built, several tests were conducted to determine the best performance and parameters that affect the results of system performances. The input of the system is in the form of ultrasound images which amounted to 10 ultrasound images contain of 10 left ovary images and 10 right images. The ultrasound image has been analyzed and measured the diameter of the follicles by the obstetrician, to obtain valid number of follicles and diameter. System performance is measured by sensitivity, specificity and ovarian follicle size detection errors (MAPE), which is compared with the validation results of the obstetrician.

Testing the Effect of Segmentation Methods Addition
This test is done by using Global Basic Threshold and Otsu Threshold method to get follicle and stereology form to calculate the number and follicle diameter and scalar 3 and 4 in Image Brightness process. This test aims to determine the effect of adding segmentation process by using Watershed method. Performance comparison in this scenario can be seen in Table 1. Table 1 shows that the best performance is when using the addition of watershed with 86% sensitivity, specificity 15% and MAPE 33% in Global Basic Threshold method. The small value of specificity is affected by the segmented area. Areas that are segmented or detected as follicles are not as large as the area diagnosed by a physician. This happens because at the time of segmentation there is a speckle noise contained in the image input. On Otsu Threshold method, the best performance was obtained when testing using Watershed and scalar value 4, with 89% sensitivity, 11% specificity and MAPE 32%. This is because Otsu Threshold can find the optimal threshold value in the binary process to get the follicle shape. Watershed method is better if it's used for a homogeneous region and the image of the result of a previous process has a homogeneous pixel value.

Watershed Filter Testing on Segmentation Process
Watershed filter testing is done by using multiple filters when segmenting the follicles. The filters used are average, disk, gaussian, Laplacian, log, motion, prewitt and sobel. The comparison of filter performance can be seen in Table 2. Table 2 shows the comparison of sensitivity values, specificity and size detection errors (MAPE). The system is said to have a good performance if it has a high sensitivity value, which means it can detect PCO follicles. Then it has a high specificity value, meaning it can detect non-PCO follicles and the value of false diameter (MAPE) low error detection. Based on these criteria, the system using Sobel filter has the best performance that is 86% sensitivity, specificity 15% and MAPE 33% in Global Basic Threshold method, 89% sensitivity, 14% specificity and error detection size (MAPE) of 35% in the Otsu Threshold method. Sobel filter has the advantage of reducing noise before edge detection calculations, so noise that interferes with edge detection in ultrasound images can be reduced and better detection of the edge of the follicle.

Kernel Size Testing on Segmentation Process
This test is done by using several kernel sizes on the filter average, namely 3×3, 5×5 and 7×7. Comparison of performance on kernel size can be seen in Table 3. Based on the test results, kernel size influences system capability in detecting follicle. The larger the kernel size, the lower the system's ability to detect the follicles. This is because the new pixel values generated from the filter process have values that are close to the neighboring pixels, so that the watershed lines formed cannot segment the follicles properly and there are combinations of multiple follicles detected as a follicle in the watershed segmentation process.

The Effect of Thresholding Method on Binary Results
The division of intensity values in the binary process is done based on the selected threshold value. Binarization has a default threshold value of 0.5. However, the resulting binary result has many white spots on the object as in Figure 11a. This threshold value is not well used in all images, as there are some images that will generate binary image that only leads to one of the intensity values only.      Therefore, the required threshold value obtained is based on the image that will be processed. The threshold value can be searched using Otsu Threshold method to generate binary image as in Figure 11b. Figure 12a and Fig. 12b represents the binary result images before and after using the Global Basic Threshold algorithm. In Figure 12b, the presence of a follicular object in the center contains fewer white spots than Figure 12a. This indicates that the Global Basic Threshold in the selection of the threshold value is adjusted based on the input image. This results in a better binary result than binarization without the Global Basic Threshold. The threshold value generated by the Global Threshold algorithm can separate the object and the background optimally because the threshold value is different.

Calculation of System Time Complexity
The system is said to be good if it has a correct and efficient algorithm. An algorithm is said to be efficient when it can minimize the time and space requirements of running the algorithm. This study was conducted to help doctors to speed up the process of PCO detection based on ultrasound images. Therefore, the time complexity is needed to estimate the time required by the system in the PCO detection. Table 4 show that the system has a linear complexity (O(n)), where the complexity depends on the amount of data processed on the system. The more data is processed then the time needed by system increases linearly.

Conclusion
PCO follicles detection can be done using the Thresholding method (Otsu Threshold method and the Global Basic Threshold) and stereology based on ultrasonography images. The built system has been very good at detecting PCO follicles, but its performance is still less if used for non-PCO follicles. The best performance was obtained on systems using scalar values 4 in the image brightness process, the Otsu threshold method combined with watershed using Sobel filters in the segmentation process and stereology in the PCO detection process with 89% sensitivity, 14% specificity and detection size errors (MAPE) of 35%. Meanwhile, the detection system using Global Basic Threshold achieves 86% sensitivity, 15% specificity and with 33% of MAPE. The threshold value generated by Otsu Threshold and Global Basic Threshold algorithm can separate the object and the background optimally because the threshold value is different for each image. Scalar value in the image enhancement process affect the system's ability to detect PCO follicles and detection size errors (MAPE). This is because the greater the scalar value used the image will be brighter resulting in small noise contained in the image will disappear so that the follicle detection errors will be reduced, but the follicle will be smaller so that the error detection size will increase.