You are on page 1of 7

# Polynomial approximation of 1D signal

Pi19404
February 5, 2014

Contents

Contents
Polynomial approximation of 1D signal
0.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 0.2 Local Subspace Approximation Through Convolution 0.3 Polynomial Approximation of 1D signal . . . . . . . . . . . References . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

3
3 3 3 6

2 | 7

## Polynomial approximation of 1D signal

0.1 Introduction
In this article we will look at the concept for polynomial expansion to approximate a neighborhood of a pixel with a polynomial.

## 0.2 Local Subspace Approximation Through Convolution

      

Given a discrete signal s(k ) and filter h(k ) with N taps we can use convolution to compute the filter response h = s f This can be also interpreted as an inner product
h(k )

## =< s(k + l); f (

)
l

>

This provides direct interpretation of convolution as projection operation Convolving s(k ) with a series of filters fm (l) gives corresponding filter response hm (k ). These filter responses can be interpreted as projection of the signal onto local filter basis. For M filters of length N ,the basis matrix B is of size
N xM

If we consider a polynomial basis 1; x; x2 ,the project can be considered as taylors series approximation of signal till order 2.

3 | 7

f (x) x

Ax

+b

+c

## where A is a symmetric matrix,b is a vector and c is a scalar

            

The coefficients can be estimated by weighted least square estimate of pixel values about neighborhood. Let us consider a sinusoidal signal which needs to be approximated locally using a polynomial function. Let us consider a polynomial of order.The basis functions of the subspace where the local signal is being approximated are 1; x; x2 The basis function are defined on the discrete grid of -N to N considering a window/neighborhood of (2 N + 1) ,for the present example let N=3; using standard least square estimate we can estimate polynomial expansion of a signal about a neighborhood The larger the neighborhood ,more samples we have,but it will be more difficult to fit a general function over this large neighborhood. Let us consider an example
y (t)

= 5x2 + 10x + 3 0

## we have sampled the signal at discrete intervals of 1 from

99

Let us consider a gaussian basis with variance 1 and neighborhood size of (2 N + 1) as the interpolation function.

## 0:2741 0:4519 0:2741

Let us consider the first sample of signal and perform polynomial approximation about the neighboorhood The coefficients we obtain are basis [1xx2 ]
[18205]

corresponding to the

Here we have considered x to lie between 1to1,thus in the equation 5x2 + 20x + 18 we need to replace x by x 1 Doing which we obtain
5x

1)2 + 20( 1) + 18 2 10 + 5 + 20 20 + 18
5(x
x x x

5x + 10x + 3

4 | 7

## Thus we have estimated the signal properly

k = linspace(0,99,100); %orignal signal s = (5*k.^2)+(10*k)+3;%sin(k/10); %s=s'; figure(1);plot(s); %neighborhood size N=3; delta=N-1/2; x=(-delta:delta)'; %basis functions b0=ones(delta,1); b1=x; b2=x.^2; figure(2); subplot(4,1,1);plot(b0,'-o'); subplot(4,1,2);plot(b1,'-o'); subplot(4,1,3);plot(b2,'-o'); %filter or applicabilty function ax = exp(-x.^2/2); ax=ax./sum(ax); figure(2); subplot(4,1,4);plot(ax,'-o'); f0 = b0.*ax; f0 = f0(end:-1:1); f1 = b1.*ax; f1 = f1(end:-1:1); f2 = b2.*ax; f2 = f2(end:-1:1); figure(3); subplot(3,1,1);plot(f0,'-o'); subplot(3,1,2);plot(f1,'-o'); subplot(3,1,3);plot(f2,'-o'); %computing the coefficient of polynomial basis h0 = conv(s,f0,'same'); h1 = conv(s,f1,'same'); h2 = conv(s,f2,'same'); %least square estimate G0 = diag(ax);

5 | 7

## Polynomial approximation of 1D signal

B = [b0 b1 b2]; G = B'*G0*B; G=G./max(max(G)); hx=[h0;h1;h2]'; c11 = inv(G)*hx'; figure(4); subplot(3,1,1);plot(c11(1,:)) subplot(3,1,2);plot(c11(2,:)) subplot(3,1,3);plot(c11(3,:)) %display local approximation at sample 2 c11(2,:)

## (a) Basis and applicability

6 | 7

Bibliography

Bibliography
[1] Kenneth Andersson and Hans Knutsson.  Continuous normalized convolution. In: ICME (1). IEEE, 2002, pp. 725728.

[2]

isbn:

0-7803-7304-9.

url: http://

Kenneth Andersson, Carl-Fredrik Westin, and Hans Knutsson.  Prediction from 87.3 (Mar. 22, 2007), pp. 353365. url: http://dblp.uni- trier.de/db/ journals/sigpro/sigpro87.html#AnderssonWK07. o-grid samples using continuous normalized convolution. In: Signal Processing

[3]

Gunnar Farnebck.  Motion-based Segmentation of Image Sequences. LiTH-ISYEX-1596. MA thesis. SE-581 83 Linkping, Sweden: Linkping University, 1996.

[4]

Gunnar Farnebck.  Polynomial Expansion for Orientation and Motion Estimation. Dissertation No 790, ISBN 91-7373-475-6. PhD thesis. SE-581 83 Linkping, Sweden: Linkping University, Sweden, 2002.

[5]

Gunnar Farneback.  Two-Frame Motion Estimation Based on Polynomial Expansion. In: SCIA. LNCS 2749. Gothenburg, Sweden, 2003, pp. 363370.

7 | 7