Enhancer for ovarian cyst segmentation using adaptive thresholding technique

Objective: To achieve the accurate segmentation of ovarian cyst from the ultrasound images. Method: Ovarian cyst ultrasound images are taken from ultrasound images.com and sonoworld.com. The cysts are segmented using adaptive thresholding technique. The segmented image (binary image) is divided into sub blocks and then number of binary transition in each block is calculated. Based on the number of transition, the pixel values are replaced by 0 or the same pixel value is maintained. In order to measure the performance of the proposed enhancer various measures like Accuracy (ACC), Dice Coefficient (DC), Jaccard Similarity Index (JSI), Matthews correlation coefficient (MCC), Sensitivity, Specificity and Precision are measured. Findings: In order to analyse the performance of the enhancer with adaptive thresholding technique, 100 ultrasound ovarian cyst images are taken. The enhancer produced better result than the existing adaptive thresholding technique. Novelty/Application: The proposed enhancer enriches the quality of the ovarian cyst segmentation.


Introduction
Polycystic ovarian syndrome is an endocrine disease with a long absence of hyperandrogenism and ovulation, affecting 5 to 10% of women folk at puberty and of childbearing age. Some of the symptoms of polycystic ovary include hypertension, hirsutism, acne, and infertility. The syndrome is usually diagnosed by ultrasound of the ovaries, which shows the ovaries with multiple cysts. The criteria for diagnosing PCOS are ultrasound imaging, clinical imaging and biochemical imaging of the ovaries (1) . The patient can be diagnosed from the following conditions: (1) the presence of polycystic ovaries observed in gynecological ultrasound (2) excessive androgenic activity and (3) oligovulation, characterized by an irregular menstrual cycle.
The PCOS diagnosis is significant for treatment and the images are obtained using ultrasound imaging. The structure of ovarian cyst is classified by the presence of twelve or more ovaries. The size of the follicle is 2 to 9 mm. Manual identification of PCOS can cause problems since it takes a longer time to identify follicles, they can https://www.indjst.org/ sometimes over look follicles less than 2mm (2) . These problems can be overcome with the help of an automatic identification and diagnostic system that counts the number of follicles. One of the processes when developing an automated PCOS diagnostic system is segmentation. Segmentation aims to obtain significant objects present in the images, either by separating the images or by removing one or more precise objects in the images. Segmenting the image is usually a difficult task as images are complex and vary from one to another (3) . The objective of the PCOS segmentation is to recognize most of the shadowy areas of the ultrasound image, and analysis will be useful for the detection follicles. This article proposes an enhancer which gives the enhanced segmented image. Several algorithms are used to segment the cyst from the ultrasound images. This section reviews the following existing work carried out in this area.
A paper proposed on efficient active contour with a modified Otsu threshold for programmed detection of follicles in the ultrasound imaging (4) . The adaptive object selection technique is developed that uses the data about the particular object for multiple values of the posterior threshold to find the ideal threshold based on a criteria that takes into account about the geometrical properties of the object (5) . A new technology has been developed for the correction of adaptive histograms across regions to automatically increase the contrast of these images (6) . An article that talks about segmenting the image in terms of speed and accuracy during GPU processing to detect damage (7) . A paper describes regarding an adaptive local method for determining threshold values, which eliminates the background using an average and average deviation, and calculating the average value does not depend on the size of the window, which speeds up the process compared to other local methods for setting threshold values. Paper that describes a method of automatically segmenting follicles from ultrasound using the Kmeans clustering technique to determine the number of follicles, the shape, and dimensions of the ovarian follicles (8) . A paper addresses the difficulties of diagnosing ultrasound imaging lesions because of this noise. It proposes an algorithm that uses speckle reducing anisotropic diffusion (SRAD) and a controllable filter to reduce the noise of them and keep the edges [10]. Presented a paper where the automatic detection of PCOS is performed by calculating the number of ovaries in an ultrasound, by extracting the features using the morphological approach and segmenting on several scales. The reference vector algorithm used for PCOS classification (7) . An article tells about an enhanced active contour without edges is presented, a method that allows the identification of small ovary and rapid segmentation (2) . An review article provides an overview of the various methodologies currently proposed for speckle noise elimination, highlighting an area of interest using segmentation, image classification to achieve extreme accuracy in the detection of cysts [10].

Methodology
The polycystic ovarian follicles are irregular follicles filled with a liquid sac and the images are generally smaller and are evenly distributed around the periphery of the ovary. The option for the method of segmenting is because the follicles are homogeneous, their border is heterogeneous due to the scattering effect of the signals that are produced from the ultrasound processing. Image segmentation is used to detect desired follicles so that the resulting image is easier to analyse. Since the area of interest and the background have the same gray levels in ultrasound images, it will be tedious for doctors to carefully segment the cyst. If the number of follicles is not calculated correctly, the doctor may diagnose the patient incorrectly. To overcome this problem, segmentation must be done with precision. There are methods used for segmenting an image, which are boundary detection, grouping, threshold determination, histogram-based methods, and watershed conversion. For the segmentation of the ultrasound image of the ovaries, various methods of determining the threshold values can be used, such as the adaptive determination of the threshold, the determination of the gray level using the Otsu method. The widely used segmentation algorithm is the adaptive thresholding method. Therefore, next section reviews adaptive thresholding segmentation technique.

Adaptive thresholding
The purpose of the image thresholding is to categorize the pixels as "dark" or "light". By the recent works, it is found that the adaptive threshold segments well than the conventional thresholding method. In the image, certain parts remain in the shade, and often the lighting also affects the image. In the conventional threshold method, the global or standard threshold value is taken as the average value. The adaptive threshold typically accepts gray scale or color images as input, where a threshold will be assigned to each pixel, and in a simple implementation, segmentation occurs. If the dark part of the pixels of the image contains a value which exceeds the threshold value, this part of the image is displayed in the foreground. Likewise, if the value lies below the threshold value, this pixel or this part is displayed in the background.
It is a technique that can also be done based on a histogram, which calculates the threshold value without any external assistance. According to the range of histogram multiple thresholds values are fixed. But only one threshold value is required to separate two regions. In image processing, the images can be represented with pixel values and their intensity. If the level of intensity lies below the threshold value then it has to be assigned again.
https://www.indjst.org/ Mathematical equation for thresholding is as follows, T (a, b) is threshold value. The adaptive thresholding algorithm works by the following steps:

) is the binary image,I(a, b)is the input image and
Step-1: Get the input image. The pixel value of the input image is taken as I(a, b).
Step-2: Calculate the median, mean and mode value for the given image.
Step-3: Fix the calculated median or mean value as threshold T (a, b) based on the type of input image.
Where, µ = Mean if the input image M = Mode of the input image x = Median of the input image If input image is left or right skewed type, median values lies beteween mean and mode. In this case, median is the best central value instead of mean. Therefore, the threshold value T(a,b) will be median of the input image. Otherwise, T(a,b) will be mean of the input image.
Step-4: If the image pixel value I(a, b) is lesser than the threshold value T (a, b), then replace the image pixel value by 1.
Step-5: If the image pixel value I(a, b) is greater than the threshold value T (a, b), then replace the image pixel value by 0.
Step-6: Finally the segmented image will be obtained. However, this adaptive thresholding algorithm works better for normal images, but for in ultrasound images of polycystic ovary, the quality in segmenting the region of interest is unreliable. The proposed enhancer is used to enhance the quality of the segmented image.

Proposed methodology-enhancer
As PCOS is several cysts presents in an ovary, it is important to segment the cyst exactly. Several segmentation algorithms are used to assist the clinicians in the segment and count the cyst but still, improvisation is required to enhance the quality of the segmented image. The proposed enhancer enhances the quality of the segmented image efficiently. This enhancer is based binary transition. The change of value from 0 to 1 or 1 to 0 in the binary image is binary transition. The binary transition may be one transition or 2 transitions or many transitions. Consider a binary pattern 011111111, in this pattern 0 is changed to 1 and it remains unchanged. This is one transition. Another pattern 011110000 has two transition i.e 0 is changed to 1 and 1 is changed to 0. The binary pattern with less than or equal to two transition indicate that the image have group of similar values. Therefore, the enhancer retains this binary value. If the binary pattern example 101101011 has many transitions which indicate that the image contains white spots here and there. In order remove these unwanted white spots, enhancer is designed.
The workflow of the proposed enhancer is shown in Figure 1 .The overall process of our proposed enhancer is explained below: Step-1: Get the adaptive thresholding segmented image (binary image) as an input image.
Step-2: Divide the segmented binary image into 3 x 3 sub-blocks.
Step-3: Arrange the binary values in the 3 x 3 sub-block in clockwise direction. If the number of transition in the binary pattern is less than or equal to 2 then, the pixel values in the 3 x 3 sub-block is remains unchanged. Otherwise, all the pixel values are replaced by 0.
Step-4: Repeat steps 3 for the whole image.

Results and discussion
The experiments are performed on Dell PC Intel(R) core TM i3 2.30 GHz processing speed and 4.0 GB RAM. We used the MATLAB R2019b software on windows 10 operating system. The samples of 100 polycystic ovarian ultrasound images were downloaded from sonoworld.com and ultrasound-images.com and used for segmentation by adaptive thresholding method. It is been observed that some of the quantitative parameters has been increased for the proposed segmented output than the adaptive thresholding segmented output. To analyze the performance of the proposed segmentation method with the existing method quantitatively, several validation parameters like Accuracy (ACC), Dice Coefficient (DC), Jaccard Similarity Index (JSI), Matthews correlation co-efficient (MCC), Sensitivity, Specificity and Precision are measured using below expressions.
Sensitivity = T P (T P + FN) (6) Speci f icity = T N (T N + FP) The below Figure 2 compares the performance of adaptive thresholding technique with proposed enhancer for 100 images.
https://www.indjst.org/  Figure 3 shows the better performance of the enhancer than the adaptive thresholding technique. The enhancer removes the unwanted white spots.

Conclusion
Segmentation is a crucial task where the two parameters size and count play a major role. In the analysis of PCOS, the ovarian cysts are segmented using an adaptive thresholding technique. Then, the proposed enhancer is used to enhance the quality of the segmented image to reduce the analysis time and count the cyst exactly. In the future, the enhancer is designed to improve the quality of the segmented image using various algorithms. https://www.indjst.org/