Monotonicity Analysis over Chains and Curves
- arXiv: math/0701481
Abstract
Chains are vector-valued signals sampling a curve. They are important to motion signal processing and to many scientific applications including location sensors. We propose a novel measure of smoothness for chains curves by generalizing the scalar-valued concept of monotonicity. Monotonicity can be defined by the connectedness of the inverse image of balls. This definition is coordinate-invariant and can be computed efficiently over chains. Monotone curves can be discontinuous, but continuous monotone curves are differentiable a.e. Over chains, a simple sphere-preserving filter shown to never decrease the degree of monotonicity. It outperforms moving average filters over a synthetic data set. Applications include Time Series Segmentation, chain reconstruction from unordered data points, Optical Character Recognition, and Pattern Matching.
Monotonicity Analysis over Chains and Curves
X
iv
:m
at
h/
07
01
48
1v
2
[m
ath
.G
M
]
24
Ja
n 2
00
7
Monotonicity Analysis over Chains and
Curves
Dan Kucerovsky and Daniel Lemire
Abstract. Chains are vector-valued signals sampling a curve. They
are important to motion signal processing and to many scientific ap-
plications including location sensors. We propose a novel measure of
smoothness for chains curves by generalizing the scalar-valued con-
cept of monotonicity. Monotonicity can be defined by the connect-
edness of the inverse image of balls. This definition is coordinate-
invariant and can be computed efficiently over chains. Monotone
curves may be discontinuous, but continuous monotone curves are
differentiable a.e. Over chains, a simple sphere-preserving filter is
shown to never decrease the degree of monotonicity. It outperforms
moving average filters over a synthetic data set. Applications include
Time Series Segmentation, chain reconstruction from unordered data
points, Optical Character Recognition, and Pattern Matching.
§1. Introduction
Monotonicity is one of the simplest property a signal may have. It offers a
powerful qualitative description (“it goes up,” “it goes down”). Given data
coming in from either sensors or from a numerical simulation, monotonicity
is independent of the sampling frequency and is robust with respect to
missing data [8]. Many geometrical objects such as curves are typically
defined in a parametrization-independent way which makes monotonicity
appealing.
In this paper, we are concerned with discretely sampled curves (which
we call chains) such as the trajectory of a particle in some vector space.
This problem has applications in motion capture and tracking [14, 1].
We expect a “smooth” scalar-valued signal not to change too quickly:
it should be locally constant. Therefore, classical low pass filters such as
the moving average (MA) are often sufficient to help smooth signals. Un-
fortunately, “smooth” chains are not locally constant: consider a loosely
Conference Title 1
Editors pp. 1–6.
Copyright Oc 2005 by Nashboro Press, Brentwood, TN.
ISBN 0-0-9728482-x-x
All rights of reproduction in any form reserved.
sampled circle (see Fig. 1). Moreover, a chain may lie on a sphere or other
higher dimensional surface and we may need to preserve this embedding.
In Fig. 1, a chain on a circle is filtered using a moving average: we see
that the filtered chain can, at best, follow a circle of a smaller radius. A
filter is sphere-preserving (resp. circle-preserving) if, when the input data
points are on a sphere (resp. circle), the filtered data points also lie on the
same sphere (resp. circle). It is readily shown that no linear filter except
the identity can be sphere-preserving (SP) or circle-preserving (CP). In
general, an SP filter is CP. We offer a simple SP filter in Section 5.
One of the main contribution of this paper is to provide a generaliza-
tion of the concept of monotonicity which applies to vector-valued signals
and to curves. This definition is shown to be robust with respect to re-
moval of data points and to be efficiently computed. Over curves, we
show that monotone curves have many of the same properties as mono-
tone functions as far as continuity and differentiability are concerned. We
also propose a SP filter which we show to never decrease the degree of
monotonicity. Experimentally, we show that the degree of monotonicity is
inversely correlated with noise and we compare the SP filter with simple
MA filters, proving the nonlinear SP filter is a good choice when noise lev-
els are low. Applications of this work include chain reconstruction from
unordered data points [3] and Optical Character Recognition [15].
§2. Related Work
A motion signal is comprised of two components: orientation and transla-
tion. The orientation vector indicates where the object is facing, whereas
the translation component determines the object’s location. Recent work
has focused on smoothing the orientation vectors [14, 12], whereas the re-
sults of the present paper apply equally well to orientation vectors (points
on the surface of a unit sphere) as to arbitrary translation signals.
In [2, 7, 10], the authors chose to define monotonicity for curves or
chains with an arbitrary direction vector: a curve is monotone if its pro-
jection on a line is does not backtrack. While this is a sensible choice
given the lack of definition elsewhere, we argue that not all applications
support an arbitrary direction that can be used to define monotonicity.
The definition of monotonicity has been extended to real-valued func-
tions [4, 5, 6, 11, 16, 17] (f : Rn → R) by using contour lines (or surfaces)
filtered
original
Fig. 1. Given samples on circle, a simple moving average does not preserve the
embedding.
but the idea does not immediately generalize to curves and chains.
One approach to chain smoothing is to use B-splines and Bezier curves
with the L2 norm [9]. Correspondingly, we could measure the “smooth-
ness” of a chain by measuring how closely one can fit it to a smooth curve.
Our approach differs in that we do not use polygonal approximations or
curve fitting: we consider chains to be first-class citizens.
§3. Monotone Curves
Recall that a function f : R → R is said to be monotone increasing
if f(x) ≥ f(y) whenever x ≥ y and monotone decreasing if f(x) ≤ f(y)
whenever x ≥ y. A monotone increasing or monotone decreasing function
is said to be monotone. Recall that B = {x : |x− a| ≤ R} is called a
(closed) ball of radius R centered around a: in the multidimensional case,
the ball is a generalization of the (closed) interval.
Proposition 1. f : R → R is monotone if and only if f−1(B) is connected
for all balls B.
An arc-length parametrized curve s : t → s(t) is R-monotone for R > 0
if the inverse image of any closed ball of radius at most R, under s, is con-
nected. Straight lines are R-monotone for all R > 0. As motivation
the discrete case, we want to compare monotone curves with monotone
functions. Monotone functions f : R → R are differentiable almost every-
where, and they do not have to be continuous. R-monotone also do not
have to be continuous: the curve s(t) = (f(t), f(t)) where f ′(t) = 1 a.e. is
R-monotone for all R > 0. Moreover, they are also differentiable a.e. as
the next proposition shows.
Proposition 2. Continuous R-monotone curves are differentiable a.e.
Proof: Take any point x in the (open) domain of the curve s. Choose
another point y so that the arc-length y − x over s is smaller than R.
Consider any point z on s between y and x, then z must be contained
in all balls of radius R containing both x and y. It follows that s must
be differentiable from the left at x. Similarly, s is differentiable from the
right at x. If the two derivative from the left and from the right do not
match, then it is possible to find y and y′ close to x from the left and the
right such that there is a ball of radius R containing both y and y′ but
not x, a contradiction.
Just like monotone functions, continuous R-monotone curves do not
have to be twice differentiable, consider the arc-length parametrized ver-
sion of s(t) = (t, |t|t) for t ∈ (−1, 1).
Differentiable functions are not necessarily monotone. Likewise differ-
entiable curves are not necessarily R-monotone as the next proposition
shows.
Proposition 3. There is a differentiable continuous finite curves with no
cross-over (that is, t → s(t) is one-to-one) which is not R-monotone for
any R > 0.
Proof: Consider a curve following a inward spiral around a fixed point
such as s(t) = (2π − t)(cos t, sin t) for t ∈ (0, 2π].
Functions are monotone or not, and there is no “degree of monotonic-
ity.” Similarly, for curves of finite length, it simply matters whether they
are R-monotone for some finite R since R-monotonicity is scale-dependent.
Proposition 4. Given a R-monotone curve, scaling the curve by a factor
∞ > α > 0 makes it αR-monotone.
§4. Signal Monotonicity
In this section, we define monotonicity for vector-valued signals or chains
as a natural extension of monotonicity for real-valued signals. We show
how to compute efficiently the degree of monotonicity.
A scalar-valued signal (or discrete function) is monotone if and only if
the index set of values in any closed interval [a, b] is a set of consecutive
integers [j, k]: pi ∈ [a, b] ⇔ i ∈ [j, k]. Equivalently, the values of the
signal pi never go down (pi+1 ≥ pi) or never go up (pi+1 ≤ pi). Another
equivalent definition is given by the next proposition.
Proposition 5. A scalar-valued signal pi is monotone if and only if, for
any 3 consecutive samples, pi, pi+1, pi+2, the index set of the values con-
tained in any closed interval [a, b] is a set of consecutive integers [j, k].
Equivalently, the index set is a convex set under an appropriate definition
of convexity.
It is easy to extend this definition of monotonicity to the case of vector-
valued signals. Unfortunately, a straightforward generalization, based on
considering the set of indices of the values contained in any closed ball,
would lead us to conclude that the only monotone vector-valued signals
are on straight lines and never backtrack. It is not hard to realize no
sensible filter could turn any vector-valued signal into a monotone signal.
In order to obtain nontrivial results, we need to restrict the class of balls
considered, as in the following definition.
Definition 1. A vector-valued signal pi has a degree of monotonicity R
if R is the largest value such that, considering only 3 consecutive samples,
pi,pi+1,pi+2, the index set of the values contained in any closed ball B
of radius at most R is a set of consecutive integers in {i, i+ 1, i+ 2}.
8
2 3
4
5
6
1 7
Fig. 2. Given the chain of data points shown, the degree of monotonicity is at
most the size of the radius of the circle given in the picture: it contains points
4 and 6 but not point 5.
If the signal values are on a straight line with no backtracking, then
the degree of monotonicity is ∞, and the degree of monotonicity is always
larger than 0 for finite signals. Fig. 2 gives an intuitive view of the degree
of monotonicity. This measure of monotonicity is robust in the following
sense.
Proposition 6. If one point is omitted from a vector-valued signal, the
degree of monotonicity cannot decrease.
While this discrete definition is similar to the definition given for R-
monotone curves, to allow efficient computation, we consider only sets of
3 consecutive samples, thus replacing a global problem by a local problem.
If we lift the requirement that only 3 samples are considered, then a signal
is R-monotone if and only if all subchains of length 3 are R-monotone.
This suggests that the cost of checking global R-monotonicity grows in a
cubic fashion with respect to the length of the signal which is unacceptable
for most applications.
In practical applications, maximizing the degree of monotonicity R
leads to useful chains. For example, noise tends to reduce R by creating
sharp turns and local backtracking and a highly monotone curve (R large)
is more likely to be noise-free. On the other hand, when reconstructing
chains from unordered sets of points, as happens in computer vision, we
often want to minimize sharp turns and backtracking. Therefore, solving
for the chain maximizing R while passing through all available data points
is a sensible “curve reconstruction” strategy.
As a prerequisite to computing the degree of monotonicity, we need
a computationally effective way to compute the radius of the circle going
through 3 points. Given p1,p2,p3 ∈ Rn, we can compute the radius of
the circle passing through them (denoted ⌢ (p1p2p3) ) by first computing
a = ‖p1 −p2‖, b = ‖p2 −p3‖, c = ‖p1 −p3‖, σ = (a+ b+ c)/2, and then
we have the classical Heron’s formula for the radius of the circle:
Routcircle = abc
4
√
σ(σ − a)(σ − b)(σ − c)
C
A
B
C
A
B
Fig. 3. Given a chain of 3 data points, we give two cases: (left) the angle
∠(ABC) > pi/2 so we compute the radius of the circle going through ABC,
otherwise (right), we compute half the distance between A and C.
whenever a, b, c > 0.
The next theorem gives us a way to compute the (local) degree of
monotonicity for any 3 points, to compute the degree of monotonicity of
an entire signal simply requires, by definition, to take the minimum of
the result for all consecutive 3 points. The theorem essentially says that
if ∠(p1p2p3) < π/2, the degree of monotonicity is then half the distance
between p1 and p3, and otherwise, it is Routcircle (see Fig. 3). To see that
this local form of monotonicity is distinct from the global form suggested
earlier, consider a chain in the form of a figure “8.”
Theorem 1. The degree of monotonicity for the sequence p1,p2,p3 is
R :=
{
1
2c if a2 + b2 > c2
Routcircle otherwise
where a = ‖p1 − p2‖, b = ‖p2 − p3‖, c = ‖p1 − p3‖.
Proof: Consider the disk B0 containing p1 and p3, centered at (p1 +
p3)/2 and having radius d(p1,p3)/2. The point p2 is outside the disk if
and only if cos∠(p1p2p3) = a
2+b2−c2
2ab is positive. Thus, p2 is outside the
disk if and only if a2 + b2− c2 > 0. Clearly R = radius(B0) = d(p1,p3)/2.
Next, suppose that p2 is in the disk B0. We have that any ball containing
p1 and p3 but not p2 must be larger than radius(B0) since B0 is the
smallest ball containing both p1 and p3. Now, suppose there is a (closed)
ball of minimal radius R containing p1 and p3, but not p2. This implies
a non-zero distance, δ > 0, between B and p2. We have that the center
of the ball has to be away from the line formed by p1,p3: if not then it
must be a ball containing B0. This means we can move the center of the
ball slightly closer to p1 and p3 while reducing the radius just enough so
that p2 remains outside the ball. By repeating this process, we show that
δ = 0, a contradiction. Hence, there is no (closed) ball of minimal radius
R containing p1 and p3, but not p2. Hence p1,p2,p3 have a degree of
monotonicity Routcircle.
§5. Monotonicity and Sphere-Preserving Filters
In this section, we propose a SP filter which never decreases the degree
of monotonicity of the signal. Given a signal pi, we consider recursive
(IIR) filters of the form
p′i = f(p′i−2,p′i−1,pi,pi+1,pi+1).
To ease the notation, we write A = p′i−2, B = p′i−1, X = pi, C = pi+1,
D = pi+1) so that the equation becomes X ′ = f(A,B,X,C,D). Let
R(A,B,X,C,D) be the degree of monotonicity of A,B,X,C,D com-
puted as min(R(A,B,X), R(B,X,C), R(X,C,D)). The following propo-
sition gives us a condition of f to increase the monotonicity of a vector-
valued signal.
Proposition 7. Given X ′ = f(A,B,X,C,D), if f is such that the degree
of monotonicity
R(A,B,X ′, C,D) ≥ R(A,B,X,C,D),
then the recursive filter
p′i = f(p′i−2,p′i−1,pi,pi+1,pi+1)
never decreases the degree of monotonicity of a signal.
It seems that f should be chosen so that R(A,B,X ′, C,D) is as large as
possible. To maximizes R(A,B,X ′, C,D) with X ′ = f(A,B,X,C,D), f
should be either B or C. In other words, we improve monotonicity best
when we make the sample X “virtually disappear.”
Proposition 8. R(A,B,X ′, C,D) is minimized when X ′ = B or X ′ = C
and these choices are unique unless ⌢ (ABC) =⌢ (BCD) in which case
any point on the arc of the circle between B and C inclusively qualifies.
Fortunately, we can easily define a more interesting SP filter. Given an
arc of a circle, denoted α, and a point X , we can project X on α by
solving for the point closest X in α. The projection onto a circle can be
determined easily using only linear algebra [13]. In the plane, start with
equation (x− r1)2 + (y − r2) = ρ2 and substitute 3 values of x, y, getting
3 equations. By pairwise subtraction, we can remove the unknown ρ2,
and be left with linear system having 2 equations and 2 unknowns (the
center of the circle). We apply this by first projecting on the circle and
if the projected point does not belong to the given arc we move it to the
closest point on the arc (an endpoint of the arc). Let us define X1 to be
the projection of X on the arc BC of the circle ABC, and define X2 to be
Fig. 4. The degree of monotonicity versus the absolute input noise level (MSE)
over a synthetic data set generated from points on a unit circle. The SP filter
outperforms MA when noise levels are low.
the projection of X on the arc BC of the circle BCD. Intuitively, either
point X1 or X2 would make a good choice for X ′ . To ensure that the
degree of monotonicity is never decreased, we set
f(A,B,X,C,D) = arg max
X′∈{X,X1,X2}
R(A,B,X,C,D).
This function can be computed quickly and is sphere-preserving.
§6. Experimental Results
We generate a chain in the xy plane by regularly sampling a unit circle 3
times for a total of 30 samples. A MA filter with window width k averages
each k consecutive data points. We add white noise to every point in the
chain and we filter it using simple MA filters with window widths of 3
and 5 samples as well as with the SP filter of the previous section. Each
test is repeated 10 times and we keep only the averages. Fig. 4 shows
the degree of monotonicity versus the noise level (Mean Square Error)
with the three smoothing filters and the unfiltered chain. The noise level
ranges from none to over 0.05 (MSE) which corresponds roughly to a 5%
noise-to-signal ratio. An example of filtering is given in Fig. 5.
§7. Discussion
In the unfiltered chain, the degree of monotonicity is inversely corre-
lated with the noise level: the Pearson correlation is p = −0.95 (90%).
The degree of monotonicity seems a good indicator of noise, which in par-
ticular suggests that a method for increasing the degree of monotonicity
-1
-0.5
0
0.5
1
1.5
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
unfiltered
sphere preserving (width=5)
moving average (width=3)
Fig. 5. Visual comparison of the SP filter with the MA filter for low noise levels
and coarse sampling.
would also function as a good noise reduction technique. As required, the
SP filter always increases the degree of monotonicity with respect to the
unfiltered data. Simple MA filters decrease the degree of monotonic-
ity when noise levels are low, and more aggressive filtering (window width
of 5 versus 3) even more so. The result of aggressive lowpass filtering on
the curvature of a chain is explained by Fig. 1. The relative performance
of filters over chains can vary depending on the level of noise and the
distance between the points: as noise levels increase, the SP filter is less
competitive. The design of sphere-preserving filters optimally increasing
the degree of monotonicity is an open problem.
References
1. Whalenet satellite tagging data, maps and information.
http://whale.wheelock.edu/whalenet-stuff/stop cover.html [link
last checked on January 16th 2007].
2. P. K. Agarwal, S. Har-Peled, N. H. Mustafa, and Y. Wang, Near-linear
time approximation algorithms for curve simplification, in Proceed-
ings of the tenth Annual European Symposium on Algorithms, Springer-
Verlag, London, UK, 2002, 29–41.
3. N. Amenta, M. Bern, and D. Eppstein, The crust and the β-skeleton:
combinatorial curve reconstruction, Graph. Models Image Process., 60
2 (1998), 125–135.
4. M. Brooks, Monotone simplification in higher dimensions, CMS Sum-
mer Meeting, 2004.
5. H. Carr, J. Snoeyink, and U. Axen, Computing contour trees in all
dimensions, in Proceedings of the eleventh annual ACM-SIAM sympo-
sium on Discrete algorithms, ACM Press, New York, NY, USA, 2000,
918–926.
6. Y.-J. Chaing and X. Lu, Simple and optimal output-sensitive compu-
tation of contour trees, Technical Report TR-CIS-2003-02, Polytechnic
University, 2003.
7. J. M. Diaz-Banez, F. Gomez, and F. Hurtado, Approximation of point
sets by 1-corner polygonal chains, INFORMS Journal on Computing,
12 4 (2000), 317–323.
8. Z. Ghahramani and M.I. Jordan, Learning from incomplete data, Tech-
nical Report 108, MIT Center for Biological and Computational Learn-
ing, 1994.
9. A.V. Gue´ziec and N.V. Ayache. Smoothing and matching of 3-d space
curves, International Journal of Computer Vision, 12 1 (1994), 79–104.
10. S. L. Hakimi and E. F. Schmeichel, Fitting polygonal functions to a
set of points in the plane, Graphical Models and Image Processing, 53
(1991), 132–136.
11. T. He, L. Hong, A. Varshney, and S. Wang, Controlled topology simpli-
fication, IEEE Transactions on Vizualization and Computer Graphics,
2 2 (1996), 171–184.
12. C.-C. Hsieh, Motion smoothing using wavelets, J. Intell. Robotics
Syst., 35 2 (2002), 157–169.
13. D. Kalman, An Undetermined Linear System for GPS, College Math-
ematics Journal, November 2002, 384–390.
14. Jehee Lee and Sung Yong Shin, A coordinate-invariant approach to
multiresolution motion analysis, Graph. Models, 63 2 (2001), 87–105.
15. S. Mori, C. Y. Suen, and K. Yamamoto, Historical review of OCR re-
search and development, in Document Image Analysis, IEEE Computer
Society Press, Los Alamitos, CA, USA, 1995, 244–273.
16. S. Morse, Concepts of use in computer map processing, Communica-
tions of the ACM, 12 3 (1969), 147–152.
17. M. van Kreveld, R. van Oostrum, C. Bajaj, V. Pascucci, and
D. Schikore, Contour trees and small seed sets for isosurface traversal,
in Proceedings of the thirteenth annual symposium on Computational
geometry, ACM Press, New York, NY, USA, 1997, pages 212–220.
Dan Kucerovsky
University of New Brunswick
Fredericton NB CANADA
dan@math.unb.ca
www.math.unb.ca/∼dan/
Daniel Lemire
University of Quebec at Montreal
Montreal QC CANADA
lemire@acm.org
www.daniel-lemire.com/
3
5
6
7
8
4
Sign up today - FREE
Mendeley saves you time finding and organizing research. Learn more
- All your research in one place
- Add and import papers easily
- Access it anywhere, anytime


