Shifted Linear Interpolation Filter

Linear interpolation has been adapted in many signal and image processing applications due to its simple implementation and low computational cost. In standard linear interpolation the kernel is the second order B-spline   2 β t. In this work we show that the interpolation error can be remarkably diminished by using the time-shifted B-spline   2 β t-Δ as an interpolation kernel. We verify by experimental tests that the optimal shift is 0.25 Δ =. In VLSI and microprocessor circuits the shifted linear interpolation (SLI) algorithm can be effectively implemented by the z-transform filter. The interpolation error of the SLI filter is comparable to the more elaborate higher order cubic convolution interpolation.


Introduction
Linear interpolation plays an important role in modern signal and image processing applications due to its simple implementation and low computational cost.Plonka [1,2] has extensively studied the effect of the shifted interpolation nodes on the approximation error in the Bspline interpolation.According to the theoretical analysis the shift 0   yields the minimal error norm.Blu et al. [3] applied the same idea to the piecewise-linear interpolation.On the contrary, they observed that interpolation error diminishes if the sampling knots are shifted by a fixed amount.Through the theoretical considerations Blu et al. [3] determined the optimal shift of the knots is close to 1/ 5   of the distance between the knots.In this work we consider a modification of the linear interpolation.In standard linear interpolation the kernel is the second order B-spline 2 ( ) t  .Instead of shifting the sampling knots we introduce the shifted linear interpolation (SLI), where the B-spline kernel has been time-shifted by a fraction  of the sampling period.We describe the z-transform SLI filter for efficient implementation of the shifted B-spline kernel 2 ( ) t    especially for VLSI and microprocessor circuits.

B-Spline Signal Processing
B-spline approximation of the continuous signal   where   c k are the scale coefficients.The B-spline where The linear interpolation is obtained in the case where  is the triangle function Figure 1 defined as 2 for 0 t<1 ( ) 2 for 1 t 2 0 elsewhere

Shifted Linear Interpolation
Let us consider the approximation of the continuous-time signal   x t by a summation of the shifted B-spline This work was supported by the National Technology Agency of Finland (TEKES).where     , , 0,1 c k   is the scale sequence for the time-shifted kernel.In the sequel we call (6) the shifted linear interpolation (SLI).Usually the data points are known in discrete time intervals The SLI filter is now obtained from (6) as By inserting the scale sequence   where denotes the SLI filter.

Inverse SLI Filter
In some applications it is required that the original signal has to be reconstructed from the delayed one.In the general case the SLI filter ( 9) has no stable inverse since the roots of the nominator may lie outside the unit circle.For 0.25   the roots are inside the unit circle in the range 0 0.25 d   . The inverse SLI filter can be realized by the inverse filtering procedure described in Appendix I.

Experimental Verification of the SLI Algorithm
We tested experimentally the quality of the SLI filter for a variety of synthetic signals with varying frequency components.The interpolation error was defined as the absolute difference between the analytically calculated and interpolated signal: The timeshift of the interpolation kernel was altered in the range 0 1    .The interpolation error was strongly related to the time-shift.Irrespective of the type of the signal the minimum interpolation error was obtained in every case at 0.25   . Figure 2 shows an example of the interpolation error versus  for signal   sin 0.1 t , when 0.5 d  . The worst case is the linear interpolation  the magnitude response of the SLI filter turns to high-pass and tends to intensify the noise occurring in high frequency range.As a practical solution the interpolated signal can be time-reversed and 1 d  can be inserted instead of d in the SLI algorithm.

Half Delay Filter
An interesting application of the SLI is the half delay filter, which delays the signal half of the sampling period and interpolates the intermediate points between the evenly spaced knots.For 0.25   and 0.5 which is an all-pass filter having the unity magnitude response.The interpolation error of the half delayed filter (11) is especially low Figure 2. Figure 4 shows the phase response and the phase error compared with the ideal phase response.

Comparison with the Cubic Convolution Interpolation
The absolute interpolation error using the cubic convolution method [5] and the SLI-algorithm for signals

Discussion
The linear interpolation has been used in many microprocessor and VLSI applications due to its simple and fast implementation.The new approaches based on higher degree B-spline interpolation kernels [6][7][8] suffer from computational complexity and usually require the timereversed inverse filtering procedure, which is not possible to implement in real-time.In this work we examined the shifted linear interpolation, which outperforms the standard linear interpolation Figure 2. The SLI algorithm can be implemented via the z-transform filter (9) with integer coefficients.The interpolation error of the SLI filter is comparable to the more elaborate cubic convolution interpolation Figures 5,6, which is a standard image and signal processing tool.The computational complexity of the   in (7).This leads to the definition of the SLI filter (9).As a sur-prising experimental observation of the SLI algorithm is the strong dependence of the interpolation error on the time shift  .Our comparisons using a variety of functions with different waveforms and frequency content showed that every time the interpolation error attains its minimum at 0.25   . Previously Plonka [1,2] has studied the B-spline interpolation with shifted nodes.In the theoretical analysis the shift parameter 0   yielded the minimal error norm.Blu et al. [3] conducted theoretically the piecewise-linear interpolation error versus the shift  in the measurement knots.Their analysis predicted the optimal choice 0.21 . Blu et al.
[3] used a pre-filter to shift the measurement knots and then the standard piecewise linear interpolation for computation of the interpolated signal.An advantage in this procedure is that the prefiltered signal can be directly implemented by any existing linear interpolation hardware, while the implementation of the SLI filter needs a new hardware design.
An essential observation in this work is that the SLI filter has low-pass frequency response characteristics only in the range 0 0.5 d   . For 0.5 d  the frequency response of the SLI filter turns to high-pass and intensifies the noise occurring in high frequency range.The noise interference for 0.5 d  can be avoided by time reversing the interpolated signal.Then 1 d  can be inserted instead of d in the SLI algorithm.
A shortcoming in the SLI algorithm is the phase error occurring in the high frequency range compared with the linear interpolation.Fortunately, in most of the signal processing applications the signal is band limited and the high frequency band 2     contains only some noise components.
An interesting observation is that for 0.5 d  and 0.25   the half delay SLI algorithm reduces to the simple all-pass filter (10), which has the unity magnitude response and the phase response is close to the ideal phase response in the range 0  1 bandwidth is limited to this range the SLI algorithm yields interpolation precision and accuracy, which is comparable to the more elaborate interpolation methods.The interpolation of intermediate points between the uniformly distributed knots is probably the most frequently used operation is image and signal processing.
The half delay filters are also important tools in construction of shift invariant wavelet transform [9].The half delay SLI filter (10) can be readily applied to replace the more elaborate half delay filters based on the Thiran filters [10].For 0 0.25 d   and 0.25   the SLI filter has a stable inverse.If the original data points have to be reconstructed from the interpolated ones, the inverse SLI filter for higher values of d can be realized by using the inverse filtering procedure (Appendix I).

Conclusions
In signal and image processing applications linear interpolation has been frequently used due to its simple implementation and low computational cost.In standard linear interpolation the kernel is the second order B-spline


. We show in this work that the interpolation error can be remarkably reduced by adapting the time-shifted B-spline    as an interpolation kernel.By experimental tests we verify that the optimal shift is 0.25   . The shifted linear interpolation (SLI) algorithm can be effectively implemented by the z-transform filter in VLSI and microprocessor applications.The interpolation error of the SLI filter is comparable to the more elaborate cubic convolution interpolation.The future research goal is to extend the time-shifted interpolation kernel to higher order B-splines.
Appendix I. Implementation of the inverse filter    , since the root in the denominator is outside the unit circle.However, the inverse filter can be implemented by the following inverse filtering procedure.First we replace z by z -1 The inverse filter  

Figure 2 .
Figure 2. Interpolation error of function

2 
 the quality of the SLI algorithm equals the cubic convolution.

Figure 4 .
Figure 4. Comparison of the phase responses of the piecewise-linear interpolation and the SLI filter(d = 0.5, 0.25 Δ =).

Figure 5 .
Figure 5.The absolute interpolation error yielded by the SLI algorithm (d = 0.5, 0.25 Δ = ) and the cubic convolution interpolation for the sinusoidal signal     x n = sin n .

Figure 6 .
Figure 6.The absolute interpolation error yielded by the SLI algorithm (d = 0.5, 0.25 Δ = ) and the cubic convolution interpolation for the sinusoidal signal     2 x n = sin n .