Introduction

The liver is one of the most important organs of the human body. Liver failure may lead to a life-threatening condition especially if diagnosed late. Only about 10% of liver failure cases are detected at an early stage. Liver cancer is one of the most common cancer types in developing countries like Africa and East Asia [1]. Proper diagnosis of the liver at an early stage is utmost needed. Liver diagnosis can be done using different imaging modalities available like MRI, CT, ultrasound, PET, etc. Among all medical imaging modalities, ultrasound imaging is usually preferred over other modalities because ultrasound imaging is non-invasive in nature. Also, ultrasound imaging has real-time imaging capabilities and the scanning machine is economical and portable. The radiologist examines the ultrasound image of the liver, and on the basis of echogenicity differences, the radiologist is able to differentiate between the normal and abnormal regions of the liver and also able to predict the type of lesion [2]. However, usually, ultrasound images are contaminated with speckled noise which makes the texture of different regions too complex and intermixed and therefore interpretation of the lesions becomes difficult and correct interpretation needs lot of experience. Wrong interpretation of the lesion may become critical and hence a system is needed that may interpret or assists in interpreting the lesion correctly [2]. For the development of a system that can detect and classify lesions from ultrasound images, research has been done on different aspects. Many researchers concentrate themselves for the development of the CAD system that can classify lesions into different classes [26], whereas some research has been focused on segmentation of lesions from ultrasound images [710]. In this paper, we have focussed on segmentation of B-mode liver ultrasound images containing focal liver lesions.

Image segmentation is the process of partitioning the image into disjoint regions such that the pixels present in the same region have some similarity whereas the pixels present in different regions have some dissimilarity. Segmentation methods can be classified as supervised segmentation methods or unsupervised segmentation methods. Some of the most common supervised segmentation methods are k-nearest neighbors [11], maximum likelihood method, active contour methods [7, 1219], artificial neural network (ANN) [20], and support vector machine (SVM) [21, 22] whereas most common unsupervised segmentation methods are based on clustering methods like K-means clustering, fuzzy C-mean (FCM) clustering, hierarchical clustering, and Markov random field (MRF). Presently, most of the segmentation algorithms are concentrated on the active contour method (ACM) [7, 12, 14, 15, 2327] and MRF [2838]. Active contour methods are the curve evolution methods. They can be classified into two types as region-based ACM [12, 1619] and edge-based ACM [14, 15]. Caselles et al. [15] proposed the geodesic active contour method (GACM). It is the edge-based ACM that uses image gradient for edge detection and hence is sensitive to speckle noise and weak edges. After Caselles, a large number of literature can be found on edge-based ACM for segmentation [39, 40]. Chan and Vese [12] proposed a CV method. It is a region-based ACM and is less sensitive to weak edges and speckle noise but is computationally expensive and faces a problem when regions to be segmented have similarly distributed segments.

Markov random field (MRF) is the method of modeling disjoint regions of an image using a probabilistic model. Segmentation is achieved by first classifying the pixels into different regions and then estimating the parameters of the probabilistic model for each object. Panjwani et al. [41] proposed MRF models for segmenting textures with color map. Salzenstein and Pieezynski [42] proposed the concept of fuzziness in modeling MRF models. Xin Liu et al. [38] proposed an efficient way of segmentation by combining the two steps of estimation of MRF model parameters and segmentation of image into a single step.

The FCM method is the clustering method in which image is divided into clusters on the basis of some features like intensity, texture, etc. To make the FCM method robust, local spatial information of pixels are also considered with the general FCM method [4351]. Inclusion of kernel-based methods with the FCM method makes segmentation more accurate under noisy conditions [5257].

In this paper, we have proposed region-difference filters for the segmentation of liver ultrasound images. Region-difference filters evaluate the maximum difference of the average of the two regions of the window around the center pixel. Implementing the filters on the whole image gives the region-difference image. This image is then converted into binary image and is morphologically operated for segmenting the desired lesion from the ultrasound image.

This paper is structured as follows. Section “Methodology” presents the proposed methodology for the segmentation of liver ultrasound images. To evaluate the performance of the proposed method, performance parameters considered are discussed in section “Qualitative and Quantitative Evaluation of the Proposed Method”. Section “​Experimental Results and Discussion” presents the experiments conducted on liver ultrasound images. Segmentation results are also discussed in section “Experimental Results and Discussion”. Finally, concluding remarks are given in section “Conclusion”.

Methodology

In this paper, filters for the segmentation of the focal liver lesion from liver ultrasound images are proposed. For the segmentation, first, a single pixel is selected manually from the region anywhere inside the lesion; then, using the proposed filters, difference of the average intensity on the two halves of each of the filters is evaluated. Out of the four difference values obtained corresponding to four filters, one which gives the highest difference is selected. Implementing the filters on the whole image gives the region-difference image. This image is then converted into a binary image whose skeleton is then obtained using morphological tools. Selecting all the nearest edges that encloses the manually selected pixel gives the edge of the focal liver lesion. The region on the inner side of the edges obtained gives the desired lesion to be segregated from the liver ultrasound image. Due to the involvement of overall difference of the region intensities, the proposed method is able to detect weak edges or boundaries having very little difference between the two regions separated by the edge or the boundary.

Complete description of the proposed filters and proposed segmentation method are given in the following sub-sections. Sub-section “​Alpha-Trimmed Mean Filter” gives the brief introduction to the alpha-trimmed mean filter. Region-difference filters proposed in the paper are introduced and described in section “​Region-Difference Filters”. Sub-section “Edge Detection from Region-Difference Image” describes the procedure to detect the edges of the lesion from the region-difference image obtained by the implementation of the region-difference filters on the liver ultrasound images. Stepwise procedure for the implementation of the proposed segmentation method is then described in section “Implementation of the Proposed Method”.

Alpha-Trimmed Mean Filter

Alpha-trimmed filter is the filter that evaluates the average of the elements after removing the outlier elements. It works somewhere in between the average and median filter. To evaluate the alpha-trimmed mean value of the M elements, elements are sorted in ascending order, and then alpha times M (αM) number of elements are removed from both sides of the sorted elements. Average of the remaining elements will be the alpha-trimmed mean value of the M elements. The value of alpha lies between 0 and 0.5. Since alpha-trimmed mean value is obtained after removing elements having extreme values, therefore, it proves to be the effective method for enhancing the ultrasound images contaminated with speckled noise. Alpha-trimmed mean filter has been used for removing speckle noise from ultrasound images [5861]. Remzi Oten et al. [61] proposed adaptive alpha-trimmed mean filters capable of selecting the best value of alpha for the filters.

Region-Difference Filters

To detect the difference in the two regions of an image efficiently, four N × N sized filters are proposed in this paper. Since these filters are used to evaluate quantitatively the difference between the two regions of the image, therefore, these filters are named as region-difference (RD) filter in this paper and are denoted as RD1, RD2, RD3, and RD4. All the four RD filters are divided into three regions by assigning values +1, 0, and −1 to the elements of the window. As shown in Fig. 1, all the four filters are similar with each other but are aligned at an angle of 0, 45, 90, and 135°.

Fig. 1
figure 1

Windows used for the implementation of the proposed segmentation method

Stepwise procedure to evaluate the difference between the two regions of the image is described below:

  1. 1.

    Consider a sub-image, I s of size N × N from the image, I.

  2. 2.

    Follow the following procedure for all the four RD filters:

    1. a.

      Multiply RD filter with the sub-image I s.

    2. b.

      Evaluate alpha-trimmed mean value for all the pixels of I s having value greater than zero. Let it be AM1.

    3. c.

      Evaluate alpha-trimmed mean value for all the pixels of Is having value smaller than zero. Let it be AM2.

    4. d.

      Take the absolute difference of the absolute values obtained in step 2(b) and step 2(c).

  3. 3.

    Step 2 gives four absolute difference values corresponding to four RD filters. Maximum of the four absolute difference values is selected and is replaced with the center pixel of the sub-image, I s.

Region-difference image can be obtained by following the same procedure detailed above for the whole image I. For the efficient implementation of the RD filters, proper size, N of the filters need to be selected. Filters with smaller value of N can detect regions with very small variations in pixel intensities but at the same time may get affected with impulse noise present in the image, whereas filters with high value of N ignore regions with small variations in pixel intensities but works efficiently in the presence of impulse noise. From the experiments done on different ultrasound images for various values of N, value of N is selected as 5.

Edge Detection from Region-Difference Image

From the region-difference image, it is observed that pixel attains the value of zero if the two regions around the concerned pixel in the original image are identical whereas pixel value is large if the two regions around the concerned pixel in the original image are largely different. To ignore the small variations between the pixels of the two regions, region-difference image is converted into binary image by assigning value 1 to all pixels of the image above some threshold value and by assigning value 0 to all the remaining pixels of the image.

From the region-difference image, it is also observed that at the boundary of the two regions in the original image, region-difference image forms a thick edge with highest intensity in the middle of the edge and intensity gradually decreases towards the two sides of the edges. It is observed that the highest intensity pixel in the edge is the pixel that lies exactly at the boundary of the two regions and thus extracting the location of the highest intensity pixels from all the edges will give exact edges of different regions present in the original image. Since skeleton of the binary image gives the lines that pass through the center of the object, therefore, to find the skeleton of the binary image obtained from the region-difference image, a morphological operation is operated on the binary image. Since binary image consists of thick edges, therefore, square structuring element of size 3 × 3 serves the purpose of forming the desired skeleton of the image. [62, 63] gives details of the structuring element and skeleton procedure used in the proposed algorithm.

Implementation of the Proposed Method

Stepwise procedure to implement the proposed methodology for the segmentation of FLLs from liver ultrasound images is given below:

  1. 1.

    Read ultrasound image, I.

  2. 2.

    Get a single point, P from the desired object or lesion to be segmented.

  3. 3.

    Obtain region-difference image of the image I by passing the image through the region-difference filters.

  4. 4.

    Detect edges of different regions present in the original image.

  5. 5.

    Select the nearest edge around the pixel selected in step 2 in all direction. This gives the edge of the desired FLL to be detected from the given ultrasound images.

  6. 6.

    Region that lies on the inner side of the edges detected in step 5 is the region of FLL to be segmented.

Figure 2 shows the implementation of the proposed methodology to segment cyst FLL from the liver ultrasound image. Figure 2a is the original image of the liver ultrasound image having a focal liver lesion indicated by an arrow. A point is selected manually inside this lesion. Figure 2b shows the region-difference image obtained after the implementation of step 3 of the methodology. Region-difference image is then converted into binary image by setting the threshold value as 10. Figure 2c is the skeleton obtained on the application of morphological operation on the binary image. In the skeleton, edge of the desired lesion to be segmented is observed and is indicated by an arrow. Figure 2d, e shows the edge detected and region segmented by implementing the proposed method. Figure 2f represents the superimposition of the segmented region on the original image. It shows the position of the region shown in Fig. 2e with respect to the original image. From Fig. 2f, it is observed that the segmentation method completely segregates the desired lesion from the liver ultrasound image. Figure 3 shows the implementation of the proposed method on another liver ultrasound image having hemangioma focal liver lesion.

Fig. 2
figure 2

a Liver ultrasound image containing cyst. b Maximum difference image. c Skeleton of binary image obtained from maximum difference image. d Edge obtained from the proposed image. e Lesion segmented from the original image. f Original image superimposed with the lesion segmented

Fig. 3
figure 3

a Liver ultrasound image containing hemangioma. b Maximum difference image. c Skeleton of binary image obtained from maximum difference image. d Edge obtained from the proposed image. e Lesion segmented from original image. f Original image superimposed with the lesion segmented

Qualitative and Quantitative Evaluation of the Proposed Method

Performance and comparison of the purposed method of segmentation ( based on maximum region difference between nearby regions at different angles) with other segmentation methods is analyzed both qualitatively as well as quantitatively. For the qualitative analysis of the proposed method, segmented results are shown to the experienced radiologist whereas quantitatively analysis is done by evaluating accuracy of the segmentation method to segment the desired lesion. Comparing the lesion segmented (LS) by the segmentation method with the lesion segmented manually (LM) by the experienced radiologist, accuracy (Acc.) of the segmentation method can be evaluated as:

$$ Acc.=\frac{\left(TPP+TNP\right)}{\left(TNP+FNP+TPP+FPP\right)}\times 100\% $$

where TPP, true positive pixels, are the number of pixels of the desired lesion common in both LM and LS; TNP, true negative pixels, are the number of pixels of the background that are common in both LM and LS; FPP, false positive pixels, are the number of pixels of the lesion segmented by the method which in reality are not the part of the desired lesion; and FNP, false negative pixels, are the number of pixels which are not in the segmented region but which in reality are the part of the desired lesion. Segmentation is considered good if using the above formula high accuracy value is obtained.

Performance of the proposed method is also compared with other segmentation methods on the basis of the computational time taken by the methods to segment the desired lesions.

Experimental Results and Discussion

Dataset

To show the performance of the present work, the proposed method is tested on 56 B-mode liver ultrasound images containing focal liver lesions. Out of the 56 images, 41 images were collected from the Department of Radiodiagnosis and Imaging, Post Graduate Institute of Medical Education and Research (PGIMER), Chandigarh, India; whereas the remaining 15 images were downloaded from database available online at www.ultrasoundcases.info. Images obtained from PGIMER were recorded using Philips ATL HDI 5000 ultrasound (US) machine and a transducer of 2–5 MHz range. Digital images collected have the size of 800 × 564 pixels with 256 grey levels. Horizontal and vertical resolution of the images is 96 dpi. For using these images for research, patient’s consent was taken prior to recording. PGIMER dataset of 41 liver US images containing focal liver lesions (FLLs) consists of 14 cases of cyst, 7 cases of hemangioma (HEM), 8 cases of hepatocellular carcinoma (HCC), and 12 cases of metastasis (MET). Images acquired online are low-resolution images having a size of 300 × 225. Online dataset of 15 liver US images containing focal liver lesions (FLLs) consists of 6 cases of cyst, 4 cases of hemangioma (HEM), 2 cases of hepatocellular carcinoma (HCC), and 3 cases of metastasis (MET). Categorization of the datasets is detailed and given in Table 1.

Table 1 Categorization of liver ultrasound images used for testing the proposed method

Parameters Considered

For the implementation of the proposed method, the following parameters need to be fixed:

  1. a.

    Value of alpha for the implementation of alpha-trimmed filter

  2. b.

    Size of region-difference filters

  3. c.

    Threshold value, Th, for converting region-difference image into binary image

Alpha-trimmed filter behaves as pure average filter when the value of alpha is 0, whereas it behaves as median filter when alpha is very near to 0.5. Proper selection of the value of alpha is needed to remove outliers. Similarly, for the efficient implementation of the RD filters, proper size, N of the filters need to be selected. From the large number of experiments conducted with different values of alpha and N on different ultrasound images, it is observed that the segmentation results are the best for the value of alpha equals to 0.2 and N equals to 5. Thus, alpha and N are fixed to 0.2 and 5, respectively, for all the experiments.

The third parameter to be fixed is threshold (Th) value needed to convert the region-difference image into a binary image. Empirically, it is noticed that segmentation highly depends on threshold value selected and for most of the cases it lies within the range from 5 to 30. For the dataset considered in this paper, threshold value is fixed to 15. For this value segmentation, output obtained is very near to the desired segmentation.

Experiments

The proposed region-difference filter based segmentation method is tested on liver ultrasound images containing focal liver lesions. To show the potential of the proposed method, it is compared with the three other methods viz. the maximum a posteriori-Markov random field (MAP-MRF) method, edge-based active contour Chan-Vese (CV) method [11], and region-based active contour region-scalable fitting energy (RSFE) method [13]. The MATLAB code for the RSFE method [13] is acquired online from its author’s website, whereas the MATLAB code for the CV method [11] and MAP-MRF method is implemented by the authors on the basis of the methodology given in the concerned literature. No reference dataset is available online on which the three methods had been tested; therefore, we have tested the three methods and the proposed method on liver US images acquired from PGIMER and from online resource as detailed in section 4.1. For analyzing the performance of the four segmentation methods, accuracy of segmentation and computational time consumed by each method is tabulated in Tables 2, 3, 4, 5, and 6. Figures 4, 5, 6, 7, and 8 shows the segmentation results obtained on implementing the proposed segmentation and other three methods on some of the liver ultrasound images from the dataset.

Fig. 4
figure 4

Segmentation results for liver US images containing cyst. a Original image. b Manually segmented image by expert radiologists. Results obtained by the c MAP-MRF method, d CV-ACM method, e RSFE method, and f proposed method

Fig. 5
figure 5

Segmentation results for liver US images containing hemangioma. a Original image. b Manually segmented image by expert radiologists. Results obtained by the c MAP-MRF method, d CV-ACM method, e RSFE method, and f proposed method

Table 2 Average and standard deviation of the accuracies for the different lesion types obtained by various segmentation techniques on data obtained from PGIMER, Chandigarh for the four classes, i.e., HCC, cyst, hemangioma, and metastasis. In the table average and standard deviation, values are represented as “average (standard deviation)”
Fig. 6
figure 6

Segmentation results for liver US images containing HCC. a Original image. b Manually segmented image by expert radiologists. Results obtained by the c MAP-MRF method, d CV-ACM method, e RSFE method, and f proposed method

Fig. 7
figure 7

Segmentation results for liver US images containing cyst. a Original image. b Manually segmented image by expert radiologists. Results obtained by the c MAP-MRF method, d CV-ACM method, e RSFE method, and f proposed method

Fig. 8
figure 8

Segmentation results for liver US images containing metastasis. a Original image. b Manually segmented image by expert radiologists. Results obtained by the c MAP-MRF method, d CV-ACM method, e RSFE method, and f proposed method

Segmentation of FLL US Images Acquired from PGIMER, Chandigarh

Segmentation results of MAP-MRF, Chan-Vese (CV) active contour, RSFE, and the proposed methods on Cyst, hemangioma and hepatocellular carcinoma (HCC) are shown in Figs. 4, 5, and 6, respectively. From Fig. 4, it is observed that the cyst present in the ultrasound image of the liver has good contrast with the normal region of the liver. When such image having good contrast between the normal and abnormal region is processed for segmentation by different methods, it is observed that the segmentation obtained by the proposed method is very close to the manual segmentation of the lesion. Lesion extracted by MAP-MRF and CV-ACM is slightly under-segmented whereas lesion extracted by the RSFE method is slightly over-segmented. From Fig. 5, it is observed that the hemangioma present in the liver ultrasound image has weak contrast with the normal region of the liver, and hence it becomes difficult to extract the exact boundary of the hemangioma. When such image with weak contrast between the normal and abnormal region is processed by different segmentation methods, it is observed that the segmentation of the hemangioma by MAP-MRF, CV-ACM, and the proposed method is very close to the manual segmentation of the lesion, whereas segmentation by the RSFE method is largely over-segmented and due to weak contrast RSFE is not able to segment the lesion. From Fig. 6, it is observed that at the top and bottom side of the HCC present in the liver ultrasound image, contrast between the HCC and the normal region of the liver is very weak whereas contrast at the right and left side of the lesion is quite good. When this image is processed by different segmentation methods, it is observed that the segmentation of the HCC by MAP-MRF results in under-segmented image of the HCC, whereas segmentation by the CV-ACM and RSFE methods gives largely over-segmented images. Performance of the proposed method is close to manually segmented image and is better as compared to other three methods but it also cannot be considered as good.

Performance of the four segmentation methods implemented on the methods on all of the 41 ultrasound images is analyzed blindly by the experienced radiologist. The radiologist opined that out of the total of 41 cases, the proposed method gives the best segmentation for the total of 35 cases as compared to MAP-MRF, CV active contour, and RSFE methods which gives the best segmentation for the total of 0, 2, and 3 cases, respectively. The proposed method is not able to perform best for the six cases but according to the radiologist segmentation by the proposed method is second best for five cases and is very near to the best segmentation results, and for the sixth case, the radiologist opined that no segmentation method is able to segment the lesion properly. This case consists of atypical metastasis and proper boundary of the lesion is not visible clearly in the ultrasound image.

Quantitative performances of the four segmentation methods are tabulated in Tables 2 and 3. Table 2 shows the average accuracy along with the standard deviation of the accuracies for the different lesion types obtained by all the four methods on all the 41 ultrasound images categorized as HCC, cyst, hemangioma, and metastasis. Overall average accuracy of the four methods is also tabulated in Table 2. Table 3 shows the average computational time taken by the segmentation methods for segmentation. From Table 2, it is observed that for all the 4 categories, the proposed method shows the best performance with an average accuracy of 99.68, 99.54, 99.5, and 99.49% for HCC, cyst, hemangioma, and metastasis, respectively. Also, lowest standard deviation of 0.17, 0.4, 0.22, and 0.21 for HCC, cyst, hemangioma, and metastasis, respectively, shows the consistency of the proposed method for segmenting the lesion from ultrasound images. From Table 2, it is also observed that the overall average accuracy for all the four categories together is the best for the proposed method. For the proposed method, the overall average accuracy obtained is 99.55% compared to 80.66, 99.05, and 65.2% obtained by the MAP-MRF, CV-ACM, and RSFE methods, respectively.

Table 3 Average of computational time taken by various segmentation techniques on data obtained from PGIMER, Chandigarh for the four classes, i.e., HCC, cyst, hemangioma, and metastasis

From Table 3, it is observed that the computational times taken by the proposed method for segmenting HCC, cyst, hemangioma, and metastasis are 5.09s, 5.07s, 5.17s, and 5.09 s, respectively, which is very less as compared to the other methods, MAP-MRF, CV-ACM, and RSFE. It is also observed that overall computational time taken for segmenting all the 4 categories together is 5.1 s compared to 37.17s, 33.4s, and 40.96 s taken by the MAP-MRF, CV-ACM, and RSFE methods. The proposed method takes approximately one seventh of the time taken by the other methods. Due to fast segmentation, the proposed method has the potential of segmenting the lesion in real time. Thus, qualitatively as well as quantitatively, the proposed method proves to be the best over MAP-MRF, CV-ACM, and RSFE methods.

Segmentation of FLL US Images Acquired Online

Segmentation results of MAP-MRF, Chan-Vese (CV) active contour, RSFE, and the proposed methods on cyst and metastasis are shown in Figs. 7 and 8, respectively. From Fig. 7, it is observed that the interior region of the cyst present in the ultrasound image of the liver has good contrast with the normal region of the liver, but its boundary is somewhat blurry and is mixed with the normal region of the liver and it becomes difficult even for the radiologist to segment the exact boundary precisely. When such image having blurry boundaries is processed for segmentation by different methods, it is observed that the segmentation obtained by the proposed method is very close to the manual segmentation of the lesion. Lesion extracted by MAP-MRF and CV-ACM is slightly under-segmented whereas lesion extracted by the RSFE method is very close to the manually segmented lesion but is slightly over-segmented. From Fig. 8, it is observed that the metastasis present in the liver ultrasound image has weak contrast with the normal region of the liver, and hence it becomes difficult to extract the exact boundary of the hemangioma. Also, the size of the metastasis in the image is too small compared to the overall size of the ultrasound image. When this image with weak contrast between the normal and abnormal region is processed by different segmentation methods, it is observed that the segmentation of the metastasis by MAP-MRF is not proper and it is under-segmented, whereas segmentation by the CV-ACM and RSFE methods is very close to the manual segmentation of the lesion but is somewhat over-segmented. Segmentation by the proposed method is observed to be very close to the manually segmented metastasis lesion and is the best among all the segmentation methods discussed.

Performance of the four segmentation methods implemented on the methods on all the 15 ultrasound images is analyzed blindly by the experienced radiologist. The radiologist opined that out of the total of 15 cases, the proposed method gives the best segmentation for the total of 11 cases as compared to the MAP-MRF, CV active contour, and RSFE methods which gives the best segmentation for the total of 0, 2, and 1 case, respectively. The proposed method is not able to perform best for the four cases but according to the radiologist segmentation by the proposed method is second best for the two cases. For the third case, the proposed method does not perform well at all whereas for the fourth case the radiologist opined that no segmentation method is able to segment the lesion properly.

Quantitative performances of the four segmentation methods are tabulated in Tables 4 and 5. Table 4 shows the average accuracy along with the standard deviation of the accuracies for the different lesion types obtained by all the four methods on all the 15 ultrasound images categorized as HCC, cyst, hemangioma, and metastasis. Overall average accuracy of the four methods is also tabulated in Table 4. Table 5 shows the average computational time taken by the segmentation methods for segmentation. From Table 5, it is observed that for all the 4 categories, proposed method shows the best performance with average accuracy of 97.45, 98.78, 99.12, and 99.41% for HCC, cyst, hemangioma, and metastasis, respectively. Also, lowest standard deviations of 2.65, 0.43, 0.38, and 0.29 for HCC, cyst, hemangioma, and metastasis, respectively, show the consistency of the proposed method for segmenting the lesion from ultrasound images. From Table 4, it is also observed that the overall average accuracy for all the 4 categories together is the best for the proposed method. For the proposed method, the overall average accuracy obtained is 98.93% compared to 96.13%, 98.04%, and 74.07% obtained by the MAP-MRF, CV-ACM, and RSFE methods, respectively.

Table 4 Average and standard deviation of the accuracies for the different lesion types obtained by various segmentation techniques on data obtained from online resource for the four classes, i.e., HCC, cyst, hemangioma, and metastasis. In the table average and standard deviation, values are represented as “average (standard deviation)”
Table 5 Average of computational time taken by various segmentation techniques on data obtained from online resource for the four classes, i.e., HCC, cyst, hemangioma, and metastasis

From Table 5, it is observed that the computational time taken by the proposed method for segmenting HCC, cyst, hemangioma, and metastasis are 4.98s, 4.97s, 4.96s, and 4.98 s, respectively, which is the second best after computational time taken by the RSFE method ( 3.74 s for HCC, 3.76 s for cyst, 3.78 s for hemangioma, 3.73 s for metastasis). Since overall accuracy of the RSFE method is 74.07% which is very less as compared to the proposed method (98.93%), therefore quantitatively, the proposed method can be considered as the best method to segment the lesions from the liver ultrasound images that are available online. Thus, qualitatively as well as quantitatively, the proposed method proves to be the best both qualitatively as well as quantitatively.

Discussion

The radiologist opined that as compared to the MAP-MRF, CV active contour, and RSFE methods, the proposed method gives better segmentation results. Out the total of 56 cases used for the present study, the proposed method gives the best segmentation for 46 cases as compared to MAP-MRF, CV active contour, and RSFE methods which gives the best segmentation for the total of 0, 4, and 4 cases, respectively. The proposed method is not able to perform best for 10 cases but according to the radiologist segmentation by the proposed method is second best for the 7 cases. Out of the remaining three cases, the radiologist opined that for two cases no segmentation method is able to segment the lesion properly. These two cases consist of metastasis and cyst, respectively, and proper boundary of the lesion is not visible clearly and is highly distorted in the ultrasound images. For the third case, the radiologist opined that the proposed method does not perform well at all. This case consists of hemangioma which is very close to the blood vessel. Due to the similarity in the echogenicity of the hemangioma and blood vessel, the proposed method segments the hemangioma along with the blood vessel and hence the radiologist rejects the segmentation obtained by the proposed method for the third case.

Table 6 shows the average and standard deviation of the accuracies obtained by the MAP-MRF, CV-ACM, RSFE, and proposed methods for segmenting the full dataset consisting of liver ultrasound images acquired from PGIMER, Chandigarh, and liver ultrasound image downloaded from online resources. From Table 6, it is observed that the overall performance of the proposed method is the best, having a segmentation accuracy of 99.32% as compared to 85.9, 98.71, and 68.21% obtained by the MAP-MRF, CV-ACM, and RSFE methods, respectively. Also, lowest standard deviation of 0.66 in accuracy is obtained by the proposed method over standard deviation of 25.19, 1.73, and 34.39 in accuracies obtained by the MAP-MRF, CV-ACM, and RSFE methods, respectively, shows that the proposed method is consistent in segmenting the lesion from liver ultrasound images.

Table 6 Average and standard deviation of accuracy obtained, and average of computational time taken by various segmentation techniques on the whole data for the four classes, i.e., HCC, cyst, hemangioma, and metastasis. In the table average and standard deviation of accuracies are represented as “average (standard deviation)”

Table 6 also tabulates the average computational time taken by the MAP-MRF, CV-ACM, RSFE, and proposed methods for segmenting the full dataset detailed in sub-section “​Dataset”. From Table 6, it is observed that overall average computational time taken by the proposed method is 5.05 s which is too less as compared to average computational times of 26.44s, 24.82s, and 28.36 s taken by the MAP-MRF, CV-ACM, and RSFE methods. High segmentation accuracy and low computation time taken by the proposed method for segmentation shows its potential in real-time application.

Conclusion

In this paper, region-difference filters are proposed for the segmentation of the focal liver lesion from liver ultrasound images. The proposed method is tested on the dataset of 56 liver ultrasound images containing FLLs and is compared with three methods viz. the MAP-MRF, CV-ACM, and RSFE methods. Qualitative analysis of the proposed method is done by the radiologist, which opined that the proposed method is able to perform best in 46 cases. Out of the remaining 10 cases, the proposed method is the second best method for 7 cases whereas for 3 cases compared to other three methods the proposed method does not perform well. These three cases consist of metastasis, cyst, and hemangioma, respectively. For the metastasis and cyst case, proper boundary of the lesion is not visible clearly and is highly distorted in the ultrasound images. Due to this, segmentation methods are not able to segment the lesions properly. For the hemangioma case, the lesion lies very near to the blood vessel and due to the similarity in the texture of the hemangioma and blood vessel, the lesion get segmented by the proposed method along with the blood vessel.

Quantitative analysis of the proposed method shows that the proposed segmentation method is able to segment liver ultrasound images with the overall accuracy of 99.32% in comparison to the overall accuracy of 85.9, 98.71, and 68.21% obtained by the MAP-MRF, CV-ACM, and RSFE methods, respectively. Computational time taken by the proposed method is 5.05 s which is very less as compared to the computational time of 26.44s, 24.82s, and 28.36 s taken by the MAP-MRF, CV-ACM, and RSFE methods, respectively. The proposed method is able to segment low-resolution images with 98.93% accuracy as compared to the accuracy of 96.13%, 98.04%, and 74.07% obtained by the MAP-MRF, CV-ACM, and RSFE methods, respectively. Less computational time taken by the proposed method shows its potential in real-time applications. It is also noticed that the proposed segmentation method segments perfectly if the threshold value for converting maximum difference image into binary image is selected properly. For the dataset on which the proposed method is tested, threshold value of 15 works well, but for other images obtained by different machines, threshold value may vary. The proposed method is tested on only liver ultrasound image, but it is believed that the method has the potential to segment lesion from ultrasound images of any body organ and from images obtained from other imaging modalities.