Nonlinear L1 C 1 Interpolation: Application to Images E. Nyiri, O. Gibaru, and Ph. Auquiert Arts et M´etiers ParisTech, L2MA, 8 bd Louis XIV, 59046 Lille Cedex, France
[email protected],
[email protected] http://www.l2ma.fr
Abstract. In this article, we address the problem of interpolating data points lying on a regular grid by C 1 -continuous L1 -bicubic spline surfaces. Our algorithm is based on a local univariate L1 minimization method which enable us to calculate first derivative values for C 1 -cubic spline curves. In order to construct the interpolation surface, we calculate four derivative values at each data point using this local method. At is was shown in [17], our local interpolation L1 cubic spline curve algorithm preserves well the shape of the data even for abrupt changes.The sequential computational complexity of this local method is linear and the parallel computational complexity is O(1). Consequently, we can address in this manner data on large grids. In order to keep this linear complexity for spline surface interpolation, we define an interpolation scheme based on four linear directions so as to construct our L1 -bicubic surface. Some image interpolation examples show the efficiency of this non linear interpolation scheme. Keywords: L1 spline, interpolation, shape preserving, images.
Introduction A common requirement in data interpolation is that curves or surfaces obtained ”preserve shape”, which means they express the geometric properties of the interpolated data in accordance with human perception. These geometric properties are variously interpreted as linearity, monotonicity, convexity and smoothness. Conventional 2D splines, which are calculated by minimizing the square of the L2 norm of the second partial derivatives of a cubic piecewise polynomial interpolant, represent sufficiently ”smooth” data quite well. However, they often have extraneous, nonphysical oscillations when used for interpolation of data with abrupt changes. Recently, a new kind of splines called cubic L1 splines has arisen, cf. [4, 5, 6, 8, 11, 13]. Cubic L1 splines, which are calculated by minimizing the L1 norm of the second derivatives of a C 1 -smooth piecewise cubic interpolant, ”preserve the
J.-D. Boissonnat et al. (Eds.): Curves and Surfaces 2011, LNCS 6920, pp. 515–526, 2011. c Springer-Verlag Berlin Heidelberg 2011
516
E. Nyiri, O. Gibaru, and Ph. Auquiert
Fig. 1. L2 (dotted line) versus L1 (solid line) global interpolations
shape” of data with abrupt changes (cf. [10] [12]) as we can see in Figure 1. In [17], we show that our local cubic L1 spline interpolation algorithm preserves linear parts and does not produce Gibbs phenomena. The advantageous properties of L1 splines in univariate situations suggest that L1 splines may have advantages in bivariate situations also, so we have decided to extend our local algorithm to bivariate interpolation for images. This bicubic model can be used for image applications like resampling [19, 24, 7] or warping [18]. The L1 splines are generated by minimizing a nonlinear functional, cf. [10, 14, 15]. Since nonlinear programming procedures for minimizing the L1 spline functional are not yet practical for global data interpolation, a discretization of this functional is commonly used. Minimization of the discretized L1 spline functional which is a nonsmooth convex programming problem, leads to solving of an overdetermined linear system that can be reduced to a linear program for which many methods are available(cf. [16], [23], [20], [21], [22]). The drawback of this global minimization is the calculation time which can be very important for big data sets. We introduce a local univariate minimization method based on a sliding window defined over five points so as to smoothly interpolate data points. This local method allows us to define a fast computational algorithm based on analytically minimizing the L1 spline functional over only five data points. Furthermore, we showed in [2] that a five-point window allows us to preserve the linear parts of the data points while in general the global method does not satisfy this property. This paper is organized as follows. In Section 1, we give some results concerning C 1 -continuous cubic L1 spline interpolation on five points. Based on these results, we have defined a new interpolation strategy with a sliding five points window to create a local L1 C 1 interpolating method. In Section 2, we use this univariate method so as to construct bicubic spline surfaces. By applying our L1 C 1 interpolating algorithm to regular data grids in four directions, we generate a set of derivative values at each data point. We show the efficiency of this method by applying continuous transformations on some images.
1
Local L1 Cubic Spline Minimization
The C 1 interpolating cubic spline curve is calculated by minimizing the L1 −norm of the second derivative vector of the spline. Let a = u1 < u2 < · · · < un = b be
Nonlinear L1 C 1 Interpolation: Application to Images
517
an arbitrary and strictly monotonic partition of the finite real interval [a, b]. If we denote by Δ the classical forward difference operator, we showed in [1] that the solution to this problem is obtained by minimizing the following functional
E(T1 , . . . , Tn ) =
n−1 i=1
1 2 −1 2
ΔTi + 6t(Ti+1 + Ti − 2
ΔPi )1 dt Δui
(1)
where the Ti ∈ IRd are the first order derivative vectors at points Pi for i = 1, . . . , n. As E(T1 , . . . , Tn ) is not strictly convex, then its minima are not necessarily unique. To reduce the set of solutions, Lavery in [10] added a ”regularization” term so as to select the derivative vectors Ti which are as short as possible in the L1 -norm. Consequently, a global C 1 -continuous cubic L1 spline is obtained by minimizing the following functional
E(T1 , . . . , Tn ) + ε
n
|Ti |,
(2)
i=1
where ε is a strictly positive real. As this problem is also nonlinear, this functional is discretized by using the midpoint rule method for each integral. The resulting problem raised by the L1 -minimization of linear system is solved by the Vanderbei, Meketon and Freedman primal affine algorithm defined in [23] and outlined in [12]. This algorithm was improved in [25] in order to reduce the calculation time. Nevertheless for big data sets, global calculus is prohibited. Thanks to this fact, we have calculated the exact solutions to this minimization problem (1) on a set of five data points. To do so, let us study the three-point case. 1.1
Univariate Cubic L1 C 1 Interpolation over Three Points
The following lemma gives the exact solution to the minimization of (1) with n = 3. Let (ui , zi )i=1,2,3 be three couples of real values where u1 < u2 < u3 and the Δzi slopes be defined by hi = Δu for i = 1, 2. The solution of the minimization i problem ϕh1 ,h2 (x) =
min
2
(b2 ,b3 )∈IR
Φ(b1 , b2 , b3 )
(3)
with Φ(b1 , b2 , b3 ) =
1 2 −1 2
|Δb1 +6t(b2 +b1 −2h1 )|dt+
1 2 −1 2
|Δb2 +6t(b3 +b2 −2h2 )|dt, (4)
518
E. Nyiri, O. Gibaru, and Ph. Auquiert
where b1 , b2 and b3 are the first derivative values at the three points is √
a) if b1 is comprised between h1 + 10+1 3√ (h2 − h1 ) and h1 then √ √ 10−1 b2 = h1 + 3 (b1 − h1 ) , b3 = h2 + 10−5 (h1 − h2 ) + 5−25 10 (b1 − h1 ) , 5 √
10−5 b) if b1 is comprised between h1 and h√ (h2 − h1 ) then 1+ 5 √ 5+ 10 10−5 b2 = h1 − 3 (b1 − h1 ) , b3 = h2 + 5 (h1 − h2 ) + (b1 − h1 ) ,
c) otherwise b2 = b3 = h2 . (5) This was demonstrated in [17]. For the five point algorithm defined hereafter, we need to calculate the subdifferential of this continuous convex function. Let us define the following functions: 2
2 −h1 −x) ϕ1h1 ,h2 (x) = − 32 (x + h2 − h1 ) − (h 6(x+h2 −h1 ) , √ √ √ 2( 10−1) 2( 10−1) 3 ϕ2h1 ,h2 (x) = 8−43 10 x + (h − h ) , ϕ (x) = (h1 − h2 ) , 1 2 h1 ,h2 3 3 4 1 5 6 1 ϕh1 ,h2 (x) = ϕh1 ,h2 (x) , ϕh1 ,h2 (x) = x − h2 + h1 , ϕh1 ,h2 (x) = −ϕh1 ,h2 (x) .
Consequently, we can infer that k−1 k k , ϕh1 ,h2 (x) = σϕkh1 ,h2 (x) if x ∈ min σxk−1 h1 ,h2 , σxh1 ,h2 , max σxh1 ,h2 , σxh1 ,h2 (6)
where σ = {1 if h2 − h1 ≥ 0 and −1 otherwise} and √ (h2 − h1 ) , x2h1 ,h2 = 0, x3h1 ,h2 = x0h1 ,h2 = −∞, x1h1 ,h2 = 10+1 3 1 4 5 xh1 ,h2 = − 2 (h2 − h1 ) , xh1 ,h2 = −2 (h2 − h1 ) , x6h1 ,h2 = +∞.
√ 10−5 5
(h2 − h1 ) , (7)
1.2
Univariate Cubic L1 C 1 Interpolation over Five Points
Let (ui , zi )i=1,...,5 be five couples of real values where u1 < · · · < u5 and the Δzi slopes be defined by hi = Δu for i = 1, . . . , 4. Hence, the univariate L1 C 1 spline i solution is obtained from min
4 5
(b1 ,...,b5 )∈IR i=1
1 2 −1 2
|Δbi + 6t(bi+1 + bi − 2hi )|dt
where the bi are the derivative values of the spline at ui . This functional is the sum of positive and convex continuous functions. It can be written by minb3 ∈IR min(b ,b )∈IR2 Φ(b3 , b2 , b1 ) + min(b ,b )∈IR2 Φ(b3 , b4 , b5 ) 2 1 4 5 (8) = minb3 ∈IR (ϕh2 ,h1 (b3 − h2 ) + ϕh3 ,h4 (b3 − h3 ))
Nonlinear L1 C 1 Interpolation: Application to Images
519
where Φ is defined by (4). Let us denote by ∂ϕhi ,hj (x) the subdifferential of ϕhi ,hj (x) at x (cf. [3], [9]). Since (8) is convex and continuous, its subdifferential is compact and nonempty. We define dg (x) = min ∂ϕh2 ,h1 (x − h2 ) + min ∂ϕh3 ,h4 (x − h3 ) and dd (x) = max ∂ϕh2 ,h1 (x − h2 )+max ∂ϕh3 ,h4 (x − h3 ) respectively the left and right derivative values of (8) at x. As function (8) is convex the minimal value is obtained for any b3 such that dg (b3 ).dd (b3 ) ≤ 0. Consequently, the algorithm needed to define b3 is 5 – create {βk }k=1...10 = sorted list from the abscissa xjh3 ,h4 +h3 , xjh2 ,h1 +h2
j=1
– calculate α1 = 1) < 0) – calculate α2 =
min
(βk such that dg (βk )dd (βk ) ≤ 0 or dd (βk )dg (βk +
max
(βk such that dg (βk )dd (βk ) ≤ 0 or dd (βk −1)dg (βk )