Вы находитесь на странице: 1из 7

ARTICLE IN PRESS

Signal Processing 85 (2005) 1845–1851


www.elsevier.com/locate/sigpro

Fast communication

Signal segmentation and denoising algorithm based


on energy optimisation
Sasan Mahmoodia,, Bayan S. Sharifb
a
Psychology Department, School of Biology, Henry Wellcome Building, Newcastle University, Newcastle upon Tyne, NE2 4HH, UK
b
School of Electrical, Electronic and Computer Engineering, Merz Court, Newcastle University, Newcastle upon Tyne, NE1 7RU, UK
Received 10 December 2004

Abstract

A nonlinear functional is considered in this short communication for time interval segmentation and noise reduction
of signals. An efficient algorithm that exploits the signal geometrical properties is proposed to optimise the nonlinear
functional for signal smoothing. Discontinuities separating consecutive time intervals of the original signal are initially
detected by measuring the curvature and arc length of the smoothed signal. The nonlinear functional is then optimised
for each time interval to achieve noise reduction of the original noisy signal. This algorithm exhibits robustness for
signals characterised by very low signal to noise ratios.
r 2005 Elsevier B.V. All rights reserved.

Keywords: Nonlinear energy optimisation; Signal segmentation; Signal smoothing

1. Introduction method. The notion of bounded variation (BV)


was later employed in signal and image restoration
Energy optimisation for signal and image problems based on nonlinear optimisation (e.g. in
processing applications has received considerable [3]). On the other hand, Kass et al. [4] initially
attention in recent years. Image and signal introduced the ‘snake algorithm’ for object seg-
restoration known as the ‘inverse problem’ was mentation in images. This method was further
initially considered by using an energy optimisa- developed mathematically by Mumford et al. [5–7]
tion approach in [1] and further developed by for image segmentation and smoothing and was
Rudin et al. [2] to introduce the total variation subsequently approximated and implemented by
using different approaches e.g. [8–15]. The solu-
Corresponding author. Tel.: +44 191 222 6246; tions to the Mumford–Shah functional which are
fax: +44 191 222 5622.
piecewise continuous functions from an appro-
E-mail address: sasan.mahmoodi@ncl.ac.uk priate Banach space and contours representing the
(S. Mahmoodi). discontinuities, minimise the functional consisting

0165-1684/$ - see front matter r 2005 Elsevier B.V. All rights reserved.
doi:10.1016/j.sigpro.2005.03.016
ARTICLE IN PRESS

1846 S. Mahmoodi, B.S. Sharif / Signal Processing 85 (2005) 1845–1851

of three terms: (1) fidelity term indicating that the piecewise constant in [3], whereas in this commu-
smoothed image should be as close as possible to nication, signals are considered piecewise contin-
the original image, (2) smoothing term requiring uous whose samples are either acquired (for
that the smoothed image should be as smooth as original signal) or computed (for smoothed
possible and (3) contour length removing the signal). (3) Spline algorithm and tube method
unnecessary contours and smoothing the contour based on taut-string algorithm minimising signal
representing discontinuities as much as required. length within a tube of radius a (e.g. see [18]), are
Mumford and Shah conjectured that there exists a employed for implementation in [3], while we
minimiser for their functional, although the proof consider geometrical properties of the smoothed
for this conjecture is still an open problem. signal in our simulation. The proposed method in
Existance of the solution is however proved for this communication is computationally efficient
the special case where the smoothing term is not and exhibits robustness even with SNRs less than
present in the functional and the solutions are 1. In Section 2, the mathematical background is
reduced to piecewise constant functions sur- discussed, whilst Section 3 deals with implementa-
rounded by contours representing discontinuities tion issues. Results are presented in Section 4.
(see e.g. [16,6,7]). The study of this functional is Finally conclusions are drawn in Section 5.
difficult because it involves two unknown variables
of different nature. One of them is a piecewise
continuous function on an N-dimensional space 2. Mathematical background
and the other representing the contour is asso-
ciated with a (N  1)-dimensional set. Further- A noisy signal, gðtÞ contaminated with a mean
more, the reason that Euler–Lagrange equations order stationary Gaussian noise [19], can be
cannot be employed in this functional is the lack of approximated by a piecewise continuous function
differentiability. Therefore different approxima- f ðtÞ containing class C 2 functions f i ðtÞ over time
tion methods have been suggested in the literature intervals ðti1 ; ti Þ so that f ðtÞ is as close as possible
(e.g. see [8–11,17]). However, the Mumford–Shah to the original signal gðtÞ and is as smooth as
functional is in principle inappropriate for signal possible over each time interval. However, the
processing applications, since the notion of a smoothing process is only applied over intervals
contour is not defined in a signal processing where the signal fluctuations are considered
context. Therefore, a functional based on the comparable to noise fluctuations. We therefore
Mumford–Shah model and appropriate for signal consider the following nonlinear functional whose
processing applications is considered in this com- optimisation leads to the desired smooth functions
munication. For implementation purposes, regu- f i ðtÞ over the time intervals ðti1 ; ti Þ.
larisation is initially performed by smoothing the Z "  2 #
original signal and a newmethod based on 1X t 2 df i
Eðf ; SÞ ¼ ðf i ðtÞ  gðtÞÞ þ m
geometrical properties of the smoothed signal, is 2 i 0 dt
further employed for segmentation and denoising. Si ðtÞ dt, ð1Þ
In comparison with signal restoration approaches
used in the inverse problem, three major differ- where Eðf ; SÞ is the energy term to be optimised, m
ences between our method and a restoration is a constant coefficient, and S i ðtÞ is a rectangular
method such as BV regularisation in [3] can be time-domain window function representing the
observed. (1) Energy optimisation in [3] leads to time interval:
restoration and therefore segmentation is impli- 
1 : ti1 ototi ;
citly achieved by using Lagrange multipliers Si ðtÞ ¼
0 : otherwise:
employed in the active set strategy, while in our
method, segmentation and denoising are explicitly Let us initially consider the optimisation of
employed in the formulation of the functional. (2) functional (1) in the interval defined by S i ðtÞ.
Original and denoised signals are considered Further, let S i ðtÞ be fixed and then vary f i ðtÞ.
ARTICLE IN PRESS

S. Mahmoodi, B.S. Sharif / Signal Processing 85 (2005) 1845–1851 1847

Functional (1) is therefore rewritten as Since df i a0 over the time interval ðti1 ; ti Þ, and in
Z ti "  2 # order to satisfy Eq. (4), we should have:
2 df i
E i ðf i ; S i Þ ¼ ðf i ðtÞ  gðtÞÞ þ m dt.
ti1 dt d2 f i ðtÞ
m ¼ f i ðtÞ  gðtÞ; ti1 ototi (5)
(2) dt2
As can be seen from (2), with fixed time intervals, with Neumann boundary conditions:
the integrand of the functional is convex, hence
there exists a minimiser for the functional with a df i df i
j ¼ 0; j ¼ 0. (6)
set of fixed intervals. In what follows we calculate dt ti dt ti1
this minimiser. Let df i represent a class C 2
function, and then we calculate the variations of The solution to differential equation (5) with
E i ðf i ; S i Þ by varying f i ðtÞ with df i : boundary conditions (6) is a minimiser of energy
functional (1) over time interval ðti1 ; ti Þ. Let us
dE i ¼ E i ðf i þ mdf i ; S i Þ  E i ðf i ; S i Þ now find the time interval ðti1 ; ti Þ minimising
Z ti " energy functional (1). This can be specified by
1
¼ ðf i þ mdf i  gÞ2 varying the time interval and considering the
2 ti1 variations of f i . Let us therefore vary ti and
  # calculate f i ’s variations in a neighborhood of ti .
dðf i þ mdf i Þ 2
þm dt Fig. 1 shows how f i and f iþ1 change if ti moves to
dt
t0i where t0i ¼ ti
dti . If we assume that ti
Z ti "  2 # !
2 df i corresponds to a discontinuity and then consider
 ðf i  gÞ þ m dt . the behavior of f by early and late movement of ti
ti1 dt
by dti , i.e. variations of f are considered in a
By simple mathematical manipulations, it is neighborhood (say I ) of t0i . If we further define f þ
concluded that: and f  corresponding to t0i ¼ ti þ dti and
dE i dE i t0i ¼ ti  dti , respectively, as can be seen in Fig. 1.
¼ lim
df i m!0 m 8
Z ti Z  
ti  >
< fþi : t2I & toti þ dti ;
df i ddf i þ þ
¼ ðf i  gÞdf i dt þ m dt. f ¼ f iþ1
: t2I & t4ti þ dti ;
ti1 ti1 dt dt >
: unchanged : teI;
ð3Þ
Integrating by part and treating this problem as free 8
boundary condition [20,21], Eq. (3) is written as >
< fi : t2I & toti  dti ;
 
f ¼ f iþ1 : t2I & t4ti  dti ;
dE i df i df >
¼ df j  i df i jti1 : unchanged : teI:
df i dt i ti dt
Z ti
 2 
d fi And if S þ and S  are also defined in a similar
þ ðf i  gÞ  m df i dt ¼ 0. ð4Þ
ti1 dt2 manner, then the variation in the energy functional

-
+ f1+i
f1+i f1+i
-
fi + fi
fi

I I
(a) ti (b) ti ti' (c) ti' ti

Fig. 1. Variations of f by varying ti .


ARTICLE IN PRESS

1848 S. Mahmoodi, B.S. Sharif / Signal Processing 85 (2005) 1845–1851

is given as respectively as

dE ¼ Eðf þ ; ti þ dti Þ  Eðf  ; ti  dti Þ Z " 


þ 2
#
df
Z 1"  þ 2 # dE þ ¼ ðf þ  gÞ2 þ m dt
þ 2 df I dt
¼ ðf  gÞ þ m S þ ðtÞ dt
0 dt Z "  2 #
df
Z 1"   2 # ! 2
 ðf  gÞ þ m dt ð10Þ
 2 df  I dt
 ðf  gÞ þ m S ðtÞ dt ,
0 dt
and
Z "  þ 2
#
Z "  #
df df 2
dE ¼ ðf þ  gÞ2 þ m dt 
dE ¼ ðf  gÞ þ m 2
dt
I dt dt
I
Z "   2 # Z "   2 #
df df
 ðf   gÞ2 þ m dt. ð7Þ   2
ðf  gÞ þ m dt. ð11Þ
I dt dt
I

By dti ! 0, Eq. (7) can be approximated as


if ti is a discontinuity point then it can be verified
"  # that dE þ 40 and dE  o0. This implies that
þ 2
dE df
¼ ðf þ  gÞ2 þ m between ti  dti to ti þ dti , there exist a point
dti dt where E is minimised. By dti approaching zero, the
"   2 # point minimising E approaches a discontinuity.
 2 df
 ðf  gÞ þ m . ð8Þ However, if ti is far from any discontinuity,
dt
then it is obvious that f þ ¼ f  ¼ f . Hence
dE þ ¼ dE  ¼ 0, thus implying that E remains
Minimisation of energy functional (1) with constant and hence ti is not a minimiser of the
respect to ti requires that Eq. (8) is set equal to functional. It should be noted that although
zero, i.e.: points far from any discontinuity satisfy Eq. (9),
they are not minimisers of functional (1) and hence
"  þ 2 # are not considered as solutions to our minimisation
þ 2 df
ðf  gÞ þ m problem.
dt
" At this stage, it is interesting to examine the
  2 # behavior of functional (1) and Eq. (5) by varying
df
 ðf   gÞ2 þ m ¼ 0. ð9Þ coefficient m. If m ! 0, then the first term in
dt
functional (1) becomes dominant implying that f i
follows gðtÞ and its fluctuations. However, if
In a neighborhood of the discontinuity, ti satisfying m ! 1, the first term in functional (1) can be
Eq. (9), corresponds to the discontinuity point. ignored and according to Eq. (5), f i is heavily
Geometrical interpretation of Eq. (9) is that ti is the smoothed and can therefore be approximated as a
intersection of the two functions ðf þ  gÞ2 þ line. Eqs. (5), (6) and (9) are the optimised
mðdf þ =dtÞ2 and ðf   gÞ2 þ mðdf  =dtÞ2 in the solutions to the optimisation problem of func-
neighborhood of ti . To clarify Eq. (9), let us tional (1). However, implementation of a non-
consider variations of functional (1) with respect linear equation such as Eq. (9) along with a
to ti in two different cases: (1) when ti corresponds differential equation such as (5) especially in the
to a discontinuity such as the case shown in Fig. 1 presence of noise could be highly complicated and
and 2 when ti is far from any discontinuity. If ti is computationally expensive. An efficient algorithm
varied to ti þ dti and ti  dti , corresponding varia- is therefore proposed in this short communication
tions of functional (1) can be calculated to find the optimal solutions to functional (1) in
ARTICLE IN PRESS

S. Mahmoodi, B.S. Sharif / Signal Processing 85 (2005) 1845–1851 1849

the presence of noise. We initially consider the algorithm is proposed in Section 3 to detect
linear functional: discontinuities. Eq. (5) with boundary conditions
Z "  2 # (6) is then applied to each separate interval to
1 t 2 df obtain the smoothed function f ðtÞ corresponding
Eðf ; SÞ ¼ ðf ðtÞ  gðtÞÞ þ m dt. (12)
2 0 dt to the chosen m. Finally, an adaptive algorithm is
proposed to choose the most optimal m for a given
Using Euler–Lagrange equations [20,21], the
noise level.
optimal solution for the entire time interval is
given by
d2 f ðtÞ 3. Implementation
m ¼ f ðtÞ  gðtÞ. (13)
dt2
The solution to differential equation (13) is a Eq. (13) is initially solved to obtain f ðtÞ which
function f ðtÞ that smooths fluctuations as well as smooths noise as well as discontinuities for an
discontinuities of the original noisy signal gðtÞ. The initial m. The intervals of zero curvature are then
objective in this communication is to detect detected and only one point corresponding to
discontinuities related to the original noisy signal maximum arc length for each interval of zero
using the geometrical properties of the smoothed curvature is chosen as a discontinuity point. Once
function f ðtÞ. There are two geometrical features discontinuity points along the signal are detected
related to the smoothed parts of f ðtÞ correspond- (segmentation step), Eq. (5) is solved for each
ing to discontinuities: interval using the boundary condition (6) to obtain
(1) Arc length variations that are maximised the smoothed signal (noise reduction step). To
with respect to t i.e. [22,23], obtainR t the most optimal m for a given noise, E ¼
pffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi sffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi ð1=tÞ 0 ½ðf ðtÞ  gðtÞÞ2  dt is calculated for different
 2ffi
ds dt2 þ dy2 dy values of m. This process continues by changing m
¼ ¼ 1þ and hence f ðtÞ until E approaches the noise
dt dt dt
variance. In this scheme, with an initial m, if E is
or less than noise variance, m increases, otherwise it
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
ds decreases.
¼ 1 þ ðf 0 Þ2 (14)
dt
is maximised.
(2) Value of the curvature of the smoothed 4. Results
function defined as [22,23]:
The algorithm proposed in Sections 2 and 3 is
f 00 applied for the purpose of time interval segmenta-
Curvðf Þ ¼ qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi (15)
tion and signal smoothing in each interval.
ð1 þ ðf 0 Þ2 Þ3
Fig. 2(top row) shows an original noiseless signal.
varies from a local maximum/minimum to another Gaussian noise is added to this signal to obtain
local minimum/maximum, crossing zero. noisy signals with SNR ¼ 2:1, 1:0 and 0:42 as
The second property might be true for the shown in Fig. 2(middle row). The smoothed
intervals of f ðtÞ corresponding to noise as well. signals using the proposed algorithm are obtained
However, the intervals that correspond to this with m ¼ 100 as depicted in Fig. 2(bottom row).
change of curvature value for discontinuities are The adaptive algorithm to find the most
significantly greater than those for noise. This is optimised m, proposed in Section 3, is applied to
due to the fact that the local mean of the original some noisy signals contaminated with Gaussian
noisy signal changes in discontinuities, whereas it noise. The results are depicted in Fig. 3. Gaussian
remains unchanged or slightly changed in intervals noise is added to three different original noiseless
characterised by noise only. Based on the mathe- signals, shown in Fig. 3, to obtain noisy signals
matical background discussed in this section, an with SNR ¼ 0:9. The smoothed signals are
ARTICLE IN PRESS

1850 S. Mahmoodi, B.S. Sharif / Signal Processing 85 (2005) 1845–1851

5. Conclusion

An efficient method is presented in this short


communication for signal segmentation and noise
reduction based on an energy optimisation meth-
od. Geometrical properties such as curvature and
maximum arc length of the smoothed signal are
employed to detect discontinuity points. Once
discontinuities are detected, signal is smoothed
for each time interval by solving the appropriate
differential equations. This method can be general-
ised to 2D images by employing geometrical
features of surfaces to detect discontinuities as
object edges. However, contour length minimisa-
tion should also be taken into consideration to
satisfy the Mumford–Shah functional require-
ments.

Fig. 2. Original noiseless signal (top row), noisy signals


contaminated with Gaussian noise with SNR ¼ 2:1, 1.0 and References
0.42 (middle row) and their corresponding smoothed signals
with m ¼ 100 (bottom row). [1] A.N. Tikhonov, V.Y. Arsenin, Solutions of Ill-Posed
Problems, Winston & Sons, Washington, DC, 1977.
[2] L. Rudin, S. Osher, E. Fatemi, Nonlinear total variation
based noise removal algorithms, Physica D 60 (1992)
259–268.
[3] W. Hinterberger, M. Hintermuller, K. Kunisch, M. von
Oehsen, O. Scherzer, Tube methods for BV regularization,
J. Math. Imaging Vision 19 (2003) 219–235.
[4] M. Kass, A. Witkin, D. Terzopoulos, Snakes: active
contour models, J. Comput. Vision 1 (1987) 321–331.
[5] G. Aubert, P. Kornprobst, Mathematical Problems in
Image Processing: Partial Differential Equations and the
Calculus of Variations, Springer-Verlage, New York, 2002.
[6] J.M. Morel, S. Solimini, Variational Methods in Image
Segmentation, Birkhauser, Boston, 1995.
[7] D. Mumford, J. Shah, Optimal approximations by
piecewise smooth functions and associated variational
problems, Commun. Pure Appl. Math. 42 (4) (1989)
577–688.
[8] L. Ambrosio, V.M. Tortorelli, Approximation of func-
tionals depending on jumps by elliptic functionals via G-
convergence, Commun. Pure Appl. Math. XLIII (1990)
Fig. 3. Original noiseless signals (left column), noisy signals 999–1036.
contaminated with Gaussian noise with SNR ¼ 0:9 (middle [9] A. Braides, Approximation of Free-Discontinuity Pro-
column) and smoothed signals (right column) with optimised blems, Lecture Notes in Mathematics, vol. 1694, 1998.
m ¼ 225 (top), m ¼ 280 (middle) and m ¼ 265 (bottom). [10] A. Braides, G. Dal Maso, Non-local approximation of the
Mumford–Shah functional, Calc. Var. Partial Differential
Equations 5 (4) (1997) 293–322.
[11] A. Chambolle, Image segmentation by variational meth-
obtained by applying the adaptive algorithm as ods: Mumford and Shah Functional and the discrete
depicted in the same figure, resulting in optimised approximation, SIAM J. Appl. Math. 55 (3) (1995)
values for m (see Fig. 3). 827–863.
ARTICLE IN PRESS

S. Mahmoodi, B.S. Sharif / Signal Processing 85 (2005) 1845–1851 1851

[12] T.F. Chan, L.A. Vese, Active contours without edges, [17] M. Gobbino, Finite difference approximation of the
IEEE Trans. Image Process. 10 (2) (2001) 266–277. Mumford–Shah functional, Commun. Pure Appl. Math.
[13] M. Hintermuller, W. Ring, An inexact-CG type active 51 (2) (1998) 197–228.
contour approach for the minimization of the Mumford– [18] E. Mammen, S. van de Geer, Locally adaptive regression
Shah functional, J. Math. Imaging Vision 20 (2004) 19–42. splines, Ann. Statist. 25 (1997) 387–413.
[14] T.J. Richardson, Scale independent piecewise smooth [19] J.L. Melsa, A.P. Sage, An Introduction to Probability and
segmentation of images via variational methods, Ph.D. Stochastic Processes, Prentice-Hall Inc., Englewood Cliffs,
Dissertation, Department of Electrical Engineering and NJ, 1973.
Computer Science, Mass Institute of Technology, 1989. [20] I.M. Gelfand, S.V. Fomin, Calculus of Variations,
[15] A. Tsai, A. Yezzi, A.S. Willsky, Curve evolution imple- Prentice-Hall Inc., Englewood Cliffs, NJ, 1963.
mentation of the Mumford–Shah functional for image [21] U.B. Manderscheid, Introduction to the Calculus of
segmentation, denoising interpolation and magni- Variations, Chapman & Hall, London, 1991.
fication, IEEE Trans. Image Process. 10 (8) (2001) [22] M.P. Carmo, Differential Geometry of Curves and
1169–1186. Surfaces, Prentice-Hall Inc., Englewood Cliffs, NJ, 1976.
[16] G. Congedo, I. Tamanini, On the existance of solutions to [23] M.M. Lipschutz, Theory and Problems of Differential
a problem in multidimensional segmentation, Ann. Inst. Geometry, Schaum’s Outline Series, McGraw-Hill,
Henri Poincare 8 (2) (1991) 175–195. New York, 1969.

Вам также может понравиться