Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image...

70
Image Restoration Introduction to Signal and Image Processing Prof. Dr. Philippe Cattin MIAC, University of Basel April 19th/26th, 2016 April 19th/26th, 2016 Introduction to Signal and Image Processing 1 of 70 22.02.2016 09:19

Transcript of Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image...

Page 1: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

ImageRestoration

Introduction to Signaland Image Processing

Prof. Dr. Philippe Cattin

MIAC, University of Basel

April 19th/26th, 2016

April 19th/26th, 2016Introduction to Signal and Image Processing

1 of 70 22.02.2016 09:19

Page 2: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

Contents

2

4

5

7

8

9

10

11

12

13

14

15

16

17

18

20

23

24

Ph. Cattin: Image Restoration

Contents

Abstract

1 Image Degradation & Restoration Model

Image Degradation & Restoration Model

Image Degradation & Restoration Model (2)

2 Noise Models

Noise Models

Gaussian Noise

Rayleigh Noise

Erlang Noise

Exponential Noise

Uniform Noise

Impulse (Salt-and-Pepper) Noise

Noise Models

Visual Comparison of Different Noise Sources

Periodic Noise

Estimation of Noise Parameters (1)

Estimation of Periodic Noise Parameters

3 Restoration in the Precense of Noise Only

Restoration in the Precense of Noise Only

4 Periodic Noise Reduction by Frequency Domain

Filtering

4.1 Bandreject Filter

Bandreject Filter

Bandreject Filter Example

4.2 Bandpass FilterApril 19th/26th, 2016Introduction to Signal and Image Processing

2 of 70 22.02.2016 09:19

Page 3: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

26

27

29

30

31

32

33

34

36

37

38

39

40

42

43

44

45

46

47

50

51

Bandpass Filter

Bandpass Filter Example

4.3 Notch Filter

Notch Filter

Notch Filter (2)

Ideal Notch Filter D_0=16 Example

Butterworth Notch Filter D_0=64Example

Gaussian Notch Filter D_0=64 Example

General Notch Filter Example

4.4 Optimum Notch Filtering

Optimum Notch Filtering

Optimum Notch Filtering Principle

Optimum Notch Filter Example

Optimum Notch Filter Example withPixel Increments

Optimum Notch Filter Example withPixel Increments (2)

5 Estimating the Degradation Function

Estimating the Degradation Function

Estimating the Degradation Function (2)

Estimating by Image Observation

Estimating by Experimentation

Estimating by Mathematical Modelling

Illustration of the Atmospheric TurbulenceModel

6 Inverse Filtering

6.1 Direct Inverse Filtering

Direct Inverse Filtering

Two Practical Approaches for InverseFiltering

April 19th/26th, 2016Introduction to Signal and Image Processing

3 of 70 22.02.2016 09:19

Page 4: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

52

53

54

56

57

58

59

60

61

62

63

64

66

68

69

70

71

72

73

Artificial Inverse Filtering Example

Artificial Inverse Filtering Example (2)

Inverse Filtering Example (2)

6.2 Wiener Filtering

Wiener Filtering

Wiener Filtering (2)

Parametric Wiener Filter

Artificial Wiener Filtering Example

Wiener Filtering Example with LittleNoise

Wiener Filtering Example with MediumNoise

Wiener Filtering Example with HeavyNoise

Comparison Param. Wiener vs. WienerFiltering

Drawback of the Wiener Filter

6.3 Geometric Mean Filter

Geometric Mean Filter

6.4 Constrained Least Squares Filtering

Constrained Least Squares (Regularised)Filtering

Constrained Least Squares Filtering (2)

Constrained Least Squares Filtering (3)

Optimal Selection for Gamma

Artificial Constrained Least SquaresFilter Example

Constrained Least Squares FilterExample

April 19th/26th, 2016Introduction to Signal and Image Processing

4 of 70 22.02.2016 09:19

Page 5: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

(2)

Ph. Cattin: Image Restoration

Abstract

As in image enhancement the goal of restoration is toimprove an image for further processing. In contrast toimage enhancement that was subjective and largely basedon heuristics, restoration attempts to reconstruct orrecover an image that has been distorted by a knowndegradation phenomenon. Restoration techniques thus tryto model the degradation process and apply the inverseprocess in order to reconstruct the original image.

5 of 70 22.02.2016 09:19

Page 6: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

ImageDegradation &Restoration Model

April 19th/26th, 2016Introduction to Signal and Image Processing

(4)Image Degradation &Restoration Model

The degradation process is generally modelled as adegradation function and the additive noise term

together they yield .

Given , some knowledge about , and it is

the objective of restoration to estimate . Of course

this estimate should be as close as possible to .

Fig 6.1 Image degradation model

6 of 70 22.02.2016 09:19

Page 7: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Image Degradation & Restoration Model

(5)

Ph. Cattin: Image Restoration

Image Degradation &Restoration Model (2)

If the degradation function is a linear, shift-invariantprocess, then the degraded image is given in the spatialdomain by

(6.1)

where is the spatial representation of the

degradation function, and indicates convolution.

As we know from the Convolution Theorem this can berewritten in the frequency domain

(6.2)

where the capital letters are the Fourier transforms of therespective function in Eq 6.1.

7 of 70 22.02.2016 09:19

Page 8: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

Noise Models

April 19th/26th, 2016Introduction to Signal and Image Processing

(7)Noise Models

The principle sources of noise in digital images ariseduring image acquisition and/or transmission.

The performance of imaging sensors are affected by avariety of factors during acquisition, such as

Environmental conditions during the acquisition

Light levels (low light conditions require high gain

amplification)

Sensor temperature (higher temp implies more

amplification noise)

Images can also be corrupted during transmission due tointerference in the channel for example

Lightning or other

Atmospheric disturbances

Depending on the specific noise source, a different modelmust be selected that accurately reproduces the spatialcharacteristics of the noise.

8 of 70 22.02.2016 09:19

Page 9: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Noise Models

(8)

Ph. Cattin: Image Restoration

Gaussian Noise

Because of its mathematicaltractability in both the spatial andfrequency domain, Gaussian noisemodels (aka normal distribution)are used frequently in practice.

The PDF (Probability densityfunction) of a Gaussian randomvariable is given by

(6.3)

where represents the grey level, the mean value and the

standard deviation.

Fig 6.2: Gaussian

probability density function

The application of the Gaussian model is soconvenient that it is often used in situations inwhich they are marginally applicable at best.

9 of 70 22.02.2016 09:19

Page 10: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Noise Models

(9)

Ph. Cattin: Image Restoration

Rayleigh Noise

The PDF of Rayleigh noise is defined by

(6.4)

the mean and variance are given by

(6.5)

Fig 6.3: Rayleigh

probability

density function

As the shape of the Rayleigh density function is skewed itis useful for approximating skewed histograms.

10 of 70 22.02.2016 09:19

Page 11: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Noise Models

(10)

Ph. Cattin: Image Restoration

Erlang Noise

The PDF of the Erlang noise is givenby

(6.6)

where , is a positive integer.The mean and variance are thengiven by

(6.7)

Fig 6.4: Erlang

probability density

function

11 of 70 22.02.2016 09:19

Page 12: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Noise Models

(11)

Ph. Cattin: Image Restoration

Exponential Noise

The PDF of the exponential noiseis given by

(6.8)

where . The mean andvariance of the density functionare

(6.9)

Fig 6.5: Probability density

function of

exponential noise

The exponential noise model is a special case of the Erlangnoise model with .

12 of 70 22.02.2016 09:19

Page 13: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Noise Models

(12)

Ph. Cattin: Image Restoration

Uniform Noise

The PDF of the uniform noise isgiven by

(6.10)

The mean and variance of thedensity function are given by

(6.11)

Fig 6.6: Probability density

function of uniform

noise

13 of 70 22.02.2016 09:19

Page 14: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Noise Models

(13)

Ph. Cattin: Image Restoration

Impulse (Salt-and-Pepper) Noise

The PDF of bipolar impulse noisemodel is given by

(6.12)Fig 6.7: Probability density

function of the bipolar

impulse noise model

If , grey-level appears as a light dot (salt) in theimage. Conversely, will appear as dark dot (pepper). Ifeither is zero, the PDF is called unipolar.

Because impulse corruption is generally large compared tothe signal strength, the assumption is usually that and are digitised as saturated values thus black (pepper) andwhite (salt).

14 of 70 22.02.2016 09:19

Page 15: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Noise Models

(14)

Ph. Cattin: Image Restoration

Noise Models

The presented noise models provide a useful tool forapproximating a broad range of noise corruption situationsfound in practice. For example:

Gaussian noise: arises in images due to sensor noise

caused by poor illumination and/or high temperature,

and electronic circuit noise

The Rayleigh noise model is used to characterise noise

phenomena in range images

Exponential and Erlang noise models find their

application in Laser imaging

Impulse noise takes place in situations where high

transients (faulty switching) occurs

15 of 70 22.02.2016 09:19

Page 16: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Noise Models

(15)

Ph. Cattin: Image Restoration

Visual Comparison ofDifferent Noise Sources

Although the corresponding histograms show closeresemblance to the PDF of the respective noise model, it isvirtually impossible to select the type of noise causing thedegradation from the image alone.

Gaussian noisemodel

Rayleigh noisemodel

Erlang noise model

16 of 70 22.02.2016 09:19

Page 17: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Exponential noisemodel

Uniform noisemodel

Impulse noisemodel

(Salt & Pepper)

17 of 70 22.02.2016 09:19

Page 18: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Noise Models

(16)

Ph. Cattin: Image Restoration

Periodic Noise

Periodic noise typically arises from electrical orelectromechanical interference during image acquisitionand is spatial dependent.

Fig 6.8: Periodic noise on a satellite

image of Pompeii

Fig 6.9: Spectrum of the Pompeii

image with periodic noise (peaks of

the periodic noise visually

enhanced)

18 of 70 22.02.2016 09:19

Page 19: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Noise Models

(17)

Ph. Cattin: Image Restoration

Estimation of NoiseParameters (1)

In rare cases the parameters ofnoise PDFs may be known fromsensor specifications, but it isoften necessary to estimate themfor a particular imagingarrangement.

If the imaging system is available,one simple way to study noisecharacteristics would be tocapture multiple images ofhomogeneous environments, suchas solid grey cards.

Fig 6.10: Sample histogram

of a small patch of Erlang

noise

In many cases the noise parameters have to be estimatedfrom already captured images. The simplest way is toestimate the mean and variance of the grey levels fromsmall patches of reasonably constant grey level.

19 of 70 22.02.2016 09:19

Page 20: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Noise Models

(18)

Ph. Cattin: Image Restoration

Estimation of PeriodicNoise Parameters

The parameters ofperiodic noise aretypically estimatedby inspection ofthe Fourierspectrum. Thefrequency spikescan often bedetected by visualanalysis.Automatic analysisis possible if thenoise spikes areeitherexceptionallypronounced or apriori knowledgeabout theirlocation is known.

Fig. 6.11: Fig. 6.12:

20 of 70 22.02.2016 09:19

Page 21: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

Restoration in thePrecense of NoiseOnly

April 19th/26th, 2016Introduction to Signal and Image Processing

(20)Restoration in thePrecense of Noise Only

When noise is the only image degradation present in animage, thus , Eqs 6.1 & 6.2 become

(6.13)

and

(6.14)

In case of periodic noise, it is usually possible to estimate from the spectrum of and subtract it to

obtain an estimate of the original image .

But estimating the noise terms is unreasonable, so

subtracting them from is impossible. Spatial

filtering is the method of choice in situations when onlyadditive noise is present.

21 of 70 22.02.2016 09:19

Page 22: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

Periodic NoiseReduction byFrequency DomainFiltering

Bandreject Filter

April 19th/26th, 2016Introduction to Signal and Image Processing

22 of 70 22.02.2016 09:19

Page 23: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

(23)Bandreject Filter

Bandreject filters remove or attenuate a band offrequencies around the origin in the Fourier domain.

Ideal Bandreject Filter

(6.15)

Fig 6.13: Ideal bandreject

filter

Butterworth Bandreject Filter

(6.16)

Fig 6.14: Butterworth

bandreject filter

Gaussian Bandreject Filter

(6.17)

Fig 6.15: Gaussian

bandreject filter

23 of 70 22.02.2016 09:19

Page 24: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Bandreject Filter

(24)

Ph. Cattin: Image Restoration

Bandreject FilterExample

Fig 6.16: Aerial image of Pompeii

with periodic noise

Fig 6.17: Ideal bandreject filter

Fig 6.18: Butterworth bandreject

filter

Fig 6.19: Gaussian bandreject filter

24 of 70 22.02.2016 09:19

Page 25: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

Bandpass Filter

April 19th/26th, 2016Introduction to Signal and Image Processing

(26)Bandpass Filter

The Bandpass filter performs the opposite of a bandrejectfilter and thus lets pass the frequencies in a narrow bandof width around . The transfer function can

be obtained from a corresponding bandreject filter byusing the equation

(6.18)

The perspective plots of the corresponding filters aredepicted in Fig 6.20.

(a) (b) (c)

Fig 6.20 (a) Ideal bandpass filter, (b) Butterworth bandpass filter, and

(c) Gaussian bandpass filter

25 of 70 22.02.2016 09:19

Page 26: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Bandpass Filter

(27)

Ph. Cattin: Image Restoration

Bandpass Filter Example

Fig 6.21: Aerial image of Pompeii

with periodic noise

Fig 6.22: Ideal bandpass filter

Fig 6.23: Butterworth bandpass

filter

Fig 6.24: Gaussian bandpass filter

26 of 70 22.02.2016 09:19

Page 27: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

Notch Filter

April 19th/26th, 2016Introduction to Signal and Image Processing

27 of 70 22.02.2016 09:19

Page 28: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

(29)Notch Filter

A Notch filter rejects or passes frequencies in predefinedneighbourhoods about a centre frequency. Due to thesymmetry of the Fourier transform, notch filters mustappear in symmetric pairs about the origin (except the oneat the origin).

The transfer functions of the ideal, Butterworth, andGaussian notch reject filter of radius (width) withcentres at and, by symmetry, at , are

Ideal Notch Filter

(6.19)

Fig 6.25: Ideal

notch filter

Butterworth Notch Filter

(6.20)

Fig 6.26:

Butterworth

notch filter

Gaussian Notch Filter

(6.21)

Fig 6.27:

Gaussian notch

filter

where

(6.22)

28 of 70 22.02.2016 09:19

Page 29: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

29 of 70 22.02.2016 09:19

Page 30: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Notch Filter

(30)

Ph. Cattin: Image Restoration

Notch Filter (2)

Similar to the bandpass/bandreject filters, the Notch rejectfilters can be turned into Notch pass filters with therelation

(6.23)

where is the transfer function of the notch pass

filter, and the corresponding Notch reject filter.

If

the Notch reject filter becomes a highpass filter

and

the Notch pass filter becomes a lowpass filter.

30 of 70 22.02.2016 09:19

Page 31: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Notch Filter

(31)

Ph. Cattin: Image Restoration

Ideal Notch FilterD_0=16 Example

Fig 6.28: Pompeii aerial image with

periodic noise

Fig 6.29: Notch reject filtered

image

Fig 6.30: Notch pass filtered image

(contrast enhanced)

31 of 70 22.02.2016 09:19

Page 32: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Notch Filter

(32)

Ph. Cattin: Image Restoration

Butterworth Notch FilterD_0=64 Example

Fig 6.31: Pompeii aerial image with

periodic noise

Fig 6.32: Notch reject filtered

image

Fig 6.33: Notch pass filtered image

(contrast enhanced)

32 of 70 22.02.2016 09:19

Page 33: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Notch Filter

(33)

Ph. Cattin: Image Restoration

Gaussian Notch FilterD_0=64 Example

Fig 6.34: Pompeii aerial image with

periodic noise

Fig 6.35: Notch reject filtered

image

Fig 6.36: Notch pass filtered image

(contrast enhanced)

33 of 70 22.02.2016 09:19

Page 34: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Notch Filter

(34)

Ph. Cattin: Image Restoration

General Notch FilterExample

Fig 6.37: Original Mariner 6

martian image

Fig 6.38: Log Fourier spectra of the

image

Fig 6.39: Notch filtered log spectra Fig 6.40: Notch filtered image

34 of 70 22.02.2016 09:19

Page 35: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

Optimum NotchFiltering

April 19th/26th, 2016Introduction to Signal and Image Processing

35 of 70 22.02.2016 09:19

Page 36: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

(36)Optimum Notch Filtering

Images derived from electro-optical scanners, such asthose used in space and aerial imaging, are sometimescorrupted by coupling and amplification of low-levelsignals in the scanners' circuitry. The resulting imagestend to contain substantial periodic noise. Theinterference pattern are, however, in practice not alwaysas clearly defined as in the samples shown thus far.

The first step in Optimum notch filtering is to find theprincipal frequency components and placing notch passfilters at the location of each spike, yielding . The

Fourier transform of the interference pattern is thus givenby

(6.24)

where is the Fourier transform of the corrupted

image. The corresponding interference pattern in thespatial domain is obtained with the inverse Fouriertransform

(6.25)

As the corrupted image is assumed to be formed by

the addition of the uncorrupted image and the

interference noise

(6.26)

If the noise term were known completely,

subtracting it from would yield . The problem

is of course that the estimated interference pattern

is only an approximation. The effect of components notpresent in the estimate can be minimised be

subtracting from a weighted portion of to

obtain an estimate for

36 of 70 22.02.2016 09:19

Page 37: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

(6.27)

where is the estimate of , and is to be

determined and optimises in some meaningful way.

One common approach is to select so that the

variance of is minimised over a specified

neighbourhood of size about every point

.

(6.29)

where is the average value of in the

neighbourhood; that is

(6.30)

Substituting Eq 6.27 into Eq 6.29 yields

(6.31)

Assuming that remains constant over the

neighbourhood gives the approximation

(6.32)

for and . This assumption results inthe expression

(6.33)

37 of 70 22.02.2016 09:19

Page 38: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

in the neighbourhood. With these approximations Eq 6.30becomes

(6.34)

To minimise , we solve

(6.35)

for . The result is

(6.36)

To obtain an estimated restored image , must

be computed from Eq 6.36 and substituted into Eq 6.27 to

determine .

38 of 70 22.02.2016 09:19

Page 39: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Optimum Notch Filtering

(37)

Ph. Cattin: Image Restoration

Optimum Notch FilteringPrinciple

Fig 6.41 Principle of the optimum notch filter

39 of 70 22.02.2016 09:19

Page 40: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Optimum Notch Filtering

(38)

Ph. Cattin: Image Restoration

Optimum Notch FilterExample

Fig 6.42 Aerial image of Pompeii

with heavy periodic noise

distortions

Fig 6.43 Noise estimation with

Gaussian notch pass filter

Fig 6.44 Notch reject filtered

image

Fig 6.45 Result filtered with an

optimum notch filter of size

40 of 70 22.02.2016 09:19

Page 41: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Optimum Notch Filtering

(39)

Ph. Cattin: Image Restoration

Optimum Notch FilterExample with PixelIncrements

Fig 6.46 Aerial image of Pompeii corrected with the optimal notch filter

of size with the window shifted pixelwise

41 of 70 22.02.2016 09:19

Page 42: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Optimum Notch Filtering

(40)

Ph. Cattin: Image Restoration

Optimum Notch FilterExample with PixelIncrements (2)

Fig 6.47 of the example image in Fig 6.46

42 of 70 22.02.2016 09:19

Page 43: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

Estimating theDegradationFunction

April 19th/26th, 2016Introduction to Signal and Image Processing

(42)Estimating theDegradation Function

So far we concentrated mainly at the additive noise term. In the remainder of this presentation we

concentrate on ways to remove the degradation function.

Fig 6.48 Image degradation model

43 of 70 22.02.2016 09:19

Page 44: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Estimating the Degradation Function

(43)

Ph. Cattin: Image Restoration

Estimating theDegradation Function (2)

There are three principle methods to estimate thedegradation function

Observation1.

Experimentation2.

Mathematical modelling3.

The process of restoring a corrupted image using theestimated degradation function is sometimes called blinddeconvolution, as the true degradation is seldom knowncompletely.

In recent years a forth method based on maximum-likelihood estimation (MLE) often called blinddeconvolution has been proposed.

Beware: All multiplications/divisions in theequations in this part of the lecture arecomponentwise.

44 of 70 22.02.2016 09:19

Page 45: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Estimating the Degradation Function

(44)

Ph. Cattin: Image Restoration

Estimating by ImageObservation

Given

A degraded image without any information about thedegradation function .

Solution

Select a subimage with strong signal content → 1.

By estimating the sample grey levels of the object and

background in we can construct an unblurred

image of the same size and characteristics as the

observed subimage →

2.

Assuming that the effect of noise is negligible (thus the

choice of a strong signal area), it follows from Eq 6.2

that

3.

Thanks to the shift invariance we can deduce

from

4.

45 of 70 22.02.2016 09:19

Page 46: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Estimating the Degradation Function

(45)

Ph. Cattin: Image Restoration

Estimating byExperimentation

Given

Equipment similar to the equipment used to acquire thedegraded image

Solution

Images similar to the degraded image can be acquired

with various system settings until it closely matches

the degraded image

1.

The system can then be characterised by measuring

the impulse (small bright dot of light) response. A

linear, shift invariant system can be fully described by

its impulse response.

2.

As the Fourier transform of an impulse is a constant, it

follows from Eq 6.2

where is the Fourier transform of the observed

image, and is a constant describing the strength of

the impulse.

3.

46 of 70 22.02.2016 09:19

Page 47: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Estimating the Degradation Function

(46)

Ph. Cattin: Image Restoration

Estimating byMathematical Modelling

Degradation modelling has been used for many years. It,however, requires an indepth understanding of theinvolved physical phenomenon. In some cases it can evenincorporate environmental conditions that causedegradations. Hufnagel and Stanly proposed in 1964 amodel to characterise atmospheric turbulence.

(6.37)

where is a constant that depends on the nature of theturbulence.

Except of the 5/6 power the above equation has the sameform as a Gaussian lowpass filter.

47 of 70 22.02.2016 09:19

Page 48: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Estimating the Degradation Function

(47)

Ph. Cattin: Image Restoration

Illustration of theAtmospheric TurbulenceModel

Fig 6.49: Aerial image of Pompeii Fig 6.50: Pompeii with mild

turbulence

Fig 6.51: Pompeii with medium

turbulence

Fig 6.52 Pompeii with heavy

turbulence

48 of 70 22.02.2016 09:19

Page 49: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

Inverse Filtering

Direct InverseFiltering

April 19th/26th, 2016Introduction to Signal and Image Processing

49 of 70 22.02.2016 09:19

Page 50: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

(50)Direct Inverse Filtering

The simplest approach to restore a degraded image is toform an estimate of the form

(6.38)

and then obtain the corresponding image by inverseFourier transform. This method is called direct inversefiltering. With the degradation model Equation 6.2 we get

(6.39)

This simple equation tells us that, even if we knew

exactly we could not recover the undegraded image

completely because:

the noise component is a random function whose

Fourier transform is not known, and

1.

in practice can contain numerous zeros.2.

Direct Inverse filtering is seldom a suitableapproach in practical applications

50 of 70 22.02.2016 09:19

Page 51: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Direct Inverse Filtering

(51)

Ph. Cattin: Image Restoration

Two PracticalApproaches for InverseFiltering

Low Pass Filter

(6.40)

where is a low-pass filter that should eliminiate

the very low (or even zero) values often experienced in

the high frequencies.

1.

Constrained Division

(6.41)

gives values, where is lower than a threshold

a special treatment.

2.

These appraoches are also known as Pseudo-Inverse Filtering.

51 of 70 22.02.2016 09:19

Page 52: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Direct Inverse Filtering

(52)

Ph. Cattin: Image Restoration

Artificial InverseFiltering Example

Fig 6.53: Checkerboard sample Fig 6.54: Motion blur of in

direction

Fig 6.55: Additive noise with Fig 6.56: Motion and noise

degraded checkerboard

52 of 70 22.02.2016 09:19

Page 53: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Direct Inverse Filtering

(53)

Ph. Cattin: Image Restoration

Artificial InverseFiltering Example (2)

Although very tempting from its simplicity, the directinverse filtering approach does not work for practicalapplications. Even if the degradation is known exactly.

Fig 6.57: Direct inverse filtering result

53 of 70 22.02.2016 09:19

Page 54: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Direct Inverse Filtering

(54)

Ph. Cattin: Image Restoration

Inverse FilteringExample (2)

Fig 6.58: Inverse filtering of Figure

6.52

Fig 6.59: Pseudo Inverse filtering

for freq. radius

Fig 6.60: Pseudo Inverse filtering

for frequencies radius

Fig 6.61: Pseudo Inverse filtering

for frequencies radius

54 of 70 22.02.2016 09:19

Page 55: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

Wiener Filtering

April 19th/26th, 2016Introduction to Signal and Image Processing

(56)Wiener Filtering

The best known improvement to inverse filtering is the

Wiener Filter. The Wiener filter seeks an estimate that

minimises the statistical error function

(6.42)

where is the expected value and the undegradedimage. The solution to this equation in the frequencydomain is

(6.43)

where

is the degradation function

with the complex

conjugate of

is the power spectrum of the noise

is the power spectrum of the

undegraded image

55 of 70 22.02.2016 09:19

Page 56: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Wiener Filtering

(57)

Ph. Cattin: Image Restoration

Wiener Filtering (2)

If the noise spectrum is zero, the noise-to-signal

power ratio

vanishes and the Wiener Filter reduces to the inversefilter.

(6.44)

This is no problem, as the inverse filter works fine if nonoise is present.

56 of 70 22.02.2016 09:19

Page 57: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Wiener Filtering

(58)

Ph. Cattin: Image Restoration

Parametric Wiener Filter

The main problem with the Wiener filter is that the powerspectrum of the undegraded image is seldom

known.

A frequently used approach when these quantities cannotbe estimated is to approximate Eq 6.43 by the expression

(6.45)

where is a user selected constant.

This simplification can be partly justified when dealingwith spectrally white noise, where the noise spectrum

is constant. However, the problem still

remains that the power spectrum of

the undegraded image is unknown and must be estimated.

Even if the actual ratio is not known, it becomesa simple matter to experiment interactively varyingthe constant and viewing the results.

57 of 70 22.02.2016 09:19

Page 58: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Wiener Filtering

(59)

Ph. Cattin: Image Restoration

Artificial WienerFiltering Example

This example shows the performance of the Wiener filteron the example Fig 6.56 using (1) the approximation of Eq6.45 with in Fig 6.62 and (2) the Wiener filterusing full knowledge of the noise and undegraded image'spower spectra in Fig 6.63.

Fig 6.62: Parametric Wiener filter

using a constant ratio

Fig 6.63: Wiener filter knowing the

noise and undegraded signal power

spectra

58 of 70 22.02.2016 09:19

Page 59: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Wiener Filtering

(60)

Ph. Cattin: Image Restoration

Wiener FilteringExample with Little Noise

Fig 6.64: Pompeii blurred with

Gaussian kernel , and

Gaussian noise

Fig 6.65: Result of direct inverse

filtering

Fig 6.66: Result with Parametric

Wiener filtering

Fig 6.67: Result with Wiener

filtering

59 of 70 22.02.2016 09:19

Page 60: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Wiener Filtering

(61)

Ph. Cattin: Image Restoration

Wiener FilteringExample with Medium Noise

Fig 6.68: Pompeii blurred with

Gaussian kernel , and

Gaussian noise

Fig 6.69: Result of direct inverse

filtering

Fig 6.70: Result with Parametric

Wiener filtering

Fig 6.71: Result with Wiener

filtering

60 of 70 22.02.2016 09:19

Page 61: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Wiener Filtering

(62)

Ph. Cattin: Image Restoration

Wiener FilteringExample with Heavy Noise

Fig 6.72: Pompeii blurred with

Gaussian kernel , and

Gaussian noise

Fig 6.73: Result of direct inverse

filtering

Fig 6.74: Result with Parametric

Wiener filtering

Fig 6.75: Result with Wiener

filtering

61 of 70 22.02.2016 09:19

Page 62: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Wiener Filtering

(63)

Ph. Cattin: Image Restoration

Comparison Param.Wiener vs. Wiener Filtering

(a) (b)

Fig 6.76 Aerial image of Pompeii with Gaussian blur ( ) and noise (

) (a) restored with the Parametric Wiener ( ), (b)

same image restored with Wiener filter.

62 of 70 22.02.2016 09:19

Page 63: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Wiener Filtering

(64)

Ph. Cattin: Image Restoration

Drawback of the WienerFilter

The problem of having to know something about thedegradation function is common to all methods

discussed in this part.

The Wiener filter has the additional difficulty, that

the power spectra of the undegraded image and

the power spectra of the noise

must be known.

Although an approximation by a constant is possible as inthe Parametric Wiener filter, see Fig 6.62, this approach isnot always suitable.

63 of 70 22.02.2016 09:19

Page 64: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

Geometric MeanFilter

April 19th/26th, 2016Introduction to Signal and Image Processing

(66)Geometric Mean Filter

The Geometric Mean Filter is a generalisation of inversefiltering and the Wiener filtering. Through its parameters

it allows access to an entire family of filters.

(6.46)

Depending on the parameters the filter characteristicscan be adjusted

: inverse filtering

: spectrum equalisation filter

: parametric Wiener filter → Wiener

64 of 70 22.02.2016 09:19

Page 65: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

Constrained LeastSquares Filtering

April 19th/26th, 2016Introduction to Signal and Image Processing

(68)Constrained LeastSquares (Regularised)Filtering

The Constrained Least Squares Filtering approach onlyrequires knowledge of the mean and variance of the noise.As shown in previous lectures these parameters can beusually estimated from the degraded image.

The definition of the 2D discrete convolution is

(6.47)

Using this equation we can express the linear degradationmodel in vector notation

as

(6.48)

65 of 70 22.02.2016 09:19

Page 66: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Constrained Least Squares Filtering

(69)

Ph. Cattin: Image Restoration

Constrained LeastSquares Filtering (2)

It seems obvious that the restoration problem is nowreduced to simple matrix manipulations. Unfortunatelythis is not the case. The problem with the matrixformulation is that the matrix is very largeand that its inverse is firstly very sensitive to noise andsecondly does not necessarily exist.

One way to deal with these issues is to base optimality ofrestoration on a measure of smoothness, such as thesecond derivative of the image, e.g. the Laplacian.

(6.49)

subject to the constraint

(6.50)

where is the Euclidian norm, and an estimate of the

undegraded image.

66 of 70 22.02.2016 09:19

Page 67: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Constrained Least Squares Filtering

(70)

Ph. Cattin: Image Restoration

Constrained LeastSquares Filtering (3)

The Frequency domain solution to this optimisationproblem is given by

(6.51)

where is a parameter that must be adjusted so that the

constraint in Eq 6.50 is satisfied, and is the Fourier

transform of the Laplace operator

(6.52)

Note: must be properly padded with zeros prior to

computing the Fourier transform.

It is possible to adjust the parameter

interactively until acceptable results are obtained.

67 of 70 22.02.2016 09:19

Page 68: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Constrained Least Squares Filtering

(71)

Ph. Cattin: Image Restoration

Optimal Selection forGamma

If we are interested in optimality, the parameter must be

adjusted so that the constraint in Eq

6.50 is satisfied.

It turns out that

(6.53)

is the optimal selection given the above optimisationequation where are the mean and variance of the

noise.

It is important to understand, that optimumrestoration in the sense of constrained leastsquares does not necessarily imply best in thevisual sense. In general, automatic determinedrestoration filters yield inferior results to manualadjustment of filter parameters.

68 of 70 22.02.2016 09:19

Page 69: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Constrained Least Squares Filtering

(72)

Ph. Cattin: Image Restoration

Artificial ConstrainedLeast Squares Filter Example

This example shows the performance of the ConstrainedLeast Squares Filter on the example Fig 6.56 using (1) thetheoretical optimal value for in Fig 6.77 and (2)the constrained least squares filter with a manuallyselected of 6.78.

Fig 6.77: Result with optimal Fig 6.78: Results with manually

selected

69 of 70 22.02.2016 09:19

Page 70: Image Restoration - Biomedical EngineeringImage Restoration Introduction to Signal and Image Processing Prof. Dr. PhilippeCattin MIAC, University of Basel April 19th/26th, 2016 Introduction

April 19th/26th, 2016Introduction to Signal and Image Processing

Constrained Least Squares Filtering

(73)

Ph. Cattin: Image Restoration

Constrained LeastSquares Filter Example

Fig 6.79: Pompeii blurred with

Gaussian kernel

Fig 6.80: Result with low Gaussian

noise of

Fig 6.81: Result with medium

Gaussian noise of

Fig 6.82: Result with high Gaussian

noise of

70 of 70 22.02.2016 09:19