Statistical unit root test for edge detection in ... - Semantic Scholar

2 downloads 0 Views 3MB Size Report
Aug 19, 2013 - roots based on the Dickey–Fuller statistical test of stationarity. The existence of the unit root ...... The expert segmentation contour (yellow) is acquired by clicking points .... Prentice-Hall, New Jersey (2002). 16. R. N. Czerwinski ...
Statistical unit root test for edge detection in ultrasound images of vessels and cysts Mehdi Moradi S. Sara Mahdavi Julian Guerrero Robert Rohling Septimiu E. Salcudean

Journal of Electronic Imaging 22(3), 033013 (Jul–Sep 2013)

Statistical unit root test for edge detection in ultrasound images of vessels and cysts Mehdi Moradi S. Sara Mahdavi Julian Guerrero Robert Rohling Septimiu E. Salcudean University of British Columbia Department of Electrical and Computer Engineering Vancouver V6T 1Z4, Canada E-mail: [email protected]

Abstract. A new approach is proposed for edge detection in ultrasound. The technique examines the image intensity profile for unit roots based on the Dickey–Fuller statistical test of stationarity. The existence of the unit root is a sign of nonstationarity and a possible edge. A simple algorithm to build a segmentation method based on this edge detection approach is also proposed, which is capable of delineating the perimeter of hollow structures such as blood vessels and cysts. In this approach, the radial edge profiles originating from the center of the object of interest are scanned for the change from stationary to nonstationary status. The algorithm treats the radial intensity profiles as a time series and uses the Dickey–Fuller statistical test along the radii to find the location at which the profile becomes nonstationary. A priori criteria for edge continuity, shape, and size of the object of interest are applied to enhance the stability of the algorithm. The accuracy is demonstrated on simulated ultrasound. Further, the method is examined on two different image sets of blood vessels and validated based on contours marked by experts. The worst case distance from expert contours is 1.8  0.3 mm. The average area difference between the expert and the extracted contours is ∼6% and ∼4% of the vessel area in the two datasets. The proposed segmentation method is also compared to segmentation using active contours on ultrasound images of breast and ovarian cysts and shown to be accurate and stable. © 2013 SPIE and IS&T [DOI: 10.1117/1.JEI.22.3.033013]

1 Introduction Ultrasound provides a noninvasive, inexpensive, and nonionizing medical imaging modality, suitable for a vast range of applications from diagnostic examinations to computerassisted interventions.1 Accurate and reliable segmentation of ultrasound images is a critical step in many applications. Examples include volume study of cancerous tumors, detection of cardiovascular complications such as thrombosis, characterization and grading of cysts and tumors, and planning of radiotherapy procedures such as brachytherapy. Therefore, researchers have worked on various segmentation approaches, including texture operators,2 spectral clustering,3 active contours,4,5 a combination of intensity, texture, Paper 13103 received Mar. 1, 2013; revised manuscript received Jul. 8, 2013; accepted for publication Jul. 11, 2013; published online Aug. 19, 2013. 0091-3286/2013/$25.00 © 2013 SPIE and IS&T

Journal of Electronic Imaging

and domain knowledge,6 statistical shape models,7 and gradient-based edge detection by Kalman filtering,8 to segment ultrasound images. There is also a wide range of statistical approaches to ultrasound image segmentation based on the assumption that image pixels are uncorrelated9,10,11 or partly correlated.12 See Refs. 1 and 13 for detailed surveys. Edge detection is an important component of many segmentation techniques. Certain properties of ultrasound images pose challenges for edge detection algorithms. In addition to occasional shadowing and the dependence of edge strength on the relative orientation of the beam to the reflector, ultrasound images contain speckle that is a result of the interactions of the coherent high-frequency mechanical waves with small scatterers. Gradient-based edge detectors use derivative operators such as the Prewitt and Sobel and threshold the local maxima of the image gradient.14,15 In the case of ultrasound, these operators produce numerous local edges caused by the speckle pattern when used at a small scale and incomplete detection when used at a larger scale. Other solutions have been sought by investigators to address edge detection specifically in ultrasound images.16–22 Despite success in some applications, issues of accuracy, sensitivity, and computational speed remain open problems. Some of our previous research efforts were dedicated to using a priori shapes to improve ultrasound segmentation.23,24 For example, an elliptical model is assumed for the object, gradient-based candidate edge points are extracted along radii originating from a point at the center of the object, and the estimate is recursively improved using a modified Kalman filter. A significant improvement to such segmentation approaches can be achieved by removing the need for derivative-based edge filters. The proposed approach in the current work is a step in that direction based on a statistical test of stationarity. The statistical properties of regions of ultrasound images are known to change depending on tissue type. For example, the interior of vessels has different properties than the lumen and the surrounding tissue. These properties vary with cell size and organization.25 The change in the statistical properties of the image intensity at the boundaries of an organ indicates that statistical methods can be used for edge detection. To characterize this change, we rely on the Dickey–Fuller

033013-1

Jul–Sep 2013/Vol. 22(3)

Moradi et al.: Statistical unit root test for edge detection in ultrasound images of vessels and cysts

(DF) test.26 The DF test, a very popular tool in econometric time-series studies, examines the null hypothesis of nonstationarity, which is equivalent to the existence of a unit root, against the hypothesis of stationarity for autoregressive (AR) processes. The change in the properties of the intensity profile from stationary to nonstationary can be due to the passage of the profile through an edge. The main advantage of this method of edge detection is its robustness to speckleinduced local artifacts, which we illustrate on simulated phantoms. To illustrate the practical utility of the method, we develop a simple segmentation method that takes advantage of this edge detector. We use a manually selected central point within the object of interest and search for the edge candidates in a range of distances from this seed point based on the DF edge detector. The edge point is determined as the pixel along the radius where the incremental edge profile “becomes” and “stays” nonstationary when further pixels are added. The radial intensity profiles are treated as time series and the DF statistical test is used along the radii to find the location at which the profile becomes nonstationary. This algorithm is stabilized by limiting the search range and the maximum possible deviation of the edge distance from the seed between two adjacent rays. It should be emphasized that this specific approach to segmentation is an example application of the proposed edge detection method that is particularly suitable for vessels and cysts. We report the results of several experiments as test applications for the developed segmentation approach. These include a clinical study in which we compare the results of our segmentation with the expert segmentations acquired on human vessel images. Preliminary results on limited data were previously reported in a conference presentation.27 The clinical motivation behind this work is that deep venous thrombosis (DVT) and atherosclerosis are diagnosed using segmented features in ultrasound images. In DVT, blood clots or thrombi are formed within the lower body deep veins. These thrombi may occlude venous flow or break off from the vessel wall and cause a possibly fatal pulmonary embolism. The diagnosis of this is through compression ultrasound examinations. In this test, the examiner applies gentle ultrasound transducer pressure while imaging a region. The imaged vein collapses unless there is a thrombus inside. Since early thrombi, which is the target of the compression test, and blood have similar echogenicity, it is often not possible to identify a thrombus from a single image. Therefore, several acquisitions and contouring in different compression levels are necessary. It has been shown that automatic image segmentation can help in standardization of the ultrasound examination for DVT diagnosis.23 Also carotid artery ultrasound examinations can be improved by automatic segmentation.8,28,29,30 Occlusive disease, such as atherosclerosis in the left and right common carotid arteries, is a major cause of stroke. Furthermore, we report segmentation of ovarian and breast cysts. Lesion segmentation is a step in computeraided diagnosis schemes targeting breast and ovarian cancer.6,31 Region-based segmentation methods, such as Snake deformation,32 region growing,33,34 split-and-merge,35 and morphological watershed transformation36 have been widely explored for segmenting breast ultrasound images. We provide a comparison of our proposed method with an Journal of Electronic Imaging

active contour algorithm on these breast and ovarian cyst images to show that the proposed edge detection algorithm provides accurate results. In this paper, Sec. 2 discusses the basics of the statistical test used for edge detection and the resulting segmentation algorithm, and also describes the data and methods used for validation. Section 3 provides the results of the validation tests on phantom and vessel images. Section 4 provides our discussions on parameters of the method and comparison of its performance with active contours on a set of ovarian and breast cyst images. Section 5 gives the conclusions and recommendations for future work. 2 Methods 2.1 DF Statistical Test Our methodology is designed to find the edges by scanning the image in search for stable changes in the statistics of pixel intensities. In general, ultrasound images exhibit significant spatial correlation due to the large point spread function of the imaging system. In the literature, authors have applied various mathematical models for the intensity distribution of homogeneous tissues in a ultrasound image, most notably Rayleigh distribution. Nevertheless, for the purpose of segmenting vessels and cysts and other objects with a relatively hypoechoic interior, high orders of correlation are insignificant. In fact, we used the partial autocorrelation function (PACF)37 of the image intensity profiles to show that the lag value h ¼ 1 is sufficient for describing the dependencies within the hypoechoic interior of these hollow objects (see the first paragraph in Sec. 3). Therefore, we describe the proposed statistical test for time series that can be modeled with a first-order AR [AR(1)] model. The augmented version of the DF test, described in Refs. 38 and 39, can be used for more complicated models for which the AR(1) assumption is not valid. An AR(1) time series, I, can be modeled as I½t ¼ ρI½t − 1 þ e½t;

(1)

where ρ is a real number and e is a sequence of independent normal variables with mean 0 and variance σ 2 . I is stationary if jρj < 1. If a unit root exists (jρj ¼ 1), then the variance of I is tσ 2 , and therefore I is nonstationary. In many economics applications, the existence of the unit root, which is an indication of a “shock” in the trend-stationary time series, is important for modeling and forecasting the future observations. Dickey and Fuller26 provided a statistical method to test an AR model for the null hypothesis of the existence of a unit root. Note that one can write ΔI½t ¼ I½t − I½t − 1 ¼ ðρ − 1ÞI½t − 1 þ e½t ¼ γI½t − 1 þ e½t;

(2)

where γ ¼ ρ − 1. The DF test is formulated for γ as follows: H 0 ∶ γ ¼ 0;

(3)

H 1 ∶ γ < 0:

(4)

Dickey and Fuller provide a nonstandard statistic τ, which depends on the number of observations, and provide tables of critical values for it. In other words, based on the calculated

033013-2

Jul–Sep 2013/Vol. 22(3)

Moradi et al.: Statistical unit root test for edge detection in ultrasound images of vessels and cysts

value of τ, they provide the significance level at which the null hypothesis above can be rejected. The implementation of the test involves estimating the value of γ. If the estimated value is γ^ , the DF test statistic is26 τ¼

γ^ − 1 ; SEð^γ Þ

(5)

where SE is standard error (which is standard deviation divided by the square root of number of samples). The null hypothesis is rejected when the test statistic is a large negative number. Numerically, one needs to calculate the value of the test statistic, τ, refer to the DF table, and determine the significance level at which nonstationarity can be rejected. For example, the 5% critical value is −1.65. We have implemented the test in MATLAB. The ordinary least squares estimation of the AR(1) parameters is performed using MATLAB Statistics Toolbox. The DF statistic and the tables are imported from the implementation reported in Ref. 40, which is publicly available through the MATLAB Central code exchange website.

Fig. 1 The stationarity of the radial profiles is examined within a predetermined distance range from the seed point.

(3) j ¼ 1 (4) While j < ext •

2.2 Edge Detection Based on the DF Test Although the proposed edge detection method explained here can be applied to intensity profiles in an arbitrary direction, for the purpose of vessel segmentation, we search for edges along the radial intensity profiles starting from a seed point ðx0 ; y0 Þ within the object of interest. Each radial intensity profile is considered as a time series. We use the notation I k to represent the k’th radial profile starting from the seed point, at angle θk with the horizontal direction. The search for the edge is limited to a range of distances from the seed point characterized by rmin and rmax . If the pixel size is δr , then I k ≔ fI k ½0; I k ½δr ; I k ½2δr ; : : : ; I k ½rmax g. If one traces the image in the radial direction, the intensity profiles tend to become nonstationary upon passing through an edge. See Fig. 1 for illustration of the method. If fI k ½0; I k ½δr ; : : : ; I k ½ði − 1Þ × δr g is stationary according to the DF test and fI k ½0; I k ½δr ; : : : ; I k ½i × δr g is nonstationary, it is likely that an edge exists at the distance i × δr from the seed point. This edge is accepted only if the continuation of testing along the edge profile to i þ ext returns a nonstationary result. In other words, fI k ½0; I k ½δr ; : : : ; I k ½ði þ 1Þ × δr g; : : : ; and fI k ½0;I k ½δr ;:::;I k ½ðiþextÞ×δr g should all satisfy the nonstationary condition. ext is one of the user-defined parameters of the algorithm set to ensure that minor local artifacts, such as speckle, do not affect the edge detection. The algorithm at angle θk is described below. Note that τsig is provided by the DF test and is the level of statistical significance at which the null hypothesis, existence of the unit root, can be rejected. T is a decision threshold for τsig , which is typically set to 0.95, which is a strong indication of nonstationarity. (1) i ¼ rmin ∕δr , τsig ¼ 0 (2) While τsig < T • • •

i¼iþ1 if i > rmax ∕δr then END (no edge) τsig ¼ DF significance level for fI k ½0; I k ½δr ; : : : ; I k ½i × δr g

Journal of Electronic Imaging

• •

τsig ¼ DF significance level for fI k ½0; I k ½δr ; : : : ; I k ½ði þ jÞ × δr g if τsig < T return to (2) j¼jþ1

(5) rke ¼ i × δr The algorithm above consists of two main loops; the first loop (step 2) checks for the stationarity status. If nonstationarity is detected, the algorithm enters the second loop (step 4) and checks for the persistence of the nonstationarity of the profile for ext additional pixels. Only if the profile stays nonstationary until i þ ext is an edge point returned at rke ¼ i × δr (step 5). 2.3 DF-Based Segmentation Approach The described edge detection method can be simply expanded to a segmentation approach as follows. We manually select a seed point within the vessel area ðx0 ; y0 Þ. We set the values of rmin and rmax based on a priori knowledge of the shapes in the database. This can be performed based on a circular model where one value for rmin and rmax is used for all θk , or an ellipsoid model, where the values rmin and rmax are drawn from an ellipse equation. In the current work we have used both models based on the problem at hand. Further, the algorithm above is repeated for rays θk − θk−1 ¼ Δθ deg apart. If rke is returned, [x ¼ x0 þ rke cosðθk Þ, y ¼ y0 − rke sinðθk Þ] is added to the list of edge points. Both x and y are rounded to the nearest integer. In other words, the step size along each radius is an increment of a fixed distance equivalent to δr or pixel size. The resulting position is quantized to select the pixel it lies within and is only considered if the pixel is a different pixel from the pixel in the previous step, otherwise the position is discarded. An additional restriction is applied to ensure stability of the algorithm: the change of the length of the edge radius in one step cannot exceed a predetermined value, Δre . The edge point is considered valid only if jrke − rk−1 e j < Δre . We will provide guidelines on the parameters and methods to choose their values in Sec. 4.

033013-3

Jul–Sep 2013/Vol. 22(3)

Moradi et al.: Statistical unit root test for edge detection in ultrasound images of vessels and cysts

2.4 Data and Evaluation Methods 2.4.1 Field II simulations Three sets of computer-generated phantoms were generated, using Field II (Ref. 41), to examine different aspects of the proposed methods. In all three sets, simulations were generated using 3.5 MHz as the center frequency. The speed of sound was set to 1540 m∕s, and data were compressed to show 60 dB of dynamic range.

Circular vessel simulations. The edge detection performance of the proposed method was first examined using the simulated ultrasound images of circular inclusions with different contrast levels against the background. A simulated phantom (2.5 cm width, 1 cm depth, 6 cm height) was created using the Field II simulator. This phantom consisted of 25,000 uniformly distributed scatterers and included three enclosures with different acoustic properties from the background. The amplitude of the scatterers had a Gaussian distribution with mean of zero and standard deviations of 0.3, 0.2, and 0.05 inside the circular enclosures and 0.5 in the background. Sixty-four active elements and 50 lines per image were used. The phantom and the template

used to produce it are illustrated in Fig. 2. The B-mode image size was 270 × 845 and the radius of the circular inclusion templates was equivalent to 98 pixels (10 mm) in the resulting B-mode image.

Ellipse vessel simulations. Depending on the amount of pressure applied during the DVT compression test, the vein could collapse and appear as an ellipse. Therefore, we used a set of elliptical phantom simulations to examine the performance of the method for noncircular qcontours. ffiffiffiffiffiffiffiffiffiffiffiffi The 2 vessel contour has an eccentricity value, e ¼ 1 − ba2 , where a and b are the lengths of the major and the minor radii of the ellipse. For the uncompressed vessel, e is close to 0 and for a heavily compressed vein e is close to 1. Four different ellipses with e ¼ ½0.0; 0.745; 0.866; 0.943 were used. Simulated images were of size 3 × 4 cm2 or 320 × 440 pixels. For tissue, 80,000 scatterers were randomly generated, and their amplitudes were randomly set with a normal distribution, with mean 0 and standard deviation of 1. The scatterer density within the interior of the vessels was set to 5% of the background. Artifact simulations. The ability of the segmentation method to reject edge-like artifacts depends, to a large extent, on the parameter ext. To test this, we also created Field II phantoms with an edge-like artifact included in them. The area within the artifact had a similar scatterer density to the background (1700 scatterers per cm3 ); however the amplitude of the scatterers had a Gaussian distribution with standard deviation of 0.31 for the background and 0.71 for the artifact. Four phantoms were created with artifact thicknesses of 1%, 2%, 3%, and 4% of the entire height of the image. Figure 3 illustrates the templates and the resulting Field II simulations for this set of phantoms. These phantoms are used in our analysis of the effect of parameter ext in Sec. 4.

Fig. 2 Field II simulated circular inclusion phantom with the original template. Note that the direction of ultrasound propagation matched the horizontal direction of this figure.

2.4.2 Human vessel data For validation, the performance of the method was evaluated on the human saphenous vein and artery images. Two sets of data were used for this purpose. Note that all these

Fig. 3 Artifact phantoms along with their templates.

Journal of Electronic Imaging

033013-4

Jul–Sep 2013/Vol. 22(3)

Moradi et al.: Statistical unit root test for edge detection in ultrasound images of vessels and cysts

images were obtained during clinical practice, not healthy volunteers.

Image set 1. The first set of images were used for extensive comparison with expert segmentations. Six different vessels were segmented in three different ultrasound images: one image with the jugular vein and the common carotid artery (560 × 472 pixels) and two images depicting the saphenous vein and artery (720 × 480 pixels). Three experts [one radiologist (Savvas Nicolaou) and two sonographers (Vicki Lessoway and Maureen Kennedy)] and an experienced graduate student segmented all images by tracing the contour using an image editing application. Two of the experts (V.L. and M.K.) segmented all images twice, resulting in six expert tracings per image. Image set 2. Three sets of 10 images each were collected along the length of the common femoral vein of three patients without applying compression. The vessels within these 30 images were manually segmented by an expert in ultrasound imaging who was trained for this purpose by a physician. The segmentation was carried out by selecting points along the radial profiles used in our proposed approach. 2.4.3 Evaluation measures The resulting contours were compared to the reference contours for evaluation. The reference contour in the case of phantom data was the original Field II template. For patient image set 1, the average of the six available expert contours was used as the reference. For patient image set 2, the available manual segmentation was used as the reference. To compare the automatic and reference contours, two quantitative measures were used: the difference between the area of the automatic contour and the reference contour, and the Hausdorff distance42 between the automatic and reference contour. It should be noted that the Hausdorff distance is a very conservative measure that captures the worst performance of the algorithm and results in high error values due to outliers. In many applications, such outliers can be modified with minimal user interaction. A less sensitive measure is the absolute area difference between the two contours, which we also report. 3 Results In order to determine if the radial intensity profiles can be modeled as AR(1) processes, we analyzed the PACF of the intensity profiles extracted from human vessel images. In the worst case image within both image sets, for 81% of the intensity profiles extracted from the vessel image,

the PACF function only had significant values at lag h ¼ 1, confirming the AR(1) assumption (p < 0.05). On average, when all intensity profiles from all images were considered, the AR(1) assumption was satisfied in 91% of the profiles. Therefore, the nonaugmented DF test could be used as described to determine the existence of a unit root in the intensity profiles. In our current implementation, we have devised a solution for the problem of local artifacts along rays that violate the AR(1) condition for that ray. The solution involves starting the segmentation from nine different seeds, automatically generated around the manually selected seed point, and averaging the resulting nine contours. 3.1 Segmentation of Circular Phantoms The segmentation of the circular phantoms described in Fig. 2 is presented in Fig. 4. The parameters used in the method were rmin ¼ 7 mm, rmax ¼ 13 mm, ext ¼ 1 mm, Δre ¼ 1.5 mm, Δθ ¼ 5 deg. One seed pixel within the circle was manually selected and was used along with eight immediate neighbors to get the nine contours. The results presented in Fig. 4 are the average of nine contours. It should be noted that due to the random placement of the scatterers in the templates, and also due to the beam thickness modeled in Field II, the resulting simulations are not perfect circles as opposed to the original templates. Nevertheless, besides the visual analysis of the results, one can consider the similarity of the detected contour with the reference template as a measure of success. For the three inclusions, the average Hausdorff distance between the automatic contour and the reference contour is 0.5  0.3 mm (an average of 5% of the radius of the template). The area difference is on average 2.1  0.6% of the area of the reference. This area difference includes the quantization error in computation of the area enclosed in the automatic contour. 3.2 Ellipse Phantoms The segmentation results for the ellipse simulations are depicted in Fig. 5. For this segmentation experiment, rmin and rmax were extracted from the radius of the template ellipse at the corresponding angle. Specifically, rmin ðθÞ ¼ rellipse ðθÞ − 3 and rmax ðθÞ ¼ rellipse ðθÞ þ 3 (units in mm). Other parameters were ext ¼ 1 mm, Δre ¼ 1.5 mm, Δθ ¼ 3 deg. Note that for the ellipse shapes, a smaller angle step size Δθ was used. Large values of Δθ resulted in undue smoothing of the shape in the sharp ends of the thinnest ellipse. The area difference and Hausdorff distance for the four phantoms are presented in Table 1. The average area difference for ellipses with e > 0 is 4.7% and the average Hausdorff distance is 0.8 mm.

Fig. 4 Phantom segmentation result with the proposed method.

Journal of Electronic Imaging

033013-5

Jul–Sep 2013/Vol. 22(3)

Moradi et al.: Statistical unit root test for edge detection in ultrasound images of vessels and cysts

Fig. 5 Segmentation of the simulated ellipse images (corresponding to ellipses 1 to 4 from left to right in Table 1).

Table 1 The area difference and the Hausdorff distance between the automatic and reference contours for the ellipse simulations.

Table 2 Manual versus automatic segmentation. Am (mm2 )

Aa (mm2 )

D am (mm)

Vessel 1

47.3  4.5

47.8  3.1

1.7  0.5 mm

0.4 mm

Vessel 2

24.5  4.6

29.6  2.8

1.8  0.4 mm

4.5%

0.7 mm

Vessel 3

71.9  4.9

76.0  3.3

1.5  0.4 mm

0.866

4.7%

0.8 mm

Vessel 4

65.3  5.3

59.1  3.5

1.4  0.3 mm

0.943

4.9%

0.8 mm

Vessel 5

86.4  6.7

82.7  4.9

1.6  0.2 mm

Vessel 6

71.2  2.8

71.2  2.9

1.3  0.3 mm

Eccentricity value

Area difference

Hausdorff distance

Ellipse 1

0

1.9%

Ellipse 2

0.745

Ellipse 3 Ellipse 4

3.3 Human Vessel Images 3.3.1 Image set 1 Table 2 presents the average of the area enclosed by the expert contours and also the area enclosed by the average automatic contour. As discussed earlier, the expert segmentations are variable. This is a challenge for the validation of the automatic segmentation. Nevertheless, in four of the vessel images (vessels 1,3,5,6), the area of the automatic segmentation result falls within the [mean  std] of the expert segmentation areas. In two images (vessels 2 and 4), the acquired area is slightly outside this range. The Hausdorff distances between the automatic contour and the expert contours are listed in Table 2. The mean is 1.6 mm and the worst result is 1.8 mm. The average area difference is 6% of the average expert area. Figure 6 illustrates the acquired automatic contours for the six vessel images. 3.3.2 Image set 2 Figure 7 presents samples of vessel images from set 2 along with the manual segmentations. The rays along which edge points were detected are also included to further demonstrate the methodology. The parameters were set to similar values used for image set 1. For this set, the average Hausdorff distance from the expert segmentation was 1.8  0.3 mm, and the average area difference between expert and automatic contour was 3.4  3.7 mm2 or ∼4%. The expert segmentation available for this set of images was acquired by an expert, clicking along the same rays used for edge detection. Therefore, the reported distance is between the detected edge points with no contour interpolation involved in the calculation. 4 Discussion Before discussing the result of our proposed method of segmentation, we provide the outcome of edge detection using standard edge detection methods on the circular phantoms. Journal of Electronic Imaging

Note: Aa , the vessel contour area based on automatic segmentations (averaged over nine seed points); Am , the average vessel area based on six expert segmentations; D am , Hausdorff distance between the automatic contour and the expert contours. In all six cases, r min ¼ 3 mm, r max ¼ 12 mm, Δθ ¼ 3 deg, ex t ¼ 1 mm, Δr e ¼ 1.5 mm.

As stated before, the radius of the reference template circle was 98 pixels. The edge detection algorithms were applied in the range of 80 to 130 pixels from the center point. The studied standard edge detectors were Prewitt, Sobel,15 and Canny edge detectors.14 All of these methods are gradient-based edge detectors with various approximations of the gradient of the image intensity function. It should be noted that all these three edge detectors are designed to find all possible edges in the image. Among these, Canny edge detector has the advantage of using two different thresholds to detect strong and weak edges and includes the weak edges in the output only if they are connected to strong edges. This method is therefore more likely to resist the noise. The results are presented in Fig. 8. Canny edge detector is applied with two different sets of threshold values. As the results suggest, even within the limited ring defined for edge detection, the gradient-based methods return many false edges. This shows the challenge in ultrasound segmentation even for these relatively simple simulated images. Note that gradient-based edge detection searches the edges globally. Therefore, a fair assessment of contouring performance of our method should be in comparison with a contouring algorithm, not an edge detector. In this section, we discuss the parameters of our method and provide a comparison to the common Snakes segmentation method. 4.1 Robustness of the Edge Detector The main shape-independent edge detection parameters in the proposed algorithm are ext and the decision threshold (T) used for rejecting the null hypothesis in the DF test.

033013-6

Jul–Sep 2013/Vol. 22(3)

Moradi et al.: Statistical unit root test for edge detection in ultrasound images of vessels and cysts

Fig. 6 Image set 1. Automatic segmentation of the human saphenous vein and artery in three different images. The vessels are successfully distinguished from each other. In all six cases, r min ¼ 3 mm and r max ¼ 12 mm.

The primary advantage of the proposed method of edge detection is the ability to use the parameter ext to set the level of resistance to possibly false edges. To illustrate this feature, we performed edge detection along axial rays within the artifact simulations described in Sec. 2 (Fig. 3). In each image, 15 lines normal to the artifact edge were used as edge profiles. The length of the edge profiles was 200 and we incrementally performed the DF test on the edge profiles starting with the time series formed as I½1∶50, and then I½1∶51; I½1∶52; : : : ; I½1∶200. Figure 9 demonstrates the average of the 15 edge profiles and the resulting sequence of τsig values for the four simulated images. For the first edge artifact image (first image from left), the simulation image hardly shows an edge and, as expected, the stationarity hypothesis is not rejected (τsig remains close to zero). For stronger edges in simulations 2 to 4, as the thickness of the edge artifact increases, τsig rises at the edge and remains high for increasing distances from the edge point. For the threshold value of meanðτsig Þ ¼ 0.5, the edge can be rejected in these four simulations if a minimum ext value of 0, 5, 19, and 44 is chosen, respectively, for simulation images from left to right. The ext parameter, along with the decision threshold, controls the sensitivity of the edge detection algorithm. The usefulness of this feature, however, depends on the resolution of the available images. In a low-resolution image, the value of Journal of Electronic Imaging

ext is limited by the size of the image and the presence of other anatomical features in the vicinity of the structure of interest. 4.2 Shape Parameters The three parameters that control the overall shape of the contour are rmin , rmax , and Δre . For the human vessel images, we extracted the edge contours with fixed values of rmin and rmax . However, as described in the case of the ellipse simulations, one can extract these parameters from an ellipse equation. This becomes a necessity in the case of segmenting blood vessels under the compression of the ultrasound probe, which is a step in the ultrasound examination for diagnosis of DVT. We noticed that the method is robust against increasing the rmax value. If a strong edge exists, the test will only run to rke þ ext. Therefore, the choice of a large value for rmax ensures that the right range is examined and will not increase the running time. In case of rmin , the lowest possible value is limited by the statistical nature of the DF test. The outcome of the DF test cannot be trusted if the number of samples in the time series is too small. In our implementation, the minimum possible rmin was set to 25 pixels (∼2.5 mm in the vessel images used in the study). The function of the parameter Δre is to avoid large deviations of the edge contour and provide edge smoothing in

033013-7

Jul–Sep 2013/Vol. 22(3)

Moradi et al.: Statistical unit root test for edge detection in ultrasound images of vessels and cysts

Fig. 7 Samples of image set 2. Vessel images (left) and segmentation outcomes (right, enlarged). The expert segmentation contour (yellow) is acquired by clicking points along the marked rays. The green contour demonstrates the automatic segmentation result.

cases where the edges are subject to very weak echoes. Δre should be set to a fraction of rmax − rmin . In the vessel images used in this study, we set this parameter to ðrmax − rmin Þ∕3. The angular resolution, Δθ, controls the level of detail in the edge contour. For images with sharp corners, smaller values of Δθ should be considered. In general, for the vessel images, due to the changing nature of anatomical features, we suggest a small value such as Δθ ¼ 3 deg. For phantoms, we examined values up to Δθ ¼ 10 deg without a significant loss in segmentation accuracy. The execution time of the algorithm is also primarily driven by the choice of Δθ and the size of the image. For Δθ ¼ 3 deg, rmin ¼ 80 and rmax ¼ 120 on a personal computer with 3 GB of RAM and a 2.8 GHz processor, the segmentation time was 0.7 s for the circular simulation images (Fig. 4).

4.3 Comparison with an Active Contour Method In order to further validate the proposed method for edge detection as a basis for accurate segmentation algorithms, we used the described methodology on images of cysts in Journal of Electronic Imaging

ultrasound images of breast and ovaries. The results were compared to the outcome of segmentation using the iterative active contour method (Snakes), as implemented by Hamarneh et al.43 The segmented structures, based on unit root edge detection, are depicted in Fig. 10. Single seed points (also illustrated) were manually selected by the user. In all cases, rmin ¼ 25 pixels and the only tuned parameter was rmax . The illustrated outcomes are averaged for nine initializations. The segmentation results for the same images using the Snakes algorithm are also provided in Fig. 10. To initialize the deformable contour, one needs to provide a starting contour. For Snakes results, we provided 10 starting contours, each consisting of at least five points, and averaged the results (obvious outliers caused by local minima were removed). The comparison of the contours acquired from the two methods showed that in both cases, the outcomes were accurate and DF contours were slightly closer to the manual contours. The segmentation error measured as the Hausdorff distance between the manual contours and DF contours was 7  3%, and the distance between the manual contours and Snakes contours was 9  3%.

033013-8

Jul–Sep 2013/Vol. 22(3)

Moradi et al.: Statistical unit root test for edge detection in ultrasound images of vessels and cysts

Fig. 8 Segmentation of simulated ultrasound images. Row 1: original images. Row 2: canny edge detection with threshold values of [0.16, 0.4]. Row 3: canny edge detection with threshold values of [0.24, 0.6]. Row 4: Sobel method. Row 5: Prewitt method.

100

100

100

100

200

200

200

200

Average test value

Average edge profile

300

200

400

300

200

400

300

200

400

300

80

80

80

80

60

60

60

60

40

40

40

40

20

20

20

20

50 100 150 y (pixels)

50 100 150

50 100 150

1

1

1

0.5

0.5

0.5

0.5

0 50 100 150 y (pixels)

0 50 100 150

400

50 100 150

1

0

200

0 50 100 150

50 100 150

Fig. 9 The effects of edge strength on the Dickey-Fuller (DF) statistics. Row 1: simulated ultrasound images each with an edge artifact. The edge strength increases from left to right. In each image, 15 lines normal to the edge are used as edge profiles (I). Only five are plotted. Row 2: the average intensities along the 15 lines. Row 3: the average τsig for the incremental DF test. Journal of Electronic Imaging

033013-9

Jul–Sep 2013/Vol. 22(3)

Moradi et al.: Statistical unit root test for edge detection in ultrasound images of vessels and cysts

Fig. 10 Examples of the comparison of the proposed segmentation method with Snakes on breast cyst images (rows 1 and 2) and ovarian cyst (rows 3 and 4). Column 1: the initialization contour only used for Snakes (formed by manually clicking on five points). Column 2: outcome of the Snakes algorithm after 122, 227, 95, and 125 iterations from top to bottom. Column 3: the segmentation outcome using the proposed method, which requires one seed point (illustrated with a star).

4.3.1 Initialization Both the proposed method and the Snakes algorithm require the user to set a number of parameters. With our proposed method, these include the decision threshold T, angular resolution Δθ, Δre , ext, rmin , and rmax . For Snakes, there are different weighting factors and thresholds that depend on the object shape and image intensity (13 different parameters are listed in one specific implementation43). The Snakes method also requires a starting contour. For the examples illustrated here, the initialization required selection of at least five points. By contrast, the initialization of the proposed approach requires the selection of only one starting seed point. 4.3.2 Speed In the absence of a ground truth, the iterative Snakes algorithm does not provide a built-in stopping criteria. Therefore, the user should decide on the number of iterations needed to segment the structure. A typical number of iterations required in the examples provided here was 100 (the exact number of iterations is provided in the captions of Fig. 10). One hundred iterations of the Snakes algorithm were completed in 20.6 s. On the same PC and with an Journal of Electronic Imaging

angular resolution of Δθ ¼ 3 deg, the segmentation of these cyst images with our proposed approach was completed in an average of 0.6 s. Since the presented result is the average of nine initializations, this number should be corrected to 5.4 s. 4.3.3 Stability The resulting contour in the proposed unit root approach can be improved by repeating the initialization process and averaging. This can safeguard the outcome against the possible outliers caused by strong local artifacts. However, possible outliers that need the intervention of the user, or safeguards such as averaging, are not specific to the unit root method. As we witnessed in our experiments, and as Hamarneh et al.43 noted in using the Snakes algorithm, “The user should also be ready to intervene by placing constrained (forced) points to assist the snake if it clings to erroneous edges. Choosing the weights and parameters of the snake model is an important and often tedious task.” As both Snakes and the unit root method are considered semi-automatic algorithms, the need for occasional intervention is understandable. However, we believe that given the simple initialization of the unit root test and its significantly higher speed, intervention and/or averaging are more practical using this approach.

033013-10

Jul–Sep 2013/Vol. 22(3)

Moradi et al.: Statistical unit root test for edge detection in ultrasound images of vessels and cysts

4.3.4 Scope of applications Our experience indicates that the criteria of statistical stationarity assumption within the structure of interest is valid in ultrasound images involving lesions and vessels that are either hollow (such as vessels) or show fully developed speckle with a different distribution from the background. One shortcoming of the proposed method is in areas of very weak echo overlapping with the edge of the artery/ lesion, effectively extending the hollow appearance of the vessel into the surrounding tissue. While the parameter ext is introduced to remedy these situations, if the area of the weak echo is large, the automatic contour could show an error. As a clinical example, many investigators have developed contouring methods for the prostate gland. We examined the utility of our proposed method in that clinical application and found that the method, when combined with a tapered ellipse shape model, can effectively contour the prostate gland in the central section of the gland where fully developed speckle and strong edges exist. However, at the apex of the prostate gland, we often confront situations in which echoes are weak and leaking of the edge contour is common. This shortcoming is not specific to the DF methodology and has been observed in our other work.44 The common approach for segmenting complex three-dimensional (3-D) shapes with the possibility of weak echoes in certain areas is to perform a two-dimensional (2-D) segmentation in the area of strongest edge, like the central gland in case of the prostate, and then to use that 2-D contour and prior knowledge of the 3-D shape informed partly by the local edges to build the 3-D model. We have used this approach in Refs. 44 and 45. As mentioned before, the proposed unit root edge detection approach has an excellent performance when the assumption of statistical stationarity within the structure of interest is valid. For optimal performance of the proposed segmentation algorithm, shape geometry should be modeled sufficiently. On the contrary, deformable contours are not limited by the shape models. This is the main advantage of the Snakes algorithm. We should emphasize that the proposed edge detection method can be a valuable tool within other segmentation frameworks that handle complex geometries. For example, active shape models (ASM)46 can be used for segmentation of ultrasound images. The ASM algorithm uses a statistical shape model fit to a specific problem, overlays the model on a new instance of the object, and improves it by looking for better candidates around the points suggested by the model as edge candidates. Gradient strength is normally used for finding these better candidates. The DF edge detector can replace or complement the gradient-based operators to improve the segmentation in the case of speckle-dominated ultrasound images. 5 Conclusion In this paper we proposed an edge detection algorithm that can be used for segmentation of medical ultrasound images. The algorithm takes advantage of the DF test, a popular statistical test in econometric studies, which examines the null hypothesis of existence of a unit root for an AR time series. The algorithm treats the radial intensity profiles as a time series and uses the DF statistical test along the radii to find the location at which the profile becomes nonstationary. Journal of Electronic Imaging

Based on this test, we developed an accurate algorithm for delineation of the borders of the vessels in clinical ultrasound images and also Field II simulated data. The method is fast and accurate as validated by comparison with expert delineation of the segmented structures. The main advantage of the method is its low sensitivity to local changes and speckle-related local maxima in the edge profile difference function. Our comparative study of the proposed segmentation method with Snakes showed that simple initialization, high speed, and stability are the advantages of the unit root algorithm. Both methods are found to be accurate. The main advantage of the Snakes algorithm is its ability to handle more complex geometries. However, the proposed edge detection approach can be used as a component in modelbased approaches, such as those described in Refs. 8, 23, and 47, to segment more complex contour shapes. These methods have been extended to 3-D shape segmentation, where a central 2-D contour is used for initialization. Acknowledgments The authors would like to thank Dr. Savvas Nicolaou, Dr. Vicki Lessoway, Dr. Maureen Kennedy, Dr. Bassam A. Masri, and Dr. James McEwen for help with the clinical study. References 1. J. A. Noble and D. Boukerroui, “Ultrasound image segmentation: a survey,” IEEE Trans. Med. Imag. 25(8), 987–1010 (2006). 2. W. Richard and C. Keen, “Automated texture-based segmentation of ultrasound images of the prostate,” Comput. Med. Imag. Graph. 20(3), 131–140 (1996). 3. N. Archip et al., “Ultrasound image segmentation using spectral clustering,” Ultrasound Med. Biol. 31(11), 1485–1497 (2005). 4. G. Hamarneh and T. Gustavsson, “Combining Snakes and active shape models for segmenting the human left ventricle in echocardiographic images,” in IEEE Comput. Cardiol., pp. 115–118 (2000). 5. H. M. Ladak et al., “Prostate boundary segmentation from 2D ultrasound images,” Med. Phys. 27(8), 1777–1788 (2000). 6. A. Madabhushi and D. N. Metaxas, “Combining low-, high-level and empirical domain knowledge for automated segmentation of ultrasonic breast lesions,” IEEE Trans. Med. Imag. 22(2), 155–169 (2003). 7. D. Shen, Y. Zhan, and C. Davatzikos, “Segmentation of prostate boundaries from ultrasound images using statistical shape model,” IEEE Trans. Med. Imag. 22(4), 539–551 (2003). 8. P. Abolmaesumi and M. R. Sirouspour, “An interacting multiple model probabilistic data association filter for cavity boundary extraction from ultrasound images,” IEEE Trans. Med. Imag. 23(6), 772–784 (2004). 9. M. Martin-Fernandez and C. Alberola-Lopez, “Maximum likelihood segmentation of ultrasound images with Rayleigh distribution,” Med. Image Anal. 9(6), 1–23 (2005). 10. C. Chesnaud, P. Refregier, and V. Boulet, “Statistical region Snakebased segmentation adapted to different physical noise models,” IEEE Trans. Pattern Anal. Mach. Intell. 21(11), 1145–1157 (1999). 11. A. Sarti et al., “Maximum likelihood segmentation of ultrasound images with Rayleigh distribution,” IEEE Trans. Ultrason., Ferroelectr., Freq. Control 52, 947–960 (2005). 12. G. Slabaugh et al., “Statistical region-based segmentation of ultrasound images,” Ultrasound Med. Biol. 35(5), 781–795 (2009). 13. V. Shrimali, R. S. Anand, and V. Kumar, “Current trends in segmentation of medical ultrasound B-mode images: a review,” IETE Technical Rev. 26(1), 8–17 (2009). 14. J. Canny, “A computational approach to edge detection,” IEEE Trans. Pattern Anal. Mach. Intell. PAMI-8(6), 679–698 (1986). 15. R. C. Gonzales and R. E. Woods, Digital Image Processing, 2nd ed., Prentice-Hall, New Jersey (2002). 16. R. N. Czerwinski, D. L. Jones, and W. D. O’Brien Jr., “Line and boundary detection in speckle images,” IEEE Trans. Image Process. 7(12), 1700–1714 (1998). 17. G. Slabaugh, G. Unal, and T. C. Chang, “Information-theoretic feature detection in ultrasound images,” in IEEE Engineering in Medicine and Biology, pp. 2638–2642 (2006). 18. S. D. Pathak et al., “Edge-guided boundary delineation in prostate ultrasound images,” IEEE Trans. Med. Imag. 19(12), 1211–1219 (2000).

033013-11

Jul–Sep 2013/Vol. 22(3)

Moradi et al.: Statistical unit root test for edge detection in ultrasound images of vessels and cysts 19. I. Wolf et al., “ROPES: a semiautomated segmentation method for accelerated analysis of three-dimensional echocardiographic data,” IEEE Trans. Med. Imag. 21(9), 1091–1104 (2002). 20. Y. Yu and S. T. Acton, “Edge detection in ultrasound imagery using the instantaneous coefficient of variation,” IEEE Trans. Image Process. 13(12), 1640–1655 (2004). 21. D. M. Herrington et al., “Semi-automated boundary detection for intravascular ultrasound,” in IEEE Computers in Cardiology, pp. 103–106, IEEE, Piscataway, NJ (1992). 22. J. H. Kaspersen, T. Lang, and F. Lindseth, “Wavelet-based edge detection in ultrasound images,” Ultrasound Med. Biol. 27(1), 88–99 (2001). 23. J. Guerrero et al., “Real-time vessel segmentation and tracking for ultrasound imaging applications,” IEEE Trans. Med. Imag. 26(8), 1079–1090 (2007). 24. S. S. Mahdavi et al., “Vibro-elastography for visualization of the prostate region,” Lec. Notes Comput. Sci. 5762, 339–347 (2009). 25. R. C. Waag, “A review of tissue characterization from ultrasonic scattering,” IEEE Trans. Biomed. Eng. BME-31(12), 884–893 (1984). 26. D. A. Dickey and W. A. Fuller, “Distribution of the estimators for autoregressive time series with a unit root,” J. Am. Stat. Assoc. 74(366), 427–431 (1979). 27. M. Moradi et al., “Preliminary results of an ultrasound segmentation method based on statistical unit-root test of b-scan radial intensity profiles,” in IEEE Ultrasonics Symp., pp. 1–4, IEEE, Piscataway, NJ (2009). 28. P. Abolmaesumi, M. R. Sirouspour, and S. E. Salcudean, “Real-time extraction of carotid artery contours from ultrasound images,” in IEEE Symp. on Computer-Based Medical Systems, pp. 181–186, IEEE, Piscataway, NJ (2000). 29. C. Chen et al., “Segmentation of arterial geometry from ultrasound images using balloon models,” in IEEE Int. Symp. on Biomedical Imaging, pp. 2988–2991, IEEE, Piscataway, NJ (2004). 30. F. Mao et al., “Segmentation of carotid artery in ultrasound images: method development and evaluation technique,” Med. Phys. 27(8), 1961–1970 (2000). 31. W. Gomez et al., “Computerized lesion segmentation of breast ultrasound based on marker-controlled watershed transformation,” Med. Phys. 37(1), 82–95 (2010). 32. C. M. Chen, H. H. Lu, and Y. C. Lin, “An early vision-based Snake model for ultrasound image segmentation,” Ultrasound Med. Biol. 26(2), 273–285 (2000).

Journal of Electronic Imaging

33. K. Horsch et al., “Automatic segmentation of breast lesions on ultrasound,” Med. Phys. 28(8), 1652–1659 (2001). 34. K. Drukker et al., “Computerized lesion detection on breast ultrasound,” Med. Phys. 29(7), 1438–1446 (2002). 35. J. Z. Cheng et al., “Cell-based two-region competition algorithm with a map framework for boundary delineation of a series of 2D ultrasound images,” Ultrasound Med. Biol. 33(10), 1640–1650 (2007). 36. Y. L. Huang and D. R. Chen, “Watershed segmentation for breast tumor in 2-D sonography,” Ultrasound Med. Biol. 30(5), 625–632 (2004). 37. R. H. Shumway and D. S. Stoffer, Time Series Analysis and Its Applications, Springer, Heidelberg, Germany (2006). 38. G. Elliott, T. J. Rothenberg, and J. H. Stock, “Efficient tests for an autoregressive unit root,” Econometrica 64(4), 813–836 (1996). 39. S. E. Said and D. A. Dickey, “Testing for unit roots in autoregressive moving average models of unknown order,” Biometrika 71(3), 599–607 (1984). 40. L. Kanzler, “A study of the efficiency of the foreign exchange market through analysis of ultra-high frequency data,” Ph.D. dissertation, Oxford University, Oxford, UK (1998). 41. J. A. Jensen, “Field: a program for simulating ultrasound systems,” in 10th NordicBaltic Conf. on Biomedical Imaging, Vol. 34, pp. 351–353 (1996). 42. G. Gerig, M. Jomier, and M. Chakos, “Valmet: a new validation tool for assessing and improving 3D object segmentation,” Lec. Notes Comput. Sci. 2208, 516–523 (2001). 43. G. Hamarneh, A. Chodorowski, and T. Gustavsson, “Active contour models: application to oral lesion detection in color images,” in IEEE Int. Conf. Systems, Man, and Cybernetics, pp. 2458–2463, IEEE, Piscataway, NJ (2000). 44. S. S. Mahdavi et al., “Semi-automatic segmentation for prostate interventions,” Med. Image Anal. 15(2), 226–237 (2011). 45. S. S. Mahdavi et al., “Fusion of ultrasound B-mode and vibro-elastography images for automatic 3-D segmentation of the prostate,” IEEE Trans. Med. Imag. 31(11), 2073–2082 (2012). 46. T. Cootes et al., “The use of active shape models for locating structures in medical images,” Image Vis. Comput. 12(6), 355–366 (1994). 47. S. S. Mahdavi et al., “Automatic prostate segmentation using fused ultrasound B-mode and elastography images,” Lec. Notes Comput. Sci. 6362, 76–83 (2010). Biographies and photographs of the authors are not available.

033013-12

Jul–Sep 2013/Vol. 22(3)