kalman filter - applications in image processing

24
KALMAN FILTER Applications in Image processing

Upload: ravi-teja

Post on 07-May-2015

8.215 views

Category:

Education


1 download

TRANSCRIPT

Page 1: Kalman filter - Applications in Image processing

KALMAN FILTER Applications in Image processing

Page 2: Kalman filter - Applications in Image processing

Introduction

• The kalman filter is a recursive state space model based estimation algorithm.

• This filter is named after Rudolph E. Kalman, who in 1960 published his famous paper describing a recursive solution to the discrete data linear filtering problem (Kalman 1960).

• This algorithm was basically developed for single dimensional and real valued signals which are associated with the linear systems assuming the system is corrupted with linear additive white Gaussian noise.

Page 3: Kalman filter - Applications in Image processing

• The Kalman filter addresses the general problem of trying to estimate the state x ∈ ℜn of a discrete-time controlled process that is governed by the linear difference equation

xk = Axk – 1 + Buk – 1 + wk – 1

• with a measurement z that is

zk = Hxk + vk

• The random variables wk and vk represent the process noise and measurement noise respectively.

Page 4: Kalman filter - Applications in Image processing

• The nxn matrix A in the previous difference equation relates the state at the previous time step k-1 to the state at the current step k , in the absence of either a driving function or process noise.

• The nxl matrix B relates the optional control input u to the state x.

• The mxn matrix H in the measurement equation relates the state to the measurement zk.

Page 5: Kalman filter - Applications in Image processing

The Computational Origins of the Filter :

• We define𝑥 𝑘−∈ℜn to be our a priori state

estimate at step k given knowledge of the process prior to step k , and 𝑥 𝑘∈ℜn to be our a posteriori state estimate at step k given measurement zk.

• We can then define a priori and a posteriori estimate errors as

𝑒𝑘− ≡ 𝑥𝑘 − 𝑥 𝑘

− & 𝑒𝑘 ≡ 𝑥𝑘 − 𝑥 𝑘

Page 6: Kalman filter - Applications in Image processing

• The a priori estimate error covariance is then

𝑃𝑘− = 𝐸 𝑒𝑘

−𝑒𝑘−𝑇

&

• the a posteriori estimate error covariance is

𝑃𝑘 = 𝐸 𝑒𝑘𝑒𝑘𝑇

• The posteriori state estimate 𝑥 𝑘 is written as a linear combination of an a priori estimate 𝑥 𝑘

− and a weighted difference between an actual measurement zk & a measurement prediction H 𝑥 𝑘

−.

Page 7: Kalman filter - Applications in Image processing

. 𝑥 𝑘 = 𝑥 𝑘

− + 𝐾 𝑧𝑘 − 𝐻𝑥 𝑘−

• The difference 𝑧𝑘 − 𝐻𝑥 𝑘

− is called the measurement innovation, or the residual.

• The nxm matrix K is chosen to be the gain or blending factor that minimizes the a posteriori error covariance.

• Substituting 𝑥 𝑘 in 𝑒𝑘 and 𝑒𝑘 in Pk , and performing minimization, we get

𝐾𝑘 =𝑃𝑘

−𝐻𝑇

𝐻𝑃𝑘−𝐻𝑇 + 𝑅

= 𝑃𝑘−𝐻𝑇 𝐻𝑃𝑘

−𝐻𝑇 + 𝑅 −1

Page 8: Kalman filter - Applications in Image processing

Kalman filter algorithm

• The Kalman filter estimates a process by using a form of feedback control: the filter estimates the process state at some time and then obtains feedback in the form of (noisy) measurements.

• As such, the equations for the Kalman filter fall into two groups: time update equations and measurement update equations.

• The time update equations are responsible for projecting forward (in time) the current state and error covariance estimates to obtain the a priori estimates for the next time step.

Page 9: Kalman filter - Applications in Image processing

• The measurement update equations are responsible for the feedback—i.e. for incorporating a new measurement into the a priori estimate to obtain an improved a posteriori estimate.

• The time update equations can also be thought of as predictor equations, while the measurement update equations can be thought of as corrector equations.

• The final estimation algorithm resembles that of a predictor-corrector algorithm.

Page 10: Kalman filter - Applications in Image processing
Page 11: Kalman filter - Applications in Image processing

Discrete Kalman filter time update equations:

𝑥 𝑘− = 𝐴𝑥 𝑘−1 +𝐵𝑢𝑘−1

𝑃𝑘− = 𝐴𝑃𝑘−1𝐴

𝑇 + 𝑄

𝐾𝑘 = 𝑃𝑘−𝐻𝑇 𝐻𝑃𝑘

−𝐻𝑇 + 𝑅 −1

𝑥 𝑘 = 𝑥 𝑘− + 𝐾𝑘 𝑧𝑘 − 𝐻𝑥 𝑘

𝑃𝑘 = 𝐼 − 𝐾𝑘𝐻 𝑃𝑘−

Discrete Kalman filter measurement update equations:

Prediction

Correction

Page 12: Kalman filter - Applications in Image processing

A complete picture of the operation of the Kalman filter

Page 13: Kalman filter - Applications in Image processing

Implementation

• The image process is modelled as an auto regressive(AR) process driven by a white gaussian noise (Wn) with variance Q described by

• Mathematically it can be written as

𝑦 𝑖, 𝑗= 𝑎1𝑦 𝑖, 𝑗 − 1 + 𝑎2𝑦 𝑖 − 1, 𝑗+ 𝑎3𝑦 𝑖 − 1, 𝑗 − 1 + 𝑎4𝑦(𝑖 − 1, 𝑗 + 1)

Page 14: Kalman filter - Applications in Image processing

• The state space model for this system can be written as

𝑋𝑛+1 = 𝐴𝑋𝑛 + 𝑉𝑛 𝑍𝑛 = 𝐻𝑋𝑛 + 𝑊𝑛

where

𝐴 =

𝑎1 𝑎2 𝑎3 𝑎41 0 0 00 1 0 00 0 1 0

& 𝑋𝑛 =

𝑦(𝑖, 𝑗 − 1)𝑦(𝑖 − 1, 𝑗)

𝑦(𝑖 − 1, 𝑗 − 1)𝑦(𝑖 − 1, 𝑗 + 1

Page 15: Kalman filter - Applications in Image processing

Results

Original Images Measured Images Corrected Images

Page 16: Kalman filter - Applications in Image processing

Extended Kalman Filter

• An extended Kalman filter is used if the process to be estimated and (or) the measurement relationship to the process is non-linear.

• Here 𝑥𝑘 = 𝑓 𝑥𝑘−1, 𝑢𝑘−1, 𝑤𝑘−1

• with measurement z that is

𝑧𝑘 = ℎ 𝑥𝑘, 𝑣𝑘

Page 17: Kalman filter - Applications in Image processing

• Similar to the Kalman filter, the time and measurement equations for EKF can be written as below:

• EKF time update equations:

• EKF measurement update eqns:

Page 18: Kalman filter - Applications in Image processing
Page 19: Kalman filter - Applications in Image processing

A complete picture of the operation of the extended Kalman filter

Page 20: Kalman filter - Applications in Image processing

Results

Original Image Measured Image Corrected Image

Page 21: Kalman filter - Applications in Image processing

COMPLEX KALMAN FILTERING

• In complex Kalman filtering, image model is represented in complex form as real and imaginary values represented as real and imaginary part of the complex number.

Y= Real+(imag)i

• where, Y is complex image model.

• Complex valued Kalman filters have been used extensively in a variety of applications, including frequency estimation of time-varying signals, training of neural networks etc.

Page 22: Kalman filter - Applications in Image processing

Properties of Kalman filter

• Kalman filter is a time-varying filter as Kalman gain changes with n.

• The filter is very powerful in several aspects: it supports estimations of past, present, and even future states, and it can do so even when the precise nature of the modeled system is unknown.

• In the Kalman filter, prediction acts like the prior information about the state at time n before we observe the data at time n.

Page 23: Kalman filter - Applications in Image processing

Refernces

• Natasha Devroye. Estimation: parts of Chapters 12-13,

Wiener and Kalman Filtering.

• Greg Welch and Gary Bishop. An Introduction to the

Kalman Filter, Monday, July 24, 2006.

• R. E. KALMAN. A New Approach to Linear Filtering and

Prediction Problems.

• http://www.cs.unc.edu/~welch/kalman/

Page 24: Kalman filter - Applications in Image processing