Boundary Tracking Procedures
Boundary Tracking Procedures
Correspondence to be sent to: Alex Chen, 520 Portola Plaza Math Sciences Building 6363,
Mailcode: 155505, Department of Mathematics, University of California, Los Angeles, CA 90059,
USA. e-mail: [email protected]
1 Introduction
Interpreting important features in an image often involves some simplification that dis-
cards detail in favor of generality. In image segmentation, two approaches are partic-
ularly common: region-based methods and edge-based methods. Partitioning an image
Received October 6, 2010; Revised January 24, 2011; Accepted February 24, 2011
c The Author(s) 2011. Published by Oxford University Press. All rights reserved. For permissions,
please e-mail: [email protected].
Efficient Boundary Tracking Through Sampling 183
into homogeneous regions gives a “cartoon-like” appearance which identifies the most
important objects and their rough boundaries. Many algorithms using this approach
rely on identifying some feature common to each region and classifying individual pix-
els according to how well they match this feature. The classification is often based on
matching pixel intensities with some spatial bias, such as regularity of object bound-
aries. This idea of image segmentation is the method adopted in region-based methods
like the algorithm of Chan and Vese [13], which uses the level set method [47] to mini-
Furthermore, certain shapes such as those with large concavities or sharp cor-
ners may not be detected accurately due to requirements in the regularity of the curve.
These points can be somewhat resolved with a balloon term [17] designed to encourage
evolution past local minima of the underlying energy functional or replacing the second-
order partial differential equations (PDE) for snakes evolution with a fourth-order PDE
designed to preserve corners [10, 62]. In [8], a new energy was proposed to replace length
with local area. This allows irregularly shaped objects, especially those with fractal-like
As with local searching methods in image processing, noise can cause problems
since the tracking is done as a local search. It was proposed [34] that the use of a change-
point detection algorithm such as Page’s cumulative sum (CUSUM) procedure [48] would
allow objects to be tracked in noise. Testbed implementations of the boundary-tracking
algorithm suggest that robots can indeed track boundaries efficiently in the presence of
a moderate amount of sensor noise [35].
While the particular algorithms that constitute the basis of the proposed seg-
The boundary-tracking algorithm is first initialized with some given decision function,
which determines whether it is in one of two regions. Boundary tracking is done as
a two-step process using the decision function in both steps. The first step involves
locating a boundary point via a global search. The boundary point found by this global
search serves as an initial point to be used in the local sampling step. At this second
step, boundary points are found by using a tracker that travels near the boundary in a
sinusoidal path. Sometimes the tracker can move off the boundary, particularly when
the noise is high or when the decision function is not very accurate. When this happens,
it is necessary to use the global search step again to locate the boundary. This paper
discusses the global search step briefly, and focuses on the local sampling algorithm.
There are several options for the global search step. The simplest is just a user-defined
point near the boundary that can be directly used by the local sampling step. For a more
automated approach, a random initial point in the image can be given. Then the tracker
travels in a spiral away from the initial point until a boundary point is detected (see
Figure 1). It is sometimes necessary to refine this estimate, since the spiral pattern may
not detect the exact crossing point accurately. Another option is to use a Levy flight to
detect a boundary. Levy flights have been observed in a variety of contexts [39, 64].
Efficient Boundary Tracking Through Sampling 187
For the physical problem [34, 37], a robot is used to track an environmental boundary.
The robot is placed near the boundary in question, and it then uses a bang–bang steering
controller to move through the boundary of the two regions.
It is relatively straightforward to adapt the algorithm for images. Let the image
domain be represented by Ω, with B the boundary between two regions Ω1 and Ω2 , so
that Ω = Ω1 ∪ Ω2 ∪ B and Ω1 ∩ Ω2 = ∅. Define an initial starting point x0 = (x01 , x02 ) for the
boundary tracker and an initial value θ0 , representing the angle from the +x1 direction,
so that the initial direction vector is (cos θ0 , sin θ0 ). Also define the step size V and angu-
lar increment ω, which depend on estimates for image resolution and characteristics of
the boundary to be detected. In general, V is chosen smaller for greater detail, and ω is
chosen smaller for straighter boundaries. A decision function between Ω1 and Ω2 must
also be specified and has the following form:
⎧
⎪
⎪ 1 if xΩ1 ,
⎪
⎨
x) = 0
d( if x B, (1)
⎪
⎪
⎪
⎩
−1 if xΩ2 .
where T is a fixed threshold value. Later in this section, we use statistical information
x). At each step k, the direction
about prior points sampled along the path to modify d(
θk and current location xk are updated recursively. Specifically,
and θk is updated according to the new location of the tracker xk. A simple update for θ
is the bang–bang steering controller, defined by
θk = θk−1 + ω d(
xk). (4)
Midpoints of the tracker locations, the iteration before and the iteration after
change, are taken to be the boundary points. Linear interpolation can be used to obtain
information from the pixels surrounding the tracker can be used to mitigate mistakes
due to noise. Using these extra pixels, of course, negates some computational benefits,
but as long as the number of extra pixels considered is small, the main advantages
are retained. Various methods for using this nonlocal information while preserving the
speed of the algorithm are presented in the next section. Also, robots used in experi-
ments [31, 35] make smooth changes of direction, but this restriction is not required
in the image processing case. Lastly, robots have a fixed position at any point in time
3 Change-Point Decisions
The boundary-tracking method presented works well when a clear and accurate deci-
sion function can be defined. However, in many applications a clear distinction between
the two regions cannot be made, particularly in noisy images. For boundary tracking,
errors in classification by the decision function can lead to serious errors in tracking,
since the local sampling algorithm is only valid when the tracker is near the boundary.
With some method to average nearby pixels, however, the algorithm can be made much
more robust to noise.
Change-point detection theory is well suited to tracking image edges in noise.
In particular, the CUSUM algorithm has been used to improve tracking performance in
the environmental tracking problem [35, 38]. This section reviews relevant information
from change-point detection and its application to the boundary-tracking problem.
Change-point problems deal with rapid detection of abrupt changes in statisti-
cal properties (distributions) of data. One standard application of change-point detec-
tion is in manufacturing [20, 43, 53]. For a certain process, it may be acceptable to have
a certain failure rate. If the process is able to operate below this tolerance level, then
it is allowed to continue operation. If, however, this tolerance level is exceeded, one
would like to stop as soon as possible to make repairs. Making a false stop, how-
ever, is costly as well, so it is important to balance the two considerations. Other
applications include surveillance, computer network security (rapid detection of intru-
sions), failure detection in dynamical systems and communication networks, financial
markets, seismology, navigation, speech segmentation, etc. See, e.g., [9, 59, 60, 65] and
references therein.
190 A. Chen et al.
the CUSUM statistic and the corresponding stopping time τ = min{k | Uk ≥ Ū }, where Ū
is a threshold controlling the false alarm rate. Then τ is a time of raising an alarm. In
our applications, assuming that f is the pdf of the data in Ω1 and g is the pdf in Ω2 ,
the value of τ may be interpreted as an estimate of the actual change-point, i.e., the
boundary crossing from Ω1 to Ω2 .
Changes from Ω2 to Ω1 can also be tracked in this manner. Analogously to (6)
define recursively the decision statistic L k = max(L k−1 − Z k, 0), L 0 = 0 and the stopping
time τ = min{k | L k ≥ L̄}, where L̄ is a threshold associated with a given false detection
rate. The description of the basic boundary-tracking algorithm is now complete; the
steps are shown in Figure 2.
The CUSUM algorithm and optimality can be understood intuitively. Consider
two distributions of data D f and Dg with density functions f and g, respectively. In
the change-point detection problem, observations are conditionally independent given
the point of change. Given a sequence of observations xk−l+1 , . . . , xk for a fixed natural
Efficient Boundary Tracking Through Sampling 191
g(xk−l+1 )···g(xk )
Then the likelihood ratio test gives the procedure f(xk−l+1 )··· f(xk )
≥ α.
This test, however, requires k − l + 1 observations after a change has actually
g(xi )
where Ū is a certain threshold that controls the rate of false alarms and Z i = f(xi )
is the
log-likelihood ratio for the ith observation.
k
It is easily seen that the trajectories of the statistic max1≤l≤k i=l Z i coincide
k
with the trajectories of the CUSUM statistic Uk = maxl≥1 i=l Z i on the positive half-
plane. Note that the CUSUM statistic also obeys the recursion (6) (i.e., it is a reflected
from the zero barrier random walk). Therefore, whenever the threshold Ū is positive
(which is usually the case) the stopping time τ is nothing but the CUSUM algorithm that
can be equivalently written as
τ = min{k | Uk ≥ Ū },
noise, the spatially uncorrelated noise gives approximate independence. For a low level
of noise, using change-point detection is less important.
As alluded to earlier in this section, the effectiveness of a change-point detection
algorithm can be quantified. Generally, the important factors are the delay in detection
of a real change (which is random) and false alarms. Detection delay measures the num-
ber of observations it takes to detect a change after it has actually occurred, while a false
alarm occurs when a change is detected but has not actually occurred (Type 1 errors).
cannot be applied directly. Nevertheless, the cited results give a guideline as to param-
eter choice and an estimate of effectiveness.
For CUSUM, the following relation holds (asymptotically as ARL to false alarm
is large):
log ARLFA
DD ∼ El (τ − l|τ > l) ∼ , l ≥ 0,
K(g, f)
where ARLFA denotes the ARL to false alarm and
This section introduces further modifications to the algorithm, possible only in the
image processing case, improving performance in the presence of noise. To mitigate the
effects of noise further, a mean filter can be used; that is, the nearest-neighbor intensity
at the tracker can be replaced by an average of intensity values of nearby pixels. The
idea is that nearby pixels are most likely to be in the same region, so that taking an
average filters noise without using values from the other region. The same principle is
at work with region-based segmentation methods, in which it is assumed that an image
can be partitioned into a few contiguous regions with the same characteristics.
Mean filters can help the performance of the boundary tracker in noise. But
since the tracker follows the boundary closely, it is important to use the uniform region
assumption conservatively. Using a large number of pixels around the tracker would
average noise but likely would also use values from the other region. Using these values
can result in a much more serious error. In practice, a 3 × 3 window centered on the
tracker works well. Instead of averaging the entries in the window, one can apply rea-
soning similar to the hypothesis testing mentioned for the CUSUM algorithm. As with
observations along the boundary-tracking path, the entries in the 3 × 3 window can also
be treated as independent measurements. Thus, in the hypothesis testing of the CUSUM
procedure, the nearest-neighbor observation is replaced by the nine observations in the
3 × 3 window.
Efficient Boundary Tracking Through Sampling 195
g
K(g, f) = E g log
f
∞
g(y)
= g(y) log dy
−∞ f(y)
∞ 2
y (y − 1)2
= 2
− g(y) dy
−∞ 2σ 2σ 2
196 A. Chen et al.
∞
(x + 1)2 x2
= − f(x) dx
−∞ 2σ 2 2σ 2
1
= .
2σ 2
Thus, the asymptotic detection delay is Ū ∗ 2σ 2 . Backtracking by Ū ∗ 2σ 2 steps
after each boundary crossing gives a slightly sharper tracking. The quantity Ū ∗ 2σ 2 is
normally small enough (< 1) that there is little difference in the actual results. For high
In Figure 3, several results on a “U” image in heavy noise are shown. The results for
boundary tracking are comparable to a region-based method. Furthermore, corners are
not rounded as in the case with many energy-based segmentation methods. This fact
can make boundary tracking more well-suited for segmentation problems with more
man-made objects or with sharper edges.
Parameters are determined experimentally, but they are relatively consistent
from image to image. The primary adjustments are based on the level of noise present
in the image. For higher levels of noise, the CUSUM threshold should be set higher in
order to avoid false alarms, but this will result in higher detection delays. Visually,
one would see a larger sinusoidal pattern (a less sharp segmentation and an increasing
Efficient Boundary Tracking Through Sampling 197
chance of straying too far from the boundary), so it is best to avoid an unnecessarily
large threshold. The image resolution also affects the choice of parameters, but only
slightly. In general, a higher resolution gives more leeway for detection delays, since
the tracker will not have strayed far from the boundary. Thus, a higher threshold is
allowable. However, the algorithm works best for higher resolution images, and there is
considerable flexibility in choosing parameters for this case. Parameters for each of the
numerical examples were ω = 0.5, V = 0.5, Ū = L̄ = 0.8 unless otherwise indicated.
The segmentation accuracy of the boundary-tracking algorithm is comparable to
that of other segmentation methods. The run-time and storage costs, however, are much
less for boundary tracking than for many global methods, especially for high dimen-
sional data.
The algorithm compares favorably with other segmentation methods designed
for fast computation time. The split Bregman globally convex segmentation (GCS)
method of Goldstein and Osher [26] is one such method. Table 1 shows a comparison
of the two methods. Note that the boundary-tracking method scales much better with
an increase in image size.
198 A. Chen et al.
Table 1 A comparison of run-times for various images and segmentation methods. Computations
were done with an Intel Core 2 Duo Processor T8300 (2.4 GHz)
A comparison of run-times (s)
(4.1) (4.2)
Fig. 5. Boundary tracking of the San Francisco Bay coastline [54]. In this example, multiple
trackers need to be used since the coastline boundary is not connected.
is set according to the noise level. There is thus a trade-off between spatial resolution
and the allowable noise level. Note that for global segmentation methods, higher image
resolution may give little benefit due to the increasingly high computation cost.
In the “San Francisco Bay” data set [54], a multispectral data set taken by the
Landsat 7 satellite, the datum is 3000 × 3500 pixels, with boundaries of the object of
interest touching the edge of the image.The normalized difference vegetation index
(NDVI), commonly used for water detection [52], is taken as the decision function. This
index is a combination of two images at the same spatial coordinates, taken at a red
wavelength band and an infrared wavelength band (Figure 5).
200 A. Chen et al.
With the change to a different decision function, the choice of f and g becomes
more unclear. It is difficult or impossible to estimate the structure of the data in terms of
spectral angle distance. By choosing a large number of sample points, it may, however,
be possible to create an approximation of f and g from the data itself.
With hyperspectral imagery, the number of spectral bands can number in the
hundreds. With this amount of data, it is often necessary to reduce the size of the data,
either in the spectral dimension or through spatial subsampling. Using the boundary-
(7.1) (7.2)
Fig. 8. (8.1) Plots of the reflectances of the reference signatures of the land class: dark dirt, light
dirt, vegetation, beach. (8.2) Plots of the reflectances of the reference signatures of the water class:
dark water, light water.
outside. While it can be computationally expensive to implement the algorithm for very
fine detail, tracking only the boundary can be much faster. In addition, the potential
detail is unlimited since the fractal is defined in continuous space rather than the dis-
crete space of images. Moreover, boundary tracking follows rough boundaries without
introducing extra smoothing, as in many segmentation methods with a penalty on the
Efficient Boundary Tracking Through Sampling 203
(9.1) (9.2)
Fig. 10. Boundary tracking of the Mandelbrot set at 400 × 400 resolution. A higher magnification
of the boxed region is shown in Figure 11.
length of the boundary. This fact makes boundary tracking a method well suited for
dealing with fractal-like structure (Figure 10). Figure 11 shows various magnifications
of boundary tracking on the Mandelbrot set. Table 2 gives a timing comparison between
the boundary-tracking algorithm and the calculation of the escape algorithm at the cor-
responding resolution. In the results shown in Figure 11 and Table 2, the computations
on the escape algorithm for boundary tracking were done only at locations that the
204 A. Chen et al.
(11.1)
(11.3)
Fig. 11. Tracking the boundary of the Mandelbrot set at increasing levels of magnification with
the boxed region showing the domain for the next highest level of magnification. The resolution
of each image is 400 × 400. (11.1) 10 times magnification, 102 times magnification. (11.2) 103 times
magnification, 104 times magnification. (11.3) 105 times magnification, 106 times magnification.
Efficient Boundary Tracking Through Sampling 205
Table 2 A table comparing the run-time of the boundary-tracking algorithm (BT) and calculation
of the full domain (FD) for the Mandelbrot set at the corresponding resolution (pixel width). The
precision of the escape algorithm (Escape) was adjusted according to the resolution, as needed
Mandelbrot set timing comparison
tracker visits, not on the entire 400 × 400 images. The tracking results are shown over-
laid on the full images for clarity.
Note that as the magnification is increased, the number of iterations in the
escape algorithm needed to resolve the boundary accurately also increases. This is due
to the fact that the points being examined are much closer to the actual boundary of the
Mandelbrot set, so that the escape algorithm for points not in the Mandelbrot set will
diverge much more slowly. This gives an additional savings in the run-time of boundary
tracking relative to computing on the entire domain, as the resolution is increased.
By tracking the boundary of the fractal at various magnification factors, it is
possible to measure the fractal dimension using the box-counting method. The fractal
dimension of a set is defined to be
log(N())
D = lim ,
→0 log(1/)
where N represents the number of boxes of size that are needed to cover the set. At a
given scale , there exists a simple relationship between the length L() and the number
of boxes N(): L() = N(). Using this formula, the fractal dimension can be rewritten as
log(L/) log(L)
lim = 1 − lim .
→0 log(1/) →0 log()
Using various step sizes V for the scale parameter , boundary tracking yields
boundary points at various scales. Thus, a log–log plot of log(L) versus log(V) is approx-
imately a line with slope equal to one minus the fractal dimension. A calculation of the
boundary for the Julia set with c = 1
4
is shown in Table 3. The calculated slope is
206 A. Chen et al.
Table 3 A table of the length calculations for the Julia set at various scales
Julia set lengths
Fig. 12. (12.1) The Julia set for c = 14 . (12.2) Log–log plot of log10 (L) versus log10 (V).
−0.0799, so the measured fractal dimension is 1.0799, which is close to the theoreti-
cal value of 1.0812 [41]. The corresponding set and log–log plot is shown in Figure 12.
Note that the Mandelbrot has comparatively a more complex structure, having a frac-
tal dimension of 2 [56], and the numerical computation of the fractal dimension is not
usually done. The computation of the fractal dimension here is a demonstration of one
application of boundary tracking.
Similar fractal dimension calculations can be done for real coastlines, as long
as the resolution of the data set is sufficient. For the Smith Island data set, a fractal
dimension can be calculated using boundary tracking. The results are shown in Table 4
Efficient Boundary Tracking Through Sampling 207
Table 4 A table of the length calculations for the Smith Island set at various scales
Smith Island set lengths
Fig. 13. Log–log plot of log10 (L) versus log10 (V) for Smith Island.
and Figure 13. From the fitted slope of −0.1739 for the log–log plot, the measured fractal
dimension is thus 1.1739.
6 Discussion
methods are O(n2 ), where the size of the image is n× n. Then the savings becomes more
apparent for larger images and those with higher resolution.
There is a substantial savings in memory requirements as well. Since only local
information is used in the decision function, it is not even necessary for the entire image
to be stored at once. Instead, image values can be read as needed whenever the tracker
visits a new point. On the other hand, many segmentation methods require not only the
original data to be stored but also evolved data of the same size.
Acknowledgments
The authors would like to thank Dr C. Bachmann and the Naval Research Laboratory
for helpful discussions on geospatial tracking problems as well as the use of the “Smith
Island” data set, Z. Hu and V. Mejia for earlier work on the boundary-tracking algorithm
in the image processing context [32, 42], and T. Goldstein for the implementation of
the split Bregman GCS method. The authors would also like to thank the reviewers
Funding
This work was supported by Office of Naval Research grant N000140810363; the Depart-
ment of Defense; ARO MURI grant 50363-MA-MUR; and National Science Foundation
grant DMS-0914856.
References
[1] Andersson, S. “Curve tracking for rapid imaging in AFM.” IEEE Transactions on Nanobio-
science 6, no. 4 (2007): 354–61.
[2] Azzabou, N., N. Paragios, and F. Guichard. “Random walks, constrained multiple hypotheses
testing and image enhancement.” In 9th European Conference in Computer Vision (ECCV),
379–90. Graz, Austria, May 7–13, 2006.
[3] Bachmann, C. “Improving the performance of classifiers in high-dimensional remote sensing
applications: An adaptive resampling strategy for error-prone exemplars (ARESEPE).” IEEE
Transactions on Geoscience and Remote Sensing 41, no. 9 (2003): 2101–12.
[4] Bachmann, C., T. Ainsworth, and R. Fusina. “Exploiting manifold geometry in hyperspectral
imagery.” IEEE Transactions on Geoscience and Remote Sensing 43, no. 3 (2005): 441–54.
[5] Bachmann, C., T. Ainsworth, and R. Fusina. “Improved manifold coordinate representations
of large scale hyperspectral imagery.” IEEE Transactions on Geoscience and Remote Sensing
44, no. 10 (2006): 2786–803.
[6] Bachmann, C., T. Donato, G. Lamela, W. Rhea, M. Bettenhausen, R. Fusina, K. Du Bois,
J. Porter, and B. Truitt. “Automatic classification of land cover on Smith Island, VA, using
HyMAP imagery.” IEEE Transactions on Geoscience and Remote Sensing 40, no. 10 (2002):
2313–30.
[7] Bai, X. and G. Sapiro. “Distancecut: Interactive segmentation and matting of images and
videos.” In IEEE ICIP 2, 249–52, San Diego, CA, October 12–15, 2007.
[8] Barchiesi, M., S. Kang, T. Le, M. Morini, and M. Ponsiglione. “A variational model for infinite
perimeter segmentations based on Lipschitz level set functions: denoising while keeping
Efficient Boundary Tracking Through Sampling 211
finely oscillatory boundaries.” SIAM Multiscale Modeling and Simulation 8, no. 5 (2010):
1715–41.
[9] Basseville, M. and I. Nikiforov. Detection of Abrupt Changes—Theory and Applications.
Information and System Sciences Series. Englewood Cliffs, NJ: Prentice Hall, 1993.
[10] Bertozzi, A. and J. Greer. “Low-curvature image simplifiers: Global regularity of smooth
solutions and Laplacian limiting schemes.” Communications on Pure and Applied
Mathematics 57, no. 6 (2004): 764–90.
[26] Goldstein, T. and S. Osher. “The split Bregman algorithm for L1 regularized problems.” SIAM
Journal on Imaging Sciences 2, no. 2 (2009): 323–43.
[27] Gonzalez, R. and R. Woods. Digital Image Processing. Englewood Cliffs, NJ: Prentice Hall,
2008.
[28] Griffiths, T. and A. Yuille. “Technical introduction: A primer on probabilistic inference.”
January, 2006.
[29] Guo, Z., T. Wittman, and S. Osher. “L1 unmixing and its application to hyperspectral image
[44] Moustakides. G. “Optimal stopping times for detecting changes in distributions.” Annals of
Statistics 14, no. 4 (1986): 1379–87.
[45] Mumford, D. and J. Shah. “Optimal approximation by piecewise smooth functions and asso-
ciated variational problems.” Communications on Pure and Applied Math XLII, no. 5 (1989):
577–684.
[46] Ng, J. and T. Bräun. “Performance comparison of bug navigation algorithms.” Journal of
Intelligent and Robotic Systems 50, no. 1 (2007): 73–84.
[62] Tumblin, J. and G. Turk. “LCIS: A boundary hierarchy for detail-preserving contrast
reduction.” In SIGGRAPH Annual Conference on Computer Graphics, 83–90, Los Angeles,
CA, August 8–13, 1999.
[63] Urban hyperspectral data set. HYDICE sensor imagery.
[64] Viswanathan, G., S. Buldyrev, S. Havlin, M. da Luz, E. Raposo, and E. Stanley. “Optimizing
the success of random searches.” Nature 401, no. 6756 (1999): 911–4.
[65] Willsky, A. “A survey of design methods for failure detection in dynamical systems.”