## 1.

## Introduction

Since their introduction by Kass ,^{1} active contours have become very popular for applications in image processing and computer vision. According to the representation of active contours, they can be generally classified into two categories, the explicit active contours^{1, 2, 3, 4, 5, 6} represented by point sets or B-splines and the implicit active contours^{7, 8, 9, 10, 11, 12, 13} represented by level set functions. The implicit active contours are superior to the explicit active contours in terms of automatically handling topological changes. Most active contours use the magnitude of the image gradient only in image segmentation. Recently, the directional information of the image gradient has been utilized by some explicit active contours^{3, 4, 5} to address the issue that the active contour may get confused in image segmentation and converge to the wrong edge when multiple edges with different directions are present near the object boundary. Although some literature^{11, 12} on implicit active contours has considered the importance of the gradient directional information, none of them emphasizes the above-mentioned issue. In this paper, based on the original geodesic active contour,^{9, 10} which is a typical implicit active contour, a novel active contour model called the directional geodesic active contour is proposed by incorporating the gradient directional information into the geodesic active contour model. Experiments show that the proposed active contour performs better than the geodesic active contour in image segmentation when multiple edges with different image gradient directions are present near the object boundary to confuse the active contour.

## 2.

## Geodesic Active Contour

Let
$I(x,y):\Omega \to {R}^{+}$
be a given gray-scale image. The geodesic active contour^{9, 10} as an evolving curve is denoted by
$C\left(t\right)$
and represented by the zero level set of a level set function
$\varphi (t,x,y)$
, i.e.,
$C\left(t\right)=\{(x,y)\mid \varphi (t,x,y)=0\}$
. The level set function
$\varphi $
is normally selected to be a signed distance function that is negative in the interior and positive in the exterior of the zero level set. The evolution of the geodesic active contour embedded in the level set function
$\varphi $
can be formulated by the following partial differential equation:

## Eq. 1

$$\frac{\partial \varphi}{\partial t}=g\left(I\right)\parallel \nabla \varphi \parallel [\mathrm{div}\left(\frac{\nabla \varphi}{\parallel \nabla \varphi \parallel}\right)+\nu ]+\nabla g\left(I\right)\bullet \nabla \varphi ,$$## 3.

## Directional Geodesic Active Contour

Since the geodesic active contour performs the object segmentation essentially by detecting the edges formed at the object boundary, the edge indicator function plays a very important role in the object segmentation. It is seen from Eq. ^{2} that the edge indicator function
$g$
is derived from the image gradient that consists of the gradient magnitude and the gradient direction. However, only the gradient magnitude is used in the function
$g$
and the gradient direction is discarded. The function
$g$
will be approximated to 0 at the edge location regardless of its corresponding gradient direction, and to 1 in other places. Therefore, it can only detect the presence of an edge but cannot discern the associated gradient direction of the edge. When multiple edges are present near the object boundary, the geodesic active contour that employs the function
$g$
may get confused about which is the right edge since all edges have a large gradient magnitude, and may be attracted by the wrong edges instead of the desired object boundary.

In order to prevent the geodesic active contour from being attracted by the wrong edges, we propose incorporating the image gradient direction in the edge indicator function. Here is how we distinguish a desired edge from other undesired edges. An edge is considered desired if its corresponding gradient direction is consistent with the gradient direction of the object edge, i.e., the angle between the two gradient directions is no more than $\pi \u22152$ . Otherwise, the edge will be considered undesired. Since the object edge is unknown at the beginning, in determining whether an edge is desired, we use the gradient direction of the level set function to replace the gradient direction of the object edge. We can do so because the zero level set of the level set function is generally initialized near the object boundary and will conform to the object boundary ultimately, and the object edge’s gradient direction will be either identical or opposite to the gradient direction of the level set function $\varphi $ when the zero level set superposes on the object boundary. Based on the above analysis, we propose a modified edge indicator function

## Eq. 3

$$k(I,\varphi )=\frac{1}{1+d(I,\varphi ){\parallel \nabla ({G}_{\sigma}\ast I)\parallel}^{2}},$$For the definition of the function $d$ , we choose the convention that the signed distance function for $\varphi $ is negative in the interior and positive in the exterior. When the object to be segmented is darker (i.e., has a lower gray value) than the surrounding background, the following function $d$ is used:

where $H\left(s\right)$ denotes the Heaviside function, which takes 1 if $s>0$ and 0 if $s<0$ . On the contrary, when the object is brighter than the surrounding background, the function $d$ is defined asThe above definitions of the function $d$ can indicate whether an edge is desired by measuring the angle between the gradient direction of the edge (denoted by ${\theta}_{\mathrm{E}}$ ) and the gradient direction of the level set function (denoted by ${\theta}_{\mathrm{L}}$ ). Based on Eq.^{4}, $d=1$ if $\mid {\theta}_{\mathrm{E}}-{\theta}_{\mathrm{L}}\mid <\pi \u22152$ (meaning that the edge is desired) and $d=0$ otherwise. Correspondingly, if we substitute the value of $d$ into Eq.

^{3}, the modified edge indicator function $k$ will be approximated to 0 at the location of the desired edge since $d=1$ and the gradient is large, and $k$ will have the value of 1 at those edge locations with undesired directions since $d=0$ . Note that the function $k$ is also approximated to 1 in flat areas due to the small gradient. Therefore, if we use the novel edge indicator function $k$ in the geodesic active contour model, the evolving curve will stop at the desired edge only.

Fig. 1
illustrates the difference between the traditional edge indicator function
$g$
and the modified edge indicator function
$k$
in 1-D format. It can be seen that all four edges are detected by the traditional edge indicator function
$g$
regardless of their directions, while only those two edges with the same gradient direction as the level set function are detected by the modified edge indicator function
$k$
formulated by Eqs. ^{3, 4}. Similarly, the modified edge indicator function
$k$
formulated by Eqs. ^{3, 5} only detects the two edges with opposite gradient direction to that of the level set function. Therefore, the modified edge indicator function can selectively detect the desired image edges.

By replacing the function
$g\left(I\right)$
in Eq. ^{1} with the function
$k(I,\varphi )$
, we can obtain a modified geodesic active contour model, referred to as the directional geodesic active contour, with the following evolution equation:

## Eq. 6

$$\frac{\partial \varphi}{\partial t}=k(I,\varphi )\parallel \nabla \varphi \parallel [\mathrm{div}\left(\frac{\nabla \varphi}{\parallel \nabla \varphi \parallel}\right)+\nu ]+\nabla k(I,\varphi )\bullet \nabla \varphi .$$## 4.

## Experimental Results

Experiments have been conducted on some synthetic and real images to compare the performance of the directional geodesic active contour with that of the traditional geodesic active contour. Here we present two experimental results tested on real
$240\times 240$
images. The upper row of Fig. 2
shows the segmentation of the femur computed tomography (CT) image by the traditional geodesic active contour and the directional geodesic active contour, respectively, under outward balloon force. In this experiment, since the object is brighter than the nearby background, we choose Eqs. ^{3, 5} to compute the edge indicator function
$k$
. The lower row of Fig. 2 shows the segmentation of the lung CT image by the two active contour models, respectively, under inward balloon force. Since the object is darker than the background in this image, Eqs. ^{3, 4} are used in computing the function
$k$
. It can be observed from Fig. 2 that in both images there exist some edges with undesired gradient directions near the true object boundary. In both cases, the traditional geodesic active contour is wrongly attracted by the edges with undesired gradient directions, while the directional geodesic active contour can move across the undesired edges and correctly conform to the desired boundaries.

## 5.

## Conclusion

Based on the geodesic active contour, we have proposed a directional geodesic active contour that can selectively detect the image edges with different image gradient directions. Experiments conducted on image segmentation show that the directional geodesic active contour is superior to the geodesic active contour when multiple edges with different image gradient directions are present near the object boundary to confuse the active contour.

## Acknowledgment

The authors would like to thank the anonymous reviewers for their valuable comments and suggestions.