# Self-crossing detection and location for parametric active contours.

**ABSTRACT** Active contours are very popular tools for video tracking and image segmentation. Parameterized contours are used due to their fast evolution and have become the method of choice in the Sobolev context. Unfortunately, these contours are not easily adaptable to topological changes, and they may sometimes develop undesirable loops, resulting in erroneous results. To solve such topological problems, one needs an algorithm for contour self-crossing detection. We propose a simple methodology via simple techniques from differential topology. The detection is accomplished by inspecting the total net change of a given contour's angle, without point sorting and plane sweeping. We discuss the efficient implementation of the algorithm. We also provide algorithms for locating crossings by angle considerations and by plotting the four-connected lines between the discrete contour points. The proposed algorithms can be added to any parametric active-contour model. We show examples of successful tracking in real-world video sequences by Sobolev active contours and the proposed algorithms and provide ideas for further research.

**0**Bookmarks

**·**

**134**Views

- [Show abstract] [Hide abstract]

**ABSTRACT:**Gallbladder function is routinely assessed using ultrasonographic (USG) examinations. In clinical practice, doctors very often analyse the gallbladder shape when diagnosing selected disorders, e.g. if there are turns or folds of the gallbladder, so extracting its shape from USG images using supporting software can simplify a diagnosis that is often difficult to make. The paper describes two active contour models: the edge-based model and the region-based model making use of a morphological approach, both designed for extracting the gallbladder shape from USG images. The active contour models were applied to USG images without lesions and to those showing specific disease units, namely, anatomical changes like folds and turns of the gallbladder as well as polyps and gallstones. This paper also presents modifications of the edge-based model, such as the method for removing self-crossings and loops or the method of dampening the inflation force which moves nodes if they approach the edge being determined. The user is also able to add a fragment of the approximated edge beyond which neither active contour model will move if this edge is incomplete in the USG image. The modifications of the edge-based model presented here allow more precise results to be obtained when extracting the shape of the gallbladder from USG images than if the morphological model is used.Computers in biology and medicine 12/2013; 43(12):2238-55. · 1.27 Impact Factor - [Show abstract] [Hide abstract]

**ABSTRACT:**Curve evolution schemes for image segmentation based on a region based contour model allowing for junctions, vector-valued images and topology changes are introduced. Together with an a posteriori denoising in the segmented homogeneous regions this leads to a fast and efficient method for image segmentation and restoration. An uneven spread of mesh points is avoided by using the tangential degrees of freedom. Several numerical simulations on artificial test problems and on real images illustrate the performance of the method.SIAM Journal on Imaging Sciences 08/2013; 7(2014-07-03-3). · 2.87 Impact Factor - SourceAvailable from: Yuanquan Wang[Show abstract] [Hide abstract]

**ABSTRACT:**Gradient vector flow (GVF) is an effective external force for active contours; however, it suffers from heavy computation load. The virtual electric field (VEF) model, which can be implemented in real time using fast Fourier transform (FFT), has been proposed later as a remedy for the GVF model. In this work, we present an extension of the VEF model, which is referred to as CONvolutional Virtual Electric Field, CONVEF for short. This proposed CONVEF model takes the VEF model as a convolution operation and employs a modified distance in the convolution kernel. The CONVEF model is also closely related to the vector field convolution (VFC) model. Compared with the GVF, VEF and VFC models, the CONVEF model possesses not only some desirable properties of these models, such as enlarged capture range, u-shape concavity convergence, subject contour convergence and initialization insensitivity, but also some other interesting properties such as G-shape concavity convergence, neighboring objects separation, and noise suppression and simultaneously weak edge preserving. Meanwhile, the CONVEF model can also be implemented in real-time by using FFT. Experimental results illustrate these advantages of the CONVEF model on both synthetic and natural images.PLoS ONE 10/2014; 9(10):e110032. · 3.53 Impact Factor

Page 1

TRANSACTIONS ON IMAGE PROCESSING1

Self-Crossing Detection and Location for Parametric Active Contours

Arie Nakhmani Allen Tannenbaum

Abstract

Active contours are a very popular tool for video tracking and image segmentation. Parameterized contours are

used due to their fast evolution and have become the method of choice in the Sobolev context. Unfortunately, these

contours are not easily adaptable to topological changes, and they sometimes may develop undesirable loops, resulting

in erroneous results. To solve such topological problems, one needs an algorithm for contour self-crossing detection.

We propose a simple methodology via simple techniques from differential topology. The detection is accomplished by

inspecting the total net change of a given contour’s angle, without point sorting and plane sweeping. We discuss the

efficient implementation of the algorithm. We also provide algorithms for locating crossings by angle considerations

and by plotting the 4-connected lines between the discrete contour points. The proposed algorithms can be added

to any parametric active contour model. We show examples of successful tracking in real world video sequences by

Sobolev active contours and the proposed algorithms, and provide ideas for further research.

I. INTRODUCTION

Active contours (snakes) are widely used in segmentation and tracking. The development of this field began with

the seminal paper by Kass et al. [1]. Snakes have applications in various fields from medical imaging to surveillance.

The purpose of snakes is to define an object’s outline in the tested image, by minimizing an energy associated with

different object properties (e.g., average intensity value), and intrinsic curve properties (e.g., smoothness).

Parametric snakes are given as curves that explicitly provide the (x,y) coordinates of the given points on the

given contour (these are called snaxels). The advantage of such a parametrization is in the fast evolution of the

snake, and in fact have dominated the tracking literature [2]. The problem that occurs with parametric snakes,

especially when used to segment noisy images, is the development of false loops (see Figure 1 C-E). If the snakes

are region based (e.g., [3], [4]), then these loops can cause a divergence of the snake, since they change the normal

direction and thus the inside and outside of the closed contour. In other cases, the false loops may catch irrelevant

features for tracking. This brings us to the importance of the contour self-crossing detection and of the consequent

topological changes (loop elimination, or snake splitting).

Copyright (c) 2010 IEEE. Personal use of this material is permitted. However, permission to use this material for any other purposes must

be obtained from the IEEE by sending a request to pubs-permissions@ieee.org.

This work was supported in part by grants from AFOSR, ARO, as well as by a grant from NIH (NAC P41 RR-13218) through Brigham and

Women’s Hospital. This work is part of the National Alliance for Medical Image Computing (NAMIC), funded by the National Institutes of

Health through the NIH Roadmap for Medical Research, Grant U54 EB005149. Information on the National Centers for Biomedical Computing

can be obtained from http://nihroadmap.nih.gov/bioinformatics.

A. Nakhmani was with Electrical Engineering Department, Technion, Israel, and currently with Electrical and Computer Engineering, Boston

University, Boston, MA 02115; email: anry@bu.edu

A. Tannenbaum is with Electrical and Computer and Biomedical Engineering, Boston University, Boston, MA 02115; email: tannenba@bu.edu

February 11, 2012DRAFT

Page 2

TRANSACTIONS ON IMAGE PROCESSING2

Currently, there are five main approaches to tackle the problem of self-crossing. First, level sets is perhaps the most

popular approach. The curve is defined by zero level set of the graph of surface, usually starting with the distance

function; see [5], [3] and the references therein. With level sets, the topological changes are automatically managed,

and the problem of self-crossing does not occur. In general, the snake evolution in the level sets framework is slower

than the evolution of parametric snake models. Moreover, automatic topological changes may be less appropriate

for tracking, where a single target may be unintentionally split, or two distinct targets merged.

A second popular class of approaches for detection and location of the crossing points is based on the classical

Bentley-Ottmann line segment intersection algorithm in computational geometry. These approaches are reviewed

in [6, Ch.2] and [7]. The general idea of this type of techniques is to sort the snake’s points by x coordinate in

ascending order, and to employ the plane sweep algorithm to detect the overlapping x and y projections of the

segment pairs. The actual crossing is tested only if both x and y projections overlap. These algorithms are fast and

efficient, but not simple to implement, partly due to the need of checking various special cases.

The third approach is grid-based [8], [9], [10], [11]. For easy collision and crossing detection, the motion of snake

points can be restricted to the edges of the grid, as in Bischoff and Kobbelt [10], or one can inspect the crossings

with constant rectangular grid [9] or simplicial cell decomposition [8], [11]. Unfortunately, these algorithms are not

always able to detect all the crossings, because of the discretization of the snaxel locations or the restrictions.

The next approach is perhaps the simplest. The idea is to complete the lines with additional points computed

from linear interpolation between the snaxels, i.e., to complete the segments between the end-points, and to make

the snake segments connected (continuous) on the given discrete grid [12]. Then all the points are plotted on a

two-dimensional counter raster (matrix), where the crossing is detected and located if the points are plotted more

than once to the same raster location. The obvious problems with this method are explained in Smith and Schaub

[7]. The method cannot provide sub-pixel accuracy in crossing location, because of the discretization of snaxel

locations. In addition, by the nature of the interpolation algorithm, false positive and false negative detections may

frequently occur (Figure 4). The proposal to use double width lines makes the problem of false positives much

worse, and the additional computational time for the direct checking of these pseudo-crossings virtually eliminates

all the advantages of the algorithm.

The last approach is based on an idea of Kass et al. [1]. Here one employs a “repulsion force,” which forces the

snaxels not to be too close to one another. This force can be incorporated into the energy minimization framework.

Ivins and Porrill [4] propose to compute the repulsion force from the tension, stiffness, and reversed pressure.

Unfortunately, introducing the new repulsion force will not always prevent crossings, and so an additional self-

crossing check may be needed. Also, introducing the repulsive force affects the snake dynamics and convergence

properties, which may not be desirable.

It is important to note that while self-crossing does not occur very frequently, nevertheless its appearance may

ruin the tracking of a target in a given scenario. Consequently, our goal is to effectively detect the existence of

self-crossing as quickly as possible, and when it exists, to locate the crossing points, and apply the appropriate

topological change to the snake (loop removing, or snake splitting). Since the problem of detection is simpler than

February 11, 2012DRAFT

Page 3

TRANSACTIONS ON IMAGE PROCESSING3

the simultaneous detection and location of the crossing (as in the approaches described above), this problem can

be solved more efficiently with regard to space usage and run time. We propose two algorithms: the first is for an

efficient self-crossing detection, and the second is for the computation of crossing locations.

The first algorithm should be run for each snake iteration, without actually computing the crossing segments and

crossing point. We base our idea on the Hopf turning number topological theorem [13, p.162], which states that

the total net angle change of a simple continuous closed curve (without self-crossings) can be 360◦for clockwise

curve (cw), and −360◦for counterclockwise (ccw) curve, as explained in Section II. The same is true for simple

polygons.

In Subsection II-B, we show that an explicit angle computation is unnecessary, and may be replaced by a

more efficient algorithm that counts the number of quadrants the curve has passed in turn. In Subsection II-C, we

investigate the rare cases when our detection algorithm may fail, and propose a possible solution.

The second algorithm solves the problem of crossing localization. We propose a particular line completion

algorithm for that purpose. In Section II-D, we describe our novel interpolation scheme. The proposed algorithm

provides 4-connected segments (each snake point has two neighbors, from the left, right, top or down), which totally

eliminates the false negatives without a significant increase in false positives. The crossing points are computed only

if a self-crossing is detected, (Subsections II-C-II-D). The self-crossing can be found by checking the appropriate

segments for crossing, which can be accomplished by solving certain simultaneous parametric equations [14], or

by testing on which side of the given segment lie the end-points of the second segment, as explained in the

Subsection II-D. In case of self-crossing, the snake can be split by a simple method described in Araki et al. [14]

or Stoeter and Papanikolopoulos [15] (see Subsection II-E).

We have successfully tested our approach on numerous real world videos. We have used region based Sobolev

snakes [16] with the Chan-Vese energy [3]. Representative results and the discussion are provided in Section III.

The last section of the present note, Section IV, summarizes our work and proposes possible further research.

II. SELF-CROSSING DETECTION

In this section, we propose an easily implementable algorithm for detecting active contour self-crossing, based

on the concept of turning number.

Let α : R → R2be a regular closed curve. The turning number of α, Turn(α), is the total signed curvature of

α divided by 360◦[13, p.156]. It can be shown that for closed curves the number Turn(α) is an integer, and it is

equivalent to the topological rotation index [13, p.160]. Intuitively, Turn(α) is the number of full counterclockwise

(ccw) turns until the curve returns to the (arbitrarily) chosen initial point. If the turns are clockwise (cw), then

Turn(α) is negative. Similarly, the total curvature is the net change of unwrapped angle ∆ϕ (see Figure 1).

For convenience, we define the turning direction by:

dir(α) =

1,

if the curve is ccw

−1,

if the curve is cw

(1)

February 11, 2012DRAFT

Page 4

TRANSACTIONS ON IMAGE PROCESSING4

Fig. 1.Closed curves with the turning number and the total net change of the angle

Fig. 2.Snake coordinates and segments definition

We now state the key result due to Hopf [13, p.162]:

THEOREM 1: The turning number of a simple closed curve α (without self-crossings) equals to dir(α).

As we have mentioned earlier, this theorem can be restated in terms of the total net angle change of 360◦·dir(α).

In particular, this theorem is true for any simple closed polygon, as is typically given with the snake representation.

In the following subsection, we use this observation to formulate a straightforward algorithm for the detection of

crossings.

A. Crossing detection algorithm

Suppose the parametric snake is defined by its point coordinates: pi= (xi,yi) i = 1,...,n, where pn+1= p1.

The corresponding segment between piand pi+1is denoted by si(see Figure 2).

The unwrapped angle of the segment siis denoted by ϕi:

tan(ϕi) =yi+1− yi

xi+1− xi.

(2)

The angle is defined up to 360◦, and so one should note the meaning of the unwrapped angle: If the angle

difference between the consecutive segments is larger than 180◦, then multiples of +360◦or -360◦should be added

to ϕ. As a result, the angle ϕ can get any real value, and is not bounded by ±180◦.

February 11, 2012DRAFT

Page 5

TRANSACTIONS ON IMAGE PROCESSING5

The following algorithm allows one to check if self-crossings exist, without actual computing the crossing points.

The algorithm is based on Theorem 1 for polygons, and it should be run for each snake iteration.

ALGORITHM FOR SELF-CROSSING DETECTION

Input : snaxels pi

Computetheangle ϕ by(2)

if |ϕ(n) − ϕ(1) − 360◦· dir| > 180◦then

report that crossing is detected

Remarks:

• Only a single comparison of the first and the last segment angles is needed in our algorithm.

• The first segment is chosen arbitrary.

• No sorting procedure is required.

In most practical situations, the proposed algorithm robustly and efficiently detects the existence of self-crossings.

The special cases when this algorithm fails (even number of crossings with double twist, as in Figure 3, and equal

number of inward and outward loops, as in Figure 1 E) are explored in Section II-C, and a solution for these cases

is proposed.

The next subsection describes a more efficient version of the self-crossing detection algorithm.

B. Efficient detection

The next algorithm is based on the observation that any simple closed curve is topologically equivalent to a square.

Accordingly, the turning number may be computed by considering how many quadrants the curve has passed in

turn, or how many 90◦turns the curve performed along the way. If this number is not four, then the curve is not

simple. The increments in the number of quadrants may be computed by inspecting the signs of ∆yi= yi+1− yi

and ∆xi= xi+1− xi, as described below.

Let (+,+)(i) denote sign(∆xi)=+1 and sign(∆yi)=+1 , (+,−)(i) denote sign(∆xi)=+1 and sign(∆yi)=-1 ,

(−,+)(i) denote sign(∆xi)=-1 and sign(∆yi)=+1 , (−,−)(i) denote sign(∆xi)=-1 and sign(∆yi)=-1 .

The increment in the number of quadrants is summarized in the Table I.

The sign of 2 on the second diagonal (for a very sharp angle change) is computed by inspecting the slopes of

the consecutive segments siand si+1:

Slopei=

????

∆yi

∆xi+ ?

????,

(3)

where ? is a small number that is added to prevent the division by zero.

February 11, 2012 DRAFT

Page 6

TRANSACTIONS ON IMAGE PROCESSING6

(+,+)(i + 1) (+,−)(i + 1)(−,+)(i + 1)(−,−)(i + 1)

2, if Slopei> Slopei+1

-2, otherwise

(+,+)(i)

0

−11

(+,−)(i)

10

2, if Slopei< Slopei+1

-2, otherwise

−1

(−,+)(i)

−1

2, if Slopei< Slopei+1

-2, otherwise

01

(−,−)(i)

2, if Slopei> Slopei+1

-2, otherwise

1

−10

TABLE I

INCREMENT IN THE NUMBER OF QUADRANTS

All the values in the Table I (except the second diagonal) may be computed by the following formula:

∆q =

−0.5sign(∆yi∆xi+1)(|sign(∆xi+1) − sign(∆xi)|

+|sign(∆yi+1) − sign(∆yi)|)

(4)

Note that sign(∆yi∆xi+1) is mathematically equivalent to a binary XOR operation and can be efficiently

implemented.

We can now describe our algorithm:

EFFICIENT ALGORITHM FOR SELF-CROSSING DETECTION

Input : snaxels pi

q0← 0

For i = 1 to n

Compute ∆q by(4)

If |∆q| = 2 then

qi← qi−1+ sign(Slopei− Slopei+1)∆q

else

qi← qi−1+ ∆q

end

end

If qn?= 4 · dir then

report that crossing is detected

February 11, 2012DRAFT

Page 7

TRANSACTIONS ON IMAGE PROCESSING7

Fig. 3.Special case: The curve with double twisting

Remarks:

• The index i of the number of quadrants q and the values of q for different indexes will be used in the next

subsection, otherwise only the last value of q is of interest, thus only a single integer variable q can be used,

and minimal memory space requirements can be satisfied.

• In the worst case (zigzag curve), our algorithm needs n divisions and 3n additions (subtractions), but for

smooth enough curves, we need only comparisons, and 3n additions and subtractions. Our algorithm uses a

natural order of snaxels, without sorting. The algorithms for detection and localization described in [6, Ch.2]

need at least O(nlogn) operations, that is less time efficient, but they provide the location of crossing as well.

The run time of our algorithm is negligible with regard to the snake’s evolution time.

C. Special cases

As we stated earlier, for even number of self-crossings, if double twisting occurs (see Figures 3 and 1 E), our

algorithm will not find the crossing. The algorithm for detecting self-crossings in these cases is more computationally

demanding, but still can be accomplished by exploring the snake segment angles.

The test for self-crossing is based on the following important observations:

1) A given segment sicannot cross the segments si+1and si−1.

2) No curve can cross itself without turning more than 180◦first (cw or ccw). This is equivalent to passing through

(at least) three different quadrants. The necessary condition for the crossing of siand sjis |qj−qi| ≥ 3 (see

Subsection II-B).

3) If the segments siand sjhave not reached 180◦between them, then any segments between i and j cannot

cross.

4) If the segments siand sj cross each other, then they have the overlapping in the x coordinates ((xi,xi+1)

with (xj,xj+1) ), and as well as in the y coordinates ((yi,yi+1) with (yj,yj+1)).

5) Suppose that siand sjare the tested candidates for crossing each other. Then, if we remove these segments

and connect pito pj+1and pjto pi+1, we obtain two separated closed curves (see Figure 3). If there are no

self-crossings in the curve, and there are no crossings with the added segments, then the algorithm proposed

February 11, 2012DRAFT

Page 8

TRANSACTIONS ON IMAGE PROCESSING8

in Subsection II-A should return that the crossing is not detected for both curves. If there were even number

of self-crossings in the curve, as in all the special cases, then the algorithm in Subsection II-A should report

that one curve has self-crossings (by removing one crossing we convert the total number of crossings to odd).

All the angles of curves are available from the previous computation, therefore only the two angles of the

added segments should be computed in order to apply the algorithm. Similarly, we can connect pi+1to pj

and pj+1to pi, to obtain two separate closed curves, but without removing the segments. The result should

be the same, since by this snake separation process we have added one crossing, if the segments were crossed

before. Actually, the second kind of curve splitting is included to verify that there were no crossings with the

added segments.

All five tests (or relevant portions of them) can be used in the proposed order to rule out the segments that

cannot cross. All the proposed conditions are necessary, but not sufficient, thus the segment pairs that passed all

the proposed tests should be directly checked for crossing by solving simultaneous equations [14], or explicitly, for

the segments siand sj, if:

0 ≤

det

xi− xj

xj+1− xj

yi− yj

yj+1− yj

xj+1− xj

yj+1− yj

xi+1− xi

yi+1− yi

yi− yj

det

yj+1− yj

≤ 1and

0 ≤

det

xi− xj

xj+1− xj

xi+1− xi

yi+1− yi

xi+1− xi

yi+1− yi

det

≤ 1

(5)

then the segments are crossed.

It is important to note that if one does not halt the algorithm after the first crossing, then all the crossings may

be found in this manner. Another possibility for self-crossing localization, is to use the algorithm proposed in the

following subsection. This algorithm is simple and fast, but cannot achieve sub-pixel accuracy.

D. Computing the crossing point

In addition to the known methods for detection and computation of crossing points outlined in the Introduction,

and the method described in the previous subsection, we propose another approximate method which allows finding

the location of all the crossing points by 4-connected linear interpolation of the snake segments. The idea is to

connect the sequential but distant points of the given snake with additional points in-between, and if the added

points will fall on the same grid cell, then a crossing is located. All the points are registered in a two-dimensional

raster accumulator. Algorithms of simple linear interpolation (single and double width lines plotted on a raster) are

prone to false positives and false negatives, as is shown in Figure 4.

February 11, 2012DRAFT

Page 9

TRANSACTIONS ON IMAGE PROCESSING9

Fig. 4.

grid based algorithms.

The possibility of false positive (detected crossing where it does not exist) and false negative (actual crossing is not detected) with the

It is clear from Figure 4 that the reason for the false negative is the two crossing lines that are not 4-connected

(vertically or horizontally connected). Thus we propose a simple algorithm for 4-connected line interpolation between

the two given snake points.

ALGORITHM FOR 4-CONNECTED LINE INTERPOLATION

Input : roundedtotheclosestintegersegment

end − points(x1,y1)and(x2,y2)

if x1= x2 then draw a vertical line

else

Slope =

???y2−y1

x2−x1

???

r ← Slope

Repeat until the (x2,y2) point is reached

make [r] stepsin sign(y2− y1) y direction

(i.e., move1pointinsigned y direction)

make1stepin sign(x2− x1) x direction

r ← r − [r] + Slope

end

end

Remarks:

• The Slope has been already defined in (3) and computed via the efficient algorithm for self-crossing detection

(Subsection II-B).

February 11, 2012DRAFT

Page 10

TRANSACTIONS ON IMAGE PROCESSING 10

• The [r] denotes the closest to r integer.

• As simple as it seems, the problem of defining a 4-connected linear interpolation is not a well-defined problem,

because the solution is not necessarily unique. Our algorithm provides only one possible solution. In some

cases it adds false positives, but it detects all the crossings without false negatives. The false positives are

easily detected and removed [12].

E. Contour splitting and reordering

When a self-crossing is detected and located, the snake will generally go through a topological change (splitting

into two snakes, or removing the loop). Different methods for topological changes have been proposed earlier [8],

[9], [12], [15], [10], [11]. In our work we use the simplest splitting proposed by Araki et al. [14]. If the segments

si: pi→ pi+1and sj: pj→ pj+1are crossed, then we remove these segments, and add the segments between

pi→ pj+1and pj→pi+1(Figure 3). If some loops are removed, for example for single target tracking, the shortest

loops are eliminated, and the removed points are distributed in the most sparse regions of the remaining loop.

Additional cues about the loops that should be removed can also be extracted from the angle information. If we

suppose that the direction dir(α) does not change through tracking or segmentation, we can remove the loops with

the wrong direction.

III. RESULTS AND DISCUSSION

In this section, we show how the proposed algorithms improved the tracking with parametric Sobolev snakes [16]

with the Chan-Vese energy functional [3]. The snake was used to track a single target in video sequences with a

constant velocity dynamic model (current frame initialization contour is a translated version of the previous frame

result). The algorithms have been implemented in Matlab.

We have chosen two representative videos. The first is the well-known “Walking in Finland” sequence from

University of Oulu. This sequence consists of 22 frames, and is frequently used to test visual trackers. We run the

algorithm of Sobolev snake with the same parameters (λ = 1, step size dt = 1, 6 iterations per frame), with and

without the loop detection and elimination algorithms. The target is manually selected in the first frame. For the

following frames, the predicted in the previous frame result is used to initialize the snake. The results are shown

in Figure 5.

Without the proposed algorithm, in frame 3 the snake develops a loop, which prevents further convergence of

snake around the target. When the developing loop was detected via our self-crossing detection algorithm, it was

removed, and the tracking was successful.

The second sequence, “The Hand,” is filmed by infrared (IR) camera, and has 1050 frames. Again, only with the

self-crossing detection algorithm the Sobolev snake managed to track the hand in the entire sequence. The results

of tracking are shown in Figure 6.

The additional time to detect and remove the loops for all the tested sequences was less than 2%, compared to

the Sobolev snake algorithm running time.

February 11, 2012 DRAFT

Page 11

TRANSACTIONS ON IMAGE PROCESSING 11

Fig. 5.

The next frame prediction contour (blue), and the current final contour (magenta) are shown.

“Walking in Finland” sequence without (top row) and with (bottom row) the algorithm for self-crossing detection and loop elimination.

Fig. 6.

next frame prediction contour (blue), and the current final contour (magenta) are shown.

“The Hand” sequence without (top row) and with (bottom row) the algorithm for self-crossing detection and loop elimination. The

Some more experiments illustrating our methodology may be found on the website:

http://www.youtube.com/playlist?list=PL0E921BB9455C23B3. The failure scenarios for these

videos (without our algorithm) are shown in the top row of Figure 7, and the success scenarios (with the self-

crossing detection and elimination) are show at the bottom row of this figure.

IV. CONCLUSIONS AND FURTHER RESEARCH

We have proposed a fast and simple approach for snake self-crossing detection and localization. The algorithms

can be adapted to any type of parametric snakes, defined by snaxel coordinates, and do not restrict the snake’s

motion and evolution in any manner.

The proposed crossing point computation algorithm uses rounded integer values for snaxels, and is appropriate

in cases where no sub-pixel accuracy is needed. Its implementation is fast and efficient, with a low number of false

February 11, 2012DRAFT

Page 12

TRANSACTIONS ON IMAGE PROCESSING12

Fig. 7. “The Car” and “The Robot” sequences. (Top row) Frames after the loop’s creation; (Bottom row) The loops are detected and eliminated

by the proposed algorithm

positives (that can be easily rejected).

We have shown that the proposed algorithm can be used for tracking real world scenarios, and helps to prevent the

divergence of the active contour from the target of interest. We believe that future research of angle dependencies

for even number of self-crossings will simplify the algorithm for the special cases discussed in the paper. The idea

of Perrin et al. [17] of using the assumption that initially the contour is simple, and then each moved snaxel should

be tested only if the simplicity condition is violated, should be applicable to our framework, by testing the changes

in the angles of each moved point. Additional improvements may be done by considering the work of Whitney and

Graustein [13, p.164], and the connection of the right-hand and left-hand crossings with the total angular change.

REFERENCES

[1] M. Kass, A. Witkin, and D. Terzopoulos, “Snakes: Active contour models,” International journal of computer vision, vol. 1, no. 4, pp.

321–331, 1988.

[2] A. Blake and M. Isard, Active contours: the application of techniques from graphics, vision, control theory and statistics to visual tracking

of shapes in motion. Springer-Verlag New York, Inc., 1998.

[3] T. Chan and L. Vese, “Active contours without edges,” IEEE Transactions on image processing, vol. 10, no. 2, pp. 266–277, 2001.

[4] J. Ivins and J. Porrill, “Active region models for segmenting textures and colours,” Image and Vision Computing, vol. 13, no. 5, pp.

431–438, 1995.

[5] S. Osher and R. Fedkiw, Level set methods and dynamic implicit surfaces.

[6] M. De Berg, O. Cheong, M. Van Kreveld, and M. Overmars, Computational geometry: algorithms and applications, 3rd ed. Springer-Verlag

New York Inc, 2008.

[7] C. Smith and H. Schaub, “Efficient polygonal intersection determination with applications to robotics and vision,” in IEEE/RSJ International

Conference on Intelligent Robots and Systems, 2005, pp. 3890–3895.

[8] T. McInerney and D. Terzopoulos, “T-snakes: Topology adaptive snakes,” Medical Image Analysis, vol. 4, no. 2, pp. 73–91, 2000.

[9] H. Delingette and J. Montagnat, “New algorithms for controlling active contours shape and topology,” in ECCV.

381–395.

Springer Verlag, 2003.

Springer, 2000, pp.

February 11, 2012DRAFT

Page 13

TRANSACTIONS ON IMAGE PROCESSING 13

[10] S. Bischoff and L. Kobbelt, “Parameterization-free active contour models with topology control,” The Visual Computer, vol. 20, no. 4, pp.

217–228, 2004.

[11] A. Oliveira, S. Ribeiro, R. Farias, and C. Esperanca, “Loop snakes: snakes with enhanced topology control,” in Computer Graphics and

Image Processing, Proceedings of 17th Brazilian Symposium on, 2004, pp. 364–371.

[12] L. Ji and H. Yan, “Loop-free snakes for highly irregular object shapes,” Pattern Recognition Letters, vol. 23, no. 5, pp. 579–591, 2002.

[13] A. Gray, E. Abbena, and S. Salamon, Modern differential geometry of curves and surfaces with Mathematica.

2006.

[14] S. Araki, N. Yokoya, H. Iwasa, and H. Takemura, “Splitting of active contour models based on crossing detection for extraction of multiple

objects,” Systems and Computers in Japan, vol. 28, no. 11, pp. 34–42, 1998.

[15] S. Stoeter and N. Papanikolopoulos, “Closed Dynamic Contour Models that Split and Merge,” in IEEE International Conference on

Robotics and Automation, 2004, pp. 3883–3888.

[16] G. Sundaramoorthi, A. Yezzi, and A. Mennucci, “Coarse-to-Fine Segmentation and Tracking With Sobolev Active Contours,”

Transactions on Pattern Analysis and Machine Intellegence, vol. 30(5), pp. 851–864, 2008.

[17] D. Perrin, A. Ladd, L. Kavraki, R. Howe, and J. Cannon, “Fast intersection checking for parametric deformable models,” in Proceedings

of SPIE, vol. 5747, 2005, p. 1468.

Chapman & Hall/CRC,

IEEE

Arie Nakhmani received the Ph.D. degree in Electrical Engineering from Technion - Israel Institute of Technology,

Haifa, Israel, in 2011. Currently, he is a postdoctoral researcher and lecturer at the ECE Boston University, Boston,

MA. His research interests include visual tracking, image segmentation, estimation, and robust control.

Allen Tannenbaum is a faculty member of ECE/BME Boston University, and Department of Radiology/Wallace Cancer

Center, UAB. He does research in medical imaging, control, image processing, and computer vision.

February 11, 2012DRAFT