Restoration

20
2007 Theo Schouten 1 Restoration With Image Restoration one tries to repair errors or distortions in an image, caused during the image creation process. In general our starting point is a degradation and noise model: g(x,y) = H ( f(x,y) ) + (x,y) Determined by quality of equipment and image taking conditions: •image restoration is computationally complex •equipment as degradation free as possible •seen technical and financial limitations •medical: low radiation, little time in magnet-tube

description

Restoration. With Image Restoration one tries to repair errors or distortions in an image, caused during the image creation process. In general our starting point is a degradation and noise model: g(x,y) = H ( f(x,y) ) +   (x,y) - PowerPoint PPT Presentation

Transcript of Restoration

Page 1: Restoration

2007 Theo Schouten 1

Restoration

With Image Restoration one tries to repair errors or distortions in an image, caused during the image creation process.

In general our starting point is a degradation and noise model: g(x,y) = H ( f(x,y) ) + (x,y)

Determined by quality of equipment and image taking conditions:•image restoration is computationally complex•equipment as degradation free as possible

•seen technical and financial limitations•medical: low radiation, little time in magnet-tube

•lowest image quality to achieve medical goals•web-cams: cheap lens distortions corrected by CPU in cam

Page 2: Restoration

2007 Theo Schouten 2

Noise functions

Page 3: Restoration

2007 Theo Schouten 3

Only noise

See also enhancement, mean and median filters

Page 4: Restoration

2007 Theo Schouten 4

Mars, mariner 6

Page 5: Restoration

2007 Theo Schouten 5

Linear degradationWhen the degradation process is linear:

H( k1f1 + k2f2 ) = k1 H( f1) + k2 H( f2 )

we can write (we temporarily leave the noise out of consideration):

g(x,y) = H(f(x,y))= H(  f(,) (x- ,y- ) d d )=  f(,) H(  (x- ,y- ) ) d d =  f(,) h(x, ,y, ) d d

h(x, ,y, ) is the "impulse response" or "point spread function",the degraded image of an ideal light point.The integral is called the "superposition“ or "Fredholm” integral of the first kind.

Page 6: Restoration

2007 Theo Schouten 6

Position invariant, inverse filteringWhen H is a spatial invariant:

Hf(x- ,y- )=g(x- ,y- ) then:

h(x, ,y, ) = h(x- ,y- )and

g(x,y) =  f(,) h(x- ,y- ) d d

a convolution integral, and taking into account the noise:

G(u,v) = H(u,v)F(u,v) + N(u,v)

Inverse filtering:

G(u,v)/H(u,v) = F(u,v) + N(u,v)/H(u,v)Problems:

if H(u,v) = 0, or small: noise is blown uppseudo-inverse filter: use only parts of H(u,v)

Page 7: Restoration

2007 Theo Schouten 7

Degradation function by experiment

Page 8: Restoration

2007 Theo Schouten 8

by modelling

H(u,v)= exp(-k(u2+v2)5/6 )

atmosfericturbulencemodel

Page 9: Restoration

2007 Theo Schouten 9

by calculation, linear motionSuppose a movement of the image during shutter opening:g(x,y) = 0

T f(x-x0(t),y-y0(t)) dt

G(u,v) = [0T f(x-x0(t),y-y0(t)) dt ] e -j2(ux+vy) dxdy

= F(u,v) 0T e -j2[uxo(t)+vy0(t)] dt

= F(u,v) H(u,v)

With linear motion x0(t)=at/T and y0(t)=bt/T :

H(u,v) = {T/[ (ua+vb)] } sin[ (ua+vb)] e -j[ua+vb]

This has a lot of 0’s : (ua+vb) = n (any integer)pseudo-inverse filter is useless

Page 10: Restoration

2007 Theo Schouten 10

Linear motion blur

Page 11: Restoration

2007 Theo Schouten 11

Pseudo-inverse filter

Page 12: Restoration

2007 Theo Schouten 12

Gaussian movementA 1-D Gaussian kernel for distortions in the horizontal direction. The intensity of each pixel is spread out over the neighboring pixels according to this kernel.

Power spectrum

Inverse filter

Page 13: Restoration

2007 Theo Schouten 13

with noiseUniform noise [0,1] added (rounding floating point to unsigned byte)

Movement lines disappear due to noise

Inverse filter: nothing

Pseudo-inverse filter, only when H(u,v) > T

Page 14: Restoration

2007 Theo Schouten 14

Wiener filteringminimum mean square error: e2 = E{ (f-fc)2}

Fc(u,v) =[1/H(u,v)] [ |H(u,v|2 / (|H(u,v|2 +S(u,v)/Sf(u,v))] G(u,v)

S(u,v) = |N(u,v)|2 power spectrum of noise

Approximations of S(u,v)/Sf(u,v):

K (constant)

|P(u,v)|2 (power spectrum of Laplacian)

found by iterative method to minimize e2

(constrained least squares filtering)

Page 15: Restoration

2007 Theo Schouten 15

Example Wiener filter

Original

Noise added

Pseudo-inverse

Wiener filter

Page 16: Restoration

2007 Theo Schouten 16

Linear motion Wiener filter

Page 17: Restoration

2007 Theo Schouten 17

Geometric distorsion

Lenses often show a typical pincushion or barrel deviation.When the projection function x'=g(x) is known, for each measured pixel it can be determined from which parts of ideal pixels it is buit up.If the inverse function g-1 is known, then for each ideal pixel we can determine from which parts of the distorted pixels it is built up of.

Page 18: Restoration

2007 Theo Schouten 18

Corrections

Original Nearest neighbor Bilinear interpolation

More complex, slower:•bilinear interpolation•subsampling e.g. 5x5

Page 19: Restoration

2007 Theo Schouten 19

Calibration

Calibration, e.g.x’ = a +b x +c y and y’ = r +s x +t y : affine transformations

Also higher order terms like d x2 + e y2 + f xy

Page 20: Restoration

2007 Theo Schouten 20

Fish eye lens

x' = x + x*(K1*r2 + K2*r4 + K3*r6) + P1*(r2 + 2*x2) + 2*P2*x*y

 y' = y + y*(K1*r2 + K2*r4 + K3*r6) + P2*(r2 + 2*y2) + 2*P1*x*y