1 Introduction

Polycystic ovary syndrome prevails as a complex endocrine disorder causing adverse effects in women’s health. Presence of follicular cysts in an ovary of female reproductive system is the characterization of this disorder. PCOS obstruct the balance of follicle stimulating hormone and luteinizing hormone which needs for an egg to mature properly inside the ovaries [31]. The accumulation of incompletely developed follicles leads to PCOS which have the common symptoms of infertility, irregularity in menstrual cycles to stoppage of menstrual period, unwanted hair growth on the face and body, unusual weight gain, getting obese, acne and hyperinsulinemia [2,3,4,5, 15, 20, 30, 31, 35]. Medical imaging techniques such as CT, MRI and Ultrasound techniques are accustomed to viewing the human body in order to identify the symptoms, derive a treatment plan and monitor the progress of medications. Ultrasound is mainly used for imaging liver, kidney, uterus because of its noninvasive nature also it is portable, transferable, adaptable, have excellent temporal resolution, and they are relatively inexpensive. These should leads to an ultrasound assessment of ovaries. These evaluations give immense insight into the condition of the ovary and number of follicle presents in it. As a result of poor quality of ultrasound images the misinterpretation of pcos is possible. Number of follicles is not specific for the polycystic ovaries, sometimes the normal ovary also contains more number of follicles [20]. To differentiate polycystic ovary from multiple follicles of normal ovary, a standard criteria has been put forth by EuropeanSociety of Human Reproduction and Embryology, the American Society for Reproductive.

Otsu Concept: It performs image thresholding automatically which is based on clustering method or in other terms it reduces the graylevel-image to binary-image. It assumes two classes of pixels is contained in the image followed by the bi-modal histogram and optimum threshold is calculated by separating the two-classes in which combined spread should be minimal. Follicle Count: It is the study of transvaginal ultrasound for measuring the reserved women’s ovarian which is small and fluid filled sac containing the immature egg.

According to previous understanding from medical industries, polycystic ovaries are said to have more than 12 follicles with 2 – 9 mm in diameter. During image acquisition phase, noise is introduced in the acquired image in a lot of possible way. The air gap between human body and the transducer probe introduces the noise in the image which will affect the diagnosis [5]. When compare to CT and MRI modalities ultrasound image contains excess of noise particularly Speckle Noise. Speckle noise is multiplicative in nature which will make diagnosis difficult, by degrades edge and smallest discernible detail in an image. The resolution and the quality of an image are highly based on the frequency range and the transducers used in the probe. Nowadays at the time of acquisition to improve the quality of an ultrasound images higher end ultrasound machines are introduced with high quality transducers in the probe, also the gel is used to reduce the air gab between the probe and the human body. After acquisition, to improve the segmentation result and for accurate diagnosis, ultrasound ovary images are filtered using various image denoising techniques. To exactly discover the number of follicles in the ultrasound ovary image, it is necessary to reduce the speckle noise. From the list of filtering techniques available today, many are powerful enough to include a diverse range of parameters to be controlled and adjusted to retrieve better performance. The radiologist using conventional ultrasound machine to scan the ovary and they are rotates the probe progressively to scan ovaries although first recognize each follicle and then measuring its size and dimension. This system is manual, time-consuming also painful to the patient. To overcome these automated method is introduced for the detection and counting of follicles.

In literature, several contributions on noise reduction using novel methods implementing thresholds for wavelets to reduce the effects of speckle noise were introduced. The threshold values are obtained from assigning weights to variance levels. It is observed that sharpness of images are disturbed by the effects of applied filters whereas a wavelet threshold is not affecting the sharpness by any means [34]. This is because of the fact that wavelet transform produces better results when compared to the median and wiener filter [27]. A modified morphological image cleaning algorithm is introduced which is implemented by a mathematical morphology operation based on set theory. The disadvantage in this algorithm is that the morphological filter tends to lose the features with respect to varying size of structuring elements [33]. Michailovich et al. introduces a despeckling method for ultrasound images, these method without disturbing the medical image anatomical content remove the noise from the image [24].

Due to the insufficiency of hormones the egg does not mature properly and results in failure of ovum release. In medical diagnosis, identifying follicles from ultrasound image is a critical issue. Modified watershed algorithms are used to extract follicles from ovary which results in over segmentation. The output of the watershed algorithm is given as an input to the clustering algorithm produces better recognition rate [9]. Edge based segmentation method results in broken edges. Morphological operations are used to overcome these problems. Shrinkage of images may lose vital details from an image. For medical imaging, accurate results are needed for effective diagnosis [17]. To efficiently segment follicles region growing methods were introduced. These methods initially require an expert’s intervention in choosing a seed point which also comes under manual detection of follicles. Region growing methods will be minimally affected by to noise and increase the chances of recognition [10]. Morphological operators often take a binary image followed by opening and closing operations were used to derive the bright features from the ultrasound images’ background by using Tophat transform. Scanline segmentation then acts upon the enhanced images for a lesser error rate than manual detection [23].

The contrast of a de-speckled image is improved by using Histogram Equalization. The proposed method is designed to work on objects possessing high intensity values and thus the negative transformation is applied to the histogram equalized. During the segmentation phease, edges removed active contour is used. After this application of active contour method, the resultant image will contain segmented regions [16]. Thresholding is the easiest and effective methods to achieve optimal threshold value to binarize the grayscale image. Otsu method is a global threshold selection method widely used because of its simplicity and quality [6,7,8, 18, 19, 25, 26, 28, 29, 32]. The problems related to energy minimization approach were solved by new active contour model following the level set framework. During the curve evolution the changes in the contour solved implicitly are highlighted advantage of the level set method [32]. In medical imaging to segment region of interest level set methods are used. Chan and Vese introduces active contours method also consider information inside the region they solve this problem using level set methods [7], the geometric active contour models are proposed by Caselles et al. these methods based on speed term [6]. Mohammed Ammar et al. introduced thresholding to initialize the level set segmentation. The binary mask is obtained from thresholding [19]. Senthil Murugan N and Usha Devi G proposed a hybrid extraction and classification model for tweet data which is major research over hybridization of algorithms to analyze the large source easily [1, 13, 25, 26].

The following sections are organized as follows. The flow of the paper is explained in section II. The denoising filtering techniques and its performance are explained in Section III. In Section IV Otsu’s method is described briefly and proposed method is introduced. Section V discuss about the feature extraction. Results obtained from different methods are provided in Section VI, and conclusions are drawn in Section VII.

2 Methods

The input to the automatic detection of PCOS system is the ultrasound image of ovary. The ovary occupies only a small region in the entire ultrasound image, Region of Interest (ROI) is extracted from the input image. The ultrasound images are attributed to speckle noise, so in pre-processing stage speckle noise is removed using various speckle filtering techniques. Scalar technique: Scalar channels depend on the proportion of nearby measurements, which improves smoothing in homogenous areas of the pictures where spot is completely created and diminishes obviously in different locales of the picture so as to safeguard the valuable subtleties of the picture. Key sorts of scalar channels are Mean channel and Median channels talked about in next segments. A ROI extraction is used to filter a portion of an image for the filter operations. It is abbreviated as region of interest (ROI). In the follicle identification phase the follicles are segmented using proposed method and the features such as area, major axis, minor axis, and eccentricity are extracted from the segmented results. Based on the feature information the ovary is classified as normal/ abnormal. The block diagram of the proposed method is shown in Fig. 1.

Fig. 1
figure 1

Block diagram of automatic detection of ovarian follicles

3 Speckle noise reduction in ultrasound images

An automatic segmentation of ultrasound medical images produces less accurate result due to speckle noise known as multiplicative noise. Medical ultrasound imaging, uses sound waves and their echoes to scan the human body, due to the interference of echoes produced by reflectors introduces speckle noise in the image, which degrades the quality of an image. The recent version of the ultrasound systems like GE LOGIQ and Siemens, exclusively deliver various image denoising techniques to remove speckle noise in the image. The images obtained from these systems gives noise free image. In this paper, for pre-processing of an image various filtering techniques are applied on ultrasound ovary image. The performances of filtering techniques are evaluated using different metrics and the results are tabulated.

The mathematical expression of multiplicative noise model is given by

$$ \overline{k}\left[a,b\right]=k\left[a,b\right]+\eta \left[a,b\right]k\left[a,b\right] $$
(1)

Let k [a,b] be the original ultrasound ovary image. \( \overline{k} \)[a, b]be the digitized version of noise and η[a,b] is the noise function [14].

3.1 Lee filter

Lee filter is a statistical filter based on Minimum Mean Square Error criterion [22]. Lee filter with window size of 3 × 3, 5 × 5, 7 × 7 are used to reduce speckle noise. The main drawback of lee filter is that it failure to remove noise in the edges and lines.

The formula for Lee filter is given as

$$ \hat{K}\left(r,s\right)=g\left(r,s\right)w\left(r,s\right)+\overline{g\left(r,s\right)}\left(1-w\left(r,s\right)\right) $$
(2)

Where w(r,s) is the weighted function.

$$ w\left(r,s\right)=1-\raisebox{1ex}{${c}_x^2$}\!\left/ \!\raisebox{-1ex}{${c}_g^2\left(r,s\right)$}\right. $$
(3)

3.2 Kuan filter

Kuan filters are used to reduce speckle noise from the medical ultrasound images in order to preserve edges in an image. The Kuan filter is same as the lee filter but it uses the different weighting function [21].

$$ w\left(r,s\right)=\frac{1-\raisebox{1ex}{${c}_x^2$}\!\left/ \!\raisebox{-1ex}{${c}_g^2\left(r,s\right)$}\right.}{1+{c}_x^2} $$
(4)

3.3 Frost filter

The filter approximates the noise-free image by convolving the observed image with a spatially-varying kernel [12] as.

\( \overline{K}\left(r,s\right)=g\left(r,s\right)\ast m\left(r,s\right) \). The kernel m(r, s) centered at the pixel location (x0, y0), is given as

$$ m\left(r,s\right)={D}_1\exp \left(-D{C}_1^2\left({r}_0,{s}_0\right)|r,s|\right) $$
(5)

Where the parameter D is used for controlling the dampening rate, |r,s| is used to denote the distance of each pixel from (r0,s0), and D1 is a constant used for normalizing. An estimate for Cn is not required in this approach[11]. Parameter D must be chosen based on homogeneous regions with inhibited edges after mean filtering process is implemented. When compared to Lee and Kuan filter, Frost filter produces better results for ultrasound ovary images. The performance of the filter is evaluated using the estimation parameters.

3.4 Median filter

The Median filter is non linear in nature, that first sort all the specific neighborhood pixel values in the original image based on the size of their intensity values and replaces the median pixel value in the window by center pixel value of its neighbors [14]. For certain types of random noise median filter provides excellent noise reduction capabilities and it preserves edges. In this paper median filter with window size of 3 × 3, 5 × 5 and 7 × 7 applied on the ovary image. The experimental result shows that the filter with smaller window size yields better quality image.

3.5 Gaussian filter

The Gaussian low pass filter removes the noise as a result of blurring images. Gaussian kernel uses a different kernel. The Gaussian filter has the more familiar form [14]

$$ g\left(r,s\right)={e}^{-{C_f}^2\left(r,s\right)/2{C}_{f_o}^2} $$
(6)

where Cf(r,s) is the distance from the origin of the Fourier transform and \( {C}_{f_0} \) is the cut off frequency.

3.6 Wiener filter

The wiener filter, a data- dependent linear filter is the most important technique used to suppress the noise added in the signal. For instance images degraded by blurring and additive noise due to linear motion or unfocussed optics. MSE-optimal stationary linear filter is used in wide range of applications such as echo cancellation, channel equalization, signal restoration and linear prediction. The wiener filter is used to restore the image which is based on the local image variance [14]. The Wiener filter equation is given by

$$ I\left(x,y\right)=\left[\frac{H^{\hbox{'}}\left(x,y\right)}{H{\left(x,y\right)}^2+\left[\frac{K_n\left(x,y\right)}{K_f\left(x,y\right)}\right]}\right]F\left(x,y\right) $$
(7)

where H(x,y) is the degradation function and H(x,y) is the conjugate complex.

3.7 Performance evaluation

The quality of an image is important when processing medical ultrasound images. The visual perception is improved in the denoised images which makes the diagnosis easier. The evaluation metrics like Mean Square Error (MSE), Peak Signal to Noise Ratio (PSNR), Normalized Cross Correlation (NK), Absolute Difference (AD), Structural Content (SC), Maximum Difference (MD). Normalized Absolute errors (NAE) are illustrated below. These metrics are calculated using original image g and the filtered image g.

3.7.1 Mean square error (MSE)

The MSE measures the total amount of difference between the original image and filtered image.

$$ MSE=\frac{1}{RC}\sum \limits_{s=1}^R\sum \limits_{k=1}^C\Big(G\left(s,k\right)-{G}^{\hbox{'}}{\left(s,k\right)}^2 $$
(8)

3.7.2 Peak signal to noise ratio (PSNR)

It is an evaluation parameter to evaluate the performance of the filters. The PSNR is higher for the good quality image and it is lower for the poor quality image.

$$ PSNR=10\log \frac{255^2}{MSE} $$
(9)

3.7.3 Normalized cross correlation (NK)

The normalized cross correlation measure is described as

$$ NK=\sum \limits_{s=1}^R\sum \limits_{k=1}^CG\left(s,k\right).{G}^{\hbox{'}}\left(s,k\right)/\sum \limits_{s=1}^R\sum \limits_{k=1}^C{G}^2\left(s,k\right) $$
(10)

3.7.4 Absolute difference (AD)

The absolute difference is described as

$$ AD=\sum \limits_{s=1}^R\sum \limits_{k=1}^C\left(G\left(s,k\right)-{G}^{\hbox{'}}\left(s,k\right)\right)/ RC $$
(11)

In Eq. 11.G and G are the original image and denoised image. R and C are the rows and columns of an image.

3.7.5 Structural content (SC)

The structural content of an image is given in the Eq. 12.

$$ SC=\sum \limits_{s=1}^R\sum \limits_{k=1}^C{G}^2\left(s,k\right)/\sum \limits_{s=1}^R\sum \limits_{k=1}^{\kern0em C}{G}^{\hbox{'}2}\left(s,k\right) $$
(12)

The smallest value of structural content shows better quality of an image whereas highest value of structural content is evidence for poor quality image.

3.7.6 Maximum difference (MD)

The maximum difference of an image is described as

$$ MD=\mathit{\operatorname{Max}}\left(|G\left(s,k\right)-{G}^{\hbox{'}}\left(s,k\right)|\right) $$
(13)

The smallest value of maximum difference means the image is better quality.

3.7.7 Normalized absolute error (NAE)

The normalized absolute error of filtered image is defined as

$$ NAE=\sum \limits_{s=1}^R\sum \limits_{k=1}^C\mid G\left(s,k\right)-{G}^{\hbox{'}}\left(s,k\right)\mid /\sum \limits_{s=1}^R\sum \limits_{k=1}^C\mid G\left(s,k\right)\mid $$
(14)

The largest value of normalized absolute error shows the image is poor quality.

The Lee filter, Kuan filter, Frost filter, Median filter and Wiener filter are implemented using kernel size of 3 × 3, 5 × 5, 7 × 7, the Gaussian low pass filter are implemented using different cut off frequency 10, 20 and 30The Fig. 2(a) shows an original ultrasound ovary image and the resultant images of different denoising filters are shown in Fig. 2 (b)–(r). For evaluating the performance of denoising filter various metrics are measured Mean Square Error (MSE), Peak Signal to Noise Ratio (PSNR), Normalized cross correlation (NK), Absolute Difference (AD), Structural Content (SC), Maximum Difference (MD), Normalized Absolute Error (NAE). For the Figs. 3-9 denoising filters are taken on x-axis and performance metrics is taken on y-axis which depicts the performance of the filter.

Fig. 2
figure 2

(a) Original Image (b) Frost 3 × 3 (c) Frost 5 × 5 (d) Frost 7 × 7 (e) Lee 3 × 3 (f) Lee 5 × 5 (g) Lee 7 × 7 (h) Kuan 3 × 3 (i) Kuan 5 × 5 (j) Median 3 × 3 (k) Median 5 × 5 (l) Median 7 × 7 (m) Gaussian fc = 10 (n) Gaussian fc = 20 (o) Gaussian fc = 30 (p) Wiener 3 × 3 (q) Wiener 5 × 5 (r) Wiener 7 × 7

Fig. 3
figure 3

MSE-Filter performance graph

Fig. 4
figure 4

PSNR-Filter performance graph

Fig. 5
figure 5

NK-Filter performance graph

Fig. 6
figure 6

AD-Filter performance graph

Fig. 7
figure 7

SC-Filter performance graph

Fig. 8
figure 8

MD-Filter performance graph

Fig. 9
figure 9

NAE-Filter performance graph

Tables 1, 2 and 3 provides additional results to observe the filter performance in terms of MSE, PSNR, NK, AD, SC, and MD for Test Image 1, Test Image 2 and Test Image 3 respectively. Minimizing the MSE, NAE, NK, SC, AD and maximizing the PSNR values results in a filter which is the best among the other denoising filter. From the Figs. 3, 4, 5, 6, 7, 8 and 9, we examined that the Frost filter with kernel size 3 × 3 gives better results than other denoising filters. The Median and Wiener filters are mainly used to remove additive noise. Median filter works well for salt & pepper noise, whereas it produces poor results for denoising multiplicative noise. Gaussian low pass filter produces better result for denoising speckle from image but which results in more blurred images fine details are loosed in this process. Lee, Kuan, Frost, Median, Wiener and Gaussian filters are applied on 65 ultrasound ovary images and the performances are evaluated. The results are tabulated and each metrics values for different filters are plotted separately. In this paper the experimental results of three ultrasound image is shown to ensure the consistency of results.

Table 1 Performance metrics of different denoising filters for test image 1
Table 2 Performance metrics of different denoising filters for test image 2
Table 3 Performance metrics of different denoising filters for test image 3

In this paper the experimental results of three ultrasound image is shown to ensure the consistency of results. From the performance metrics Tables 1, 2, 3, and from the plots it is observed that Frost filter with kernel size 3 × 3 is better among all the other filters for denosing ultrasound ovary images.

As discussed previous, nowadays most ultrasound systems itself contains despeckling filters, for this work the testing images are acquired using latest GE system. Even though at the time of transmission there is chance for contamination, for furthering processing the images are preprocessed using standard filter.

The ultrasound images are denoised by various filters which are shown in the Fig. 2. for visual assessment. The Fig. 2 shows all methods achieve better speckle suppression. Gaussian methods blur the image to remove noise, but it is not suitable for accurate diagnosis of medical images. Wiener filter successfully denoised the image with the kernel size of 3 × 3. Several important details have lost by Lee and Kuan filters in which the result of the images at the end is blurred. In addition, better visual enhancement is yielded by Frost filter having the kernel size of 3 × 3 for ultrasound ovary images. The optimum value is obtained from Frost filter which satisfies four metrics. For Frost Filter peak signal to ratio is high and mean square error, normalized absolute error and structural content is low. The main disadvantage of Lee filter over other filtering techniques is that it fails to remove speckle noise in the region near to the edges. The performance of the Frost filter is better than the other filters.. Based on the performance metrics the filter is chosen to preprocess the ultrasound image. The denoised image is used for further processing.

4 Follicle segmentation

Segmentation is defined as the process of partitioning an image into meaningful sub region that exhibit desired features. Segmenting follicles from ovary image is a difficult task due to the presence of soft tissue, ordinary tissue and blood vessels. Thresholding is an effective technique to discriminating objects from background which is based on the principle of minimization function produces an optimal threshold value. The choice of threshold must be made empirical by considering the nature of their image and the number of objects expected from the image. The Otsu method binarizes the image into two groups based on the principle of minimization of within class variance. In this section we review the Otsu and Proposed method for accurate segmentation of follicles from the ovary image.

4.1 Otsu method

Otsu’s method [29] finds the optimal threshold, from the histogram of an image to binarize the image into two groups. The means of the two groups are computed as μ1 and μ2.

$$ {\mu}_{c_1}(t)=\sum \limits_{j=1}^t\frac{j\mathrm{P}(j)}{K_1(t)}{\mu}_{c_2}(t)=\sum \limits_{j=t+1}^S\frac{j\mathrm{P}(j)}{K_2(t)} $$
(15)

where S is the no of gray level. The optimal threshold t* is as follows

$$ {t}^{\ast }=\arg \underset{t}{\min }{\sigma}_w^2(t) $$
(16)

Where \( {\sigma}_w^2 \) is the within class variance

$$ {\sigma}_w^2(t)={K}_1(t){\sigma}_1^2(t)+{K}_2(t){\sigma}_2^2(t) $$
(17)

Where K1, K2,σ12, σ22are the estimated group probabilities and group variances. They are calculated as

$$ {K}_1=\sum \limits_{j=1}^t\mathrm{P}(j)\kern0.48em {K}_2=\sum \limits_{\begin{array}{l}j=t+1\\ {}\end{array}}^S\mathrm{P}(j) $$
(18)
$$ {\sigma}_1^2(t)=\sum \limits_{j=1}^t{\left[i-{\mu}_{c_1}(t)\right]}^2\frac{\mathrm{P}(j)}{K_1(t)}{\sigma}_2^2(t)=\sum \limits_{j=t+1}^S{\left[j-{\mu}_{c_2}(t)\right]}^2\frac{\mathrm{P}(j)}{K_2(t)} $$
(19)

where the gray level range varies from 1 to S. The result of the Otsu method is shown in Fig. 10. The Otsu’s method does not produce satisfactory result to extract follicles from ovary image. The performance of the Otsu method leads to do modification in it to obtain accurate results.

Fig. 10
figure 10

(a) A ultrasound ovary image with follicles.(b) The result given by the conventional Otsu’s method. (c) Area open image. (d) The result of the counted follicles. (e) The result of the edge detected image. (f) Superimposed on original Image

4.2 Proposed method

The proposed method provides an automatic method for follicle extraction from ultrasound ovary images using active contour without edges method [7]. In region based active contour initial contour can be placed anywhere in the image. The contour initialization is the difficult task, the poor initialization can produce the contour away from the follicles region. In order to automate the segmentation process, the ovary image is binarized using modified Otsu method and the resultant image is used as a binary mask for initialization of the level set method. The binary mask contains only two regions background and foreground which is as close as to the segmented object it can solve the problem of contour initialization. The proposed segmentation method begins with thresholding the ovary image using Modified Otsu method. In thresholding technique the objects are extracted from the image based on distribution of gray levels. The traditional Otsu method fails to segment the follicles accurately which is shown in Fig. 10. From the result we understand that Otsu method produces correct result only when the image histogram is bimodal. The proposed modified Otsu method produces accurate results for all types of histogram.

4.3 Modified Otsu method

The thought of estimating initial threshold value in Otsu method using iterative method is introduced here. Initially the threshold T1 is the average value of the ovary image. At the first iteration, the intensity of the image which is greater than or equal to the threshold T1 is identified. In the next step, mean value above current threshold and mean value below current threshold are calculated which is denoted as m1[31], m2[1].

The new set of threshold is calculated as

$$ T\left[1\right]=\frac{m_1^{\left[1\right]}+{m}_2^{\left[1\right]}}{2} $$
(20)

The newly calculated threshold value T[1] carry forward to the next iteration. The superscript denotes the number of iterations. At the second iteration, the intensity of the image which is greater than or equal to the current threshold T[1] is find. In the second iteration the mean value m1[2] below the current threshold T[1] and mean value m2[2] above T[1] is calculated. Similarly, the second iteration calculates the threshold value

$$ T\left[2\right]=\frac{m_1^{\left[2\right]}+{m}_2^{\left[2\right]}}{2} $$
(21)

The iteration stops until the threshold value convergesT[K] − T[K − 1]. At the last iteration the new threshold value is calculated as

$$ {t}^{\ast \ast }=\frac{{m_1}^{\left[K\right]}+{m_2}^{\left[K\right]}}{2} $$
(22)

The between class variance of the conventional Otsu method was defined as

$$ {\sigma}_B^2(t)={K}_1{\left({\mu}_{c_1}-{\mu}_t\right)}^2+{K}_2{\left({\mu}_{c_2}-{\mu}_t\right)}^2 $$
(23)

Now, iteratively calculated threshold value t** in Eq. (22) is used as an initial threshold for conventional Otsu method.

Where \( {\mu}_{c_1} \),\( {\mu}_{c_2} \) are means of two groups

$$ {\mu}_{c_1}(t)=\sum \limits_{j=1}^{t\ast \ast}\frac{j\mathrm{P}(j)}{K_1(t){\mu}_{c_1}(t)} $$
(24)
$$ {\mu}_{c_2}(t)=\sum \limits_{j={t}^{\ast \ast }+1}^S\frac{j\mathrm{P}(j)}{K_2(t)} $$
(25)

The total mean μt the whole image is given in the Eq. (26)

$$ {\mu}_t=\sum \limits_{j=1}^Sj\Pr (j) $$
(26)

4.3.1 Initialization of mask

The modified Otsu method produces the binary image consists only background (zero) and object (white), in the proposed method which is used as a binary mask in order to initialize the contour position. For accurate and faster diagnosis, specifying initial contour position which is closest to the preferred object boundaries is needed. The initial mask for the level set algorithm is shown in Fig. 11(e). The level set method was proposed by Osher and Sethian [32]. In the implementation of active contour with level set method provide flexibility. The interface C is internally denoted as function ɸ for a level set function. This is rather represented as scalar functionC = {(y, z), ϕ(y, z) = 0}.

Fig. 11
figure 11

Axis of ellipse

The Signed Distance function is obtained from initial mask. The narrow band approach is used to reduce the computation time taken by level set method to make a ɸ change [32]. The values of the ɸ are updated which is exist within the narrow band. The curves narrow band is given by the equation

$$ {C}_{nb}=\left\{\left(i,j\right)-\beta \le \beta, i=\left[0,n-1\right],j=\left[0,m-1\right]\right\} $$
(27)

The mean curvature of the level set function is given by

$$ curvature=\frac{\left({\phi}_y^2\ast {\phi}_{zz}+{\phi}_z^2\ast {\phi}_{yy}-2{\phi}_y{\phi}_z{\phi}_{yz}\right)}{{\left({\phi}_y^2+{\phi}_z^2\right)}^{\frac{3}{2}}} $$
(28)

where ɸyand ɸyydenote the first and second-order partial derivatives of ɸ with respect to y, and ɸzand ɸzzdenote the same with respect to z which is given by

$$ {\phi}_y^2={\left(\frac{\partial \phi }{\partial y}\right)}^2\;{\phi}_z^2={\left(\frac{\partial \phi }{\partial z}\right)}^2\;{\phi}_{yy}=\left(\frac{\partial^2\phi }{\partial {y}^2}\right)\;{\phi}_{zz}=\left(\frac{\partial^2\phi }{\partial {z}^2}\right)\;{\phi}_{yz}=\left(\frac{\partial^2\phi }{\partial yz}\right) $$

The Central difference approximation is given by

$$ {\displaystyle \begin{array}{l}{\phi}_y=-\phi \left({P}_l\right)+\phi \left({P}_r\right)\\ {}{\phi}_z=-\phi \left({P}_d\right)+\phi \left({P}_u\right)\\ {}{\phi}_{yy}=-\phi \left({P}_l\right)-2\phi (P)+\phi \left({P}_r\right)\\ {}{\phi}_{zz}=-\phi \left({P}_d\right)-2\phi (P)+\phi \left({P}_u\right)\end{array}} $$
(29)

Each of the derivatives of ɸ is estimated in relation to y and z. The value of ϕ after a small time interval ∆t was approximated by the first-order Taylor expansion given by equationϕtis defined by gradient descent and ∆t is the time step.

$$ {\displaystyle \begin{array}{l}\phi \left(\left(y,z\right),t+\varDelta t\right)=\varDelta t\ast {\phi}_t+\phi \left(\left(y,z\right),t\right)\\ {}{\phi}_t=\alpha \ast curvature+\frac{F}{\max \mid F\mid}\\ {}\varDelta t=\frac{1}{\left(\max \left({\phi}_t\right)+\varepsilon \right)}\end{array}} $$
(30)

where α is the weight of a smoothing term and ε is coefficient to satisfy Courant, Friedrichs, Lewy (CFL) condition [28]. Whereas resolve certain partial differential equations CFL condition is essential.

The Sussman function [8] is used to smooth the SDF

$$ {\phi}_{i,j}^{M+1}={\phi}_{i,j}^M-\varDelta t{S}_{\varepsilon}\left({\phi}_{i,j}\right)G\left({\phi}_{i,j}^M\right) $$
(31)

Where,

$$ {\displaystyle \begin{array}{l}{S}_{\varepsilon }{\left(\phi \right)}_{i,j}=\frac{\phi_{i,j}^2}{\sqrt{\left({\phi}_{i,j}^2+{\varepsilon}^2\right)}}\\ {}H\left({\phi}_{i,j}^N\right)=\Big\{\begin{array}{l}\sqrt{\left(\max {\left({K}^{+}\right)}^2,{\left({L}^{-}\right)}^2+\max \left({\left({M}^{+}\right)}^2,{\left({N}^{-}\right)}^2\right)\right)}-1\\ {}\sqrt{\left(\max {\left({K}^{-}\right)}^2,{\left({L}^{+}\right)}^2+\max \left({\left({M}^{-}\right)}^2,{\left({N}^{+}\right)}^2\right)\right)}-1\\ {}0\; otherwise\end{array}\end{array}} $$

The combination of modified Otsu with active contour provides better segmentation results. From the segmented results necessary information are extracted for further diagnosis.

5 Extraction of features

The objective of the feature extraction technique is to extract typical information which is useful for diagnosis and classification of diseases. The shape based features Area, Perimeter, Eccentricity, Majoraxis, Minoraxis are extracted from ultrasound ovary images. The size and number for the follicle is used for classifying the image as cystic ovary, normal ovary, and polycystic ovary. The shape based information is extracted from segmented results obtained from different methods those are listed in the Tables 4, 5 and 6.

Table 4 Feature extraction from Otsu’s results
Table 5 Feature extraction from modified Otsu’s results
Table 6 Feature extraction from proposed method results

5.1 Area

Area of an object in the image is generally defined as the number of pixels inside the object. Thereby, the area of a follicle in an ovary imageis determined by the number of pixels constituting the follicle. It is used to identify the size of the follicle.

5.2 Perimeter

The perimeter is the overall length of the object boundary which is calculated by the distance among each neighboring pair of pixels around the edge of the region.

5.3 Eccentricity

The ratio of the distance between the region of the follicle and its major axis length is known as Eccentricity.

5.4 Majoraxis&Minoraxis

The diameter is the minor as well as major axes of an ellipse. The major axes includes longest diameter of an ellipse and minor-axes includes the shortest diameter of an ellipse.

6 Experimental results

The proposed method has been validated by applying it to a various ultrasound ovary images. For this study, the ultrasound images of ovaries are collected from Nandhini Sri Diagnostic Center after consultation with Radiologist and Gynecologist. The images are captured by the GE LOGIQ ultrasound system which is having 24 Hz transvaginal transducer frequency. The simulation is processed using the 65 sample ultrasound-images of ovaries. The experiments have been executed on Hp Pavilion dv5 with Intel® Core™ 2 Duo CPU @ 2.00GHz with 3 GB of RAM running on Microsoft Windows 7 platform. The proposed method is implemented using Matlab programming language on the Matlab 2012a software.

The Fig. 10 (a) shows an original ultrasound ovary image and Fig. 10(b) presents the result given by the conventional Otsu’s method. Many undesired regions are also found in the segmented result it is necessary to remove these undesired regions. Hence the objects having area less than 50 are removed and the objects touching the border also removed from Fig. 10(b) which is shown in Fig. 10(c). From the segmented results the size and the number of follicles are extracted for diagnosis. The number of identified follicles is shown in Fig. 10(d). Based on the number of follicles and its size the ultrasound ovary images are classified into cyst, PCOS and normal ovary, accurate detection of follicles results in correct diagnosis. The Fig. 10(e) represents the detected edges of the follicles and the Fig. 10 (f) shows the segmented follicles superimposed on the original image.

Fig. 12(a) represents the original image and the Fig. 12(b) shows the histogram of an original image. The input images are preprocessed for better diagnosis based on the optimum value obtained from Tables 1, 2 and 3 the filter is chosen to denoised the original image. The Frost filtered image is shown in Fig. 12(c). As can be seen from the experimental results we come to know all follicles are not correctly identified by the Otsu method. The modified Otsu method binarizes the image the result is shown in the Fig. 12(d). The objects touching the border removed also the objects with less than 50 pixels are removed. The Fig. 12(e) illustrates the binary mask obtained from modified Otsu method which is further used as an initializing mask in proposed method. The proposed method exactly segment all follicles present in the image which is illustrated in the Fig. 12(f). The number of follicles and its size is used to classify the image. Therefore, the number of follicles is counted which is shown in the Fig. 12(g) and its shape information extracted. The edges of the objects are detected from the Fig. 12(f). Then using this information the extracted follicles are superimposed on original image as depicted in Fig. 12(h). The Fig. 12(i) shows the detection of manual follicle that is done by the medical expert. Manual follicle detection done by the medical expert. This automatic method demonstrates the efficiency of the proposed technique.

Fig. 12
figure 12

(a) Ovary Image.(b) Histogram of an Ovary Image. (c) The result given by Frost filter. (d) The result given by Modified Otsu. (e) Mask initialization. (f) The result given by proposed method. (g) The result of the identified follicles. (h) The result superimposed on original image (i) Manual detection by medical expert

The Fig. 13 sample shows the resultant image owing to the fact that the proposed method produces better among all the other methods. The shape feature information is extracted from the segmented results yielded by different segmentation methods. The Fig. 14 shows the number of follicles identified by proposed method in comparison to the previously mentioned segmentation methods for three ultrasound ovary images. For Test Image 1 Otsu method detects 4 follicles and modified Otsu method detects 6 follicles finally the proposed method exactly detects 7 follicles. The automatic detection method classifies Test Image 1 as normal ovary, Test Image 2 as Cystic Ovary and the Test Image 3 is classified as Polycystic Ovary. The shape features are extracted from the segmented image yield by Otsu method, modified Otsu method, and the proposed method. The shape information Area, Perimeter, Majoraxis, Minoraxis and Eccentricity are calculated which is shown in the Tables 4, 5, 6. As can be seen from the results the proposed method yields more accurate results than other methods also the obtained results equivalent the manual detected results by the medical expert. Based on the experimental results obvious improvements can be seen in the proposed algorithm, furthermore it achieves accurate automatic diagnosis of PCOS on ultrasound ovary images.

Fig. 13
figure 13

Some distinctive results for 3 input images a) Original Image b) Segmentation by Otsu method c) Segmentation by Modified Otsu d) Segmentation by Active Contour e) Segmentation by Proposed method

Fig. 14
figure 14

Difference in follicle counts identified by the Otsu method, by the modified Otsu method by the proposed method and by the experienced medical expert for three different ultrasound ovary images

7 Conclusion and future work

This work presents a computationally efficient method for automatic follicle detection and segmentation of ovarian follicles from the ultrasound ovary image. In this paper the result of the modified Otsu method is taken as an initial mask for the level set formulation. Compared with Otsu method the modified Otsu method provides the more accurate segmented results. The combination of modified Otsu method with active contour detects the exact number of follicles from the ultrasound ovary image. The proposed method outperforms than the other known techniques based in terms of accuracy. Hence these proposed methods are well suited for extraction of follicles from the ovary images. The medical expert study the women’s menstrual cycle and assesses the follicles inside the ovaries of woman who undergoes infertility treatment for this automatic diagnostic system is needed to reduce the computational complexity. The automatic diagnostic method reduces the trouble of the radiologist and Gynecologists without give up the accuracy of diagnosis. This work will be look forward to helpful in the development of software tool embedded in the ultrasound system. In future the segmented images are classified using best classification method with large database.