digital image processing · image restoration • image restoration: recover an image that has been...

1

Upload: others

Post on 02-Aug-2020

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

Digital Image ProcessingCOSC 6380/4393

Lecture – 21Mar 30th, 2020Pranav Mantini

Page 2: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

Objective

• To introduce a model for image restoration• To study noise that arise in images

Page 3: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

Image Restoration

• Similar to enhancement, the goal is to improve an image.

Page 4: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

Image Restoration

• Similar to enhancement, the goal is to improve an image.

Enhancement Restoration

Subjective process Objective process

Use psychophysical aspects of HVS to manipulate image

Use prior knowledge of degradation torestore image

Manipulate image to please viewer Recover original image by removing degradation

Page 5: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

Image Enhancement

• Enhancement: – Point operations

• Full contrast stretch• Histogram equalization• Histogram flattening

• Restoration:– Removing blur

• By applying a deblurring function

Page 6: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 6

Image Restoration

• Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon.

• Model the degradation and applying the inverse process in order to recover the original image.

Page 7: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

A Model of Image Degradation/Restoration Process

𝑓𝑓 𝑥𝑥, 𝑦𝑦

Page 8: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

A Model of Image Degradation/Restoration Process

𝑓𝑓 𝑥𝑥, 𝑦𝑦

MotionTurbulence

Page 9: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

A Model of Image Degradation/Restoration Process

ℎ 𝑥𝑥, 𝑦𝑦 𝑓𝑓 𝑥𝑥,𝑦𝑦

MotionTurbulence

Page 10: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

A Model of Image Degradation/Restoration Process

ℎ 𝑥𝑥, 𝑦𝑦 𝑓𝑓 𝑥𝑥,𝑦𝑦

MotionTurbulence

Noise:Image acquisition: light, temperature, etc.

Transmission: atmospheric , electronic disturbance

Page 11: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

A Model of Image Degradation/Restoration Process

ℎ 𝑥𝑥, 𝑦𝑦 𝑓𝑓 𝑥𝑥,𝑦𝑦

MotionTurbulence

Noise:Image acquisition: light, temperature, etc.

Transmission: atmospheric , electronic disturbance

𝜂𝜂 𝑥𝑥, 𝑦𝑦Additive noise

Page 12: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

A Model of Image Degradation/Restoration Process

ℎ 𝑥𝑥, 𝑦𝑦 𝑓𝑓 𝑥𝑥,𝑦𝑦

MotionTurbulence

Noise:Image acquisition: light, temperature, etc.

Transmission: atmospheric , electronic disturbance

𝜂𝜂 𝑥𝑥, 𝑦𝑦Additive noise

Page 13: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

A Model of Image Degradation/Restoration Process

ℎ 𝑥𝑥, 𝑦𝑦 𝑓𝑓 𝑥𝑥,𝑦𝑦

𝜂𝜂 𝑥𝑥, 𝑦𝑦

Ideal image

Page 14: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

A Model of Image Degradation/Restoration Process

ℎ 𝑥𝑥, 𝑦𝑦 𝑓𝑓 𝑥𝑥,𝑦𝑦

𝜂𝜂 𝑥𝑥, 𝑦𝑦

Ideal image⊗

Degradation function

Page 15: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

A Model of Image Degradation/Restoration Process

ℎ 𝑥𝑥, 𝑦𝑦 𝑓𝑓 𝑥𝑥,𝑦𝑦

𝜂𝜂 𝑥𝑥, 𝑦𝑦

Ideal image⊗

Degradation function

Page 16: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

A Model of Image Degradation/Restoration Process

ℎ 𝑥𝑥, 𝑦𝑦 𝑓𝑓 𝑥𝑥,𝑦𝑦

𝜂𝜂 𝑥𝑥, 𝑦𝑦

Ideal image⊗

Degradation function

Page 17: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

A Model of Image Degradation/Restoration Process

ℎ 𝑥𝑥, 𝑦𝑦 𝑓𝑓 𝑥𝑥,𝑦𝑦

𝜂𝜂 𝑥𝑥, 𝑦𝑦

Ideal image⊗

Degradation function

Page 18: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

A Model of Image Degradation/Restoration Process

ℎ 𝑥𝑥, 𝑦𝑦 𝑓𝑓 𝑥𝑥,𝑦𝑦

𝜂𝜂 𝑥𝑥, 𝑦𝑦

Ideal image⊗

Degradation function

𝑔𝑔(𝑥𝑥,𝑦𝑦)

Page 19: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

A Model of Image Degradation/Restoration Process

ℎ 𝑥𝑥, 𝑦𝑦 𝑓𝑓 𝑥𝑥,𝑦𝑦

𝜂𝜂 𝑥𝑥, 𝑦𝑦

Ideal image⊗

Degradation function

𝑔𝑔(𝑥𝑥,𝑦𝑦)

Goal of image restoration is to estimate 𝑓𝑓′ 𝑥𝑥,𝑦𝑦that is as close as possible to 𝑓𝑓(𝑥𝑥,𝑦𝑦)

Page 20: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

A Model of Image Degradation/Restoration Process

ℎ 𝑥𝑥, 𝑦𝑦 𝑓𝑓 𝑥𝑥,𝑦𝑦

𝜂𝜂 𝑥𝑥, 𝑦𝑦

Ideal image⊗

Degradation function

𝑔𝑔(𝑥𝑥,𝑦𝑦)

Page 21: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

Noise

• Source• Types of Noise• Estimation of Noise• Image Restoration

Page 22: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 22

Noise Sources

• The principal sources of noise in digital images arise during image acquisition and/or transmission

Image acquisition (CCD cameras)e.g., light levels, sensor temperature, etc.

Transmission (interference on channel)e.g., lightning or other atmospheric disturbance in wireless network

Page 23: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

Types of Noise

• Spatially independent• Spatially dependent

Page 24: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

Types of Noise

• Spatially independent

• Spatially dependent

The noise at location 𝑥𝑥, 𝑦𝑦 , 𝜂𝜂 𝑥𝑥,𝑦𝑦 is defined by a function 𝐻𝐻 that is not dependent on the (𝑥𝑥, 𝑦𝑦)

𝜂𝜂 𝑥𝑥, 𝑦𝑦 → 𝐻𝐻

Page 25: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

Types of Noise

• Spatially independent

• Spatially dependent

The noise at location 𝑥𝑥, 𝑦𝑦 , 𝜂𝜂 𝑥𝑥,𝑦𝑦 is defined by a function 𝐻𝐻 that is not dependent on the (𝑥𝑥, 𝑦𝑦)

𝜂𝜂 𝑥𝑥, 𝑦𝑦 → 𝐻𝐻

The noise at location 𝑥𝑥, 𝑦𝑦 , 𝜂𝜂 𝑥𝑥,𝑦𝑦 is defined by a function 𝐻𝐻 that is dependent on the location (𝑥𝑥,𝑦𝑦)

𝜂𝜂 𝑥𝑥, 𝑦𝑦 → 𝐻𝐻(𝑥𝑥,𝑦𝑦)

Page 26: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

Types of Noise

• Spatially independent

• Spatially dependent

The noise at location 𝑥𝑥, 𝑦𝑦 , 𝜂𝜂 𝑥𝑥,𝑦𝑦 is defined by a function 𝐻𝐻 that is not dependent on the (𝑥𝑥, 𝑦𝑦)

𝜂𝜂 𝑥𝑥, 𝑦𝑦 → 𝐻𝐻

The noise at location 𝑥𝑥, 𝑦𝑦 , 𝜂𝜂 𝑥𝑥,𝑦𝑦 is defined by a function 𝐻𝐻 that is dependent on the location (𝑥𝑥,𝑦𝑦)

𝜂𝜂 𝑥𝑥, 𝑦𝑦 → 𝐻𝐻(𝑥𝑥,𝑦𝑦)

Statistical noise

Periodic noise

Page 27: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

Types of Noise

• Spatially independent

• Statistical noise:– Defined by the function H (which usually is a

probability distribution)– Different H arise in various aspects of imaging.– H is parametric in nature

The noise at location 𝑥𝑥, 𝑦𝑦 , 𝜂𝜂 𝑥𝑥,𝑦𝑦 is defined by a function 𝐻𝐻 that is not dependent on the (𝑥𝑥, 𝑦𝑦)

𝜂𝜂 𝑥𝑥, 𝑦𝑦 → 𝐻𝐻

Page 28: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

Gaussian Noise

Electronic circuit noiseSensor noise due to poor illuminationSensor noise due to high temperature

Page 29: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 29

Page 30: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 30

Gaussian Noise

2 2( ) /2

The PDF of Gaussian random variable, z, is given by1 ( )

2z zp z e σ

πσ− −=

where, represents intensity

is the mean (average) value of z is the standard deviation

z

Page 31: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 31

Gaussian Noise

2 2( ) /2

The PDF of Gaussian random variable, z, is given by1 ( )

2z zp z e σ

πσ− −=

70% of its values will be in the range

95% of its values will be in the range

[ ])(),( σµσµ +−

[ ])2(),2( σµσµ +−

Page 32: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

Rayleigh Noise

Range imaging: Image showing the distance to points in a scene from a specific point (Radar).

Page 33: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 33

Page 34: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 34

Rayleigh Noise

2( ) /

The PDF of Rayleigh noise is given by2 ( ) for

( )0 for

z a bz a e z ap z b

z a

− − − ≥= <

2

The mean and variance of this density are given by

/ 4(4 )

4

z a bb

ππσ

= +−

=

Page 35: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

Erlang (gamma) and Exponential Noise

• Laser imaging: The Laser images are used to get 3D images with the help of laser. The images are captured by sensors which are mounted on laser.

Page 36: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 36

Page 37: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 37

Erlang (Gamma) Noise

1

The PDF of Erlang noise is given by

for 0 ( ) ( 1)!

0 for

b baza z e z

p z bz a

−−

≥= − <

2 2

The mean and variance of this density are given by

/ /

z b ab aσ

=

=

Page 38: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 38

Exponential Noise

The PDF of exponential noise is given by

for 0 ( )

0 for

azae zp z

z a

− ≥=

<

2 2

The mean and variance of this density are given by

1/ 1/

z aaσ

=

=

Page 39: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 39

Faulty switching results in quick transients

Impulse noise

Page 40: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 40

Faulty switching results in quick transients

Impulse noise

Page 41: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 41

Page 42: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 42

Impulse (Salt-and-Pepper) Noise

The PDF of (bipolar) impulse noise is given by for

( ) for 0 otherwise

a

b

P z ap z P z b

== =

If either or is zero, the impulse noise is calleda bP Punipolar

if , gray-level will appear as a light dot, while level will appear like a dark dot.

b a ba

>

Page 43: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

Uniform noise

• Not common in practical situations• Basis for numerous random number

generators

Page 44: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 44

Page 45: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 45

Uniform Noise

The PDF of uniform noise is given by1 for a

( )0 otherwise

z bp z b a

≤ ≤= −

2 2

The mean and variance of this density are given by

( ) / 2 ( ) /12

z a bb aσ

= +

= −

Page 46: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 46

Examples of Noise: Original Image

Page 47: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 47

Examples of Noise: Noisy Images(1)

Page 48: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 48

Examples of Noise: Noisy Images(2)

Page 49: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 49

Periodic Noise

► Periodic noise in an image arises typically from electrical or electromechanical interference during image acquisition.

► It is a type of spatially dependent noise

► Periodic noise can be reduced significantly via frequency domain filtering

Page 50: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 50

An Example of Periodic Noise

Page 51: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 51

An Example of Periodic Noise

Page 52: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

Estimation of Noise

• Periodic noise:– Produces frequency spikes– Estimated by inspecting the Fourier spectrum.– Can be automated if the spikes are pronounced– Infer periodicity directly from images (only

simplistic cases)

Page 53: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

Estimation of Noise

• Statistical noise:– Known partially from the sensor specifications– If imaging system is available, capture a set of flat

images (solid grey board) and study the histogram– If only images are available, select an area of

image with reasonably constant background and study the histogram.

Page 54: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 54

Estimation of Noise Parameters

The shape of the histogram identifies the closest PDF match

Page 55: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 55

Rayleigh Noise

2( ) /

The PDF of Rayleigh noise is given by2 ( ) for

( )0 for

z a bz a e z ap z b

z a

− − − ≥= <

2

The mean and variance of this density are given by

/ 4(4 )

4

z a bb

ππσ

= +−

=

Page 56: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

3/30/2020 56

Estimation of Noise Parameters

Consider a subimage denoted by , and let ( ), 0, 1, ..., -1, denote the probability estimates of the intensities of the pixels in . The mean and variance of the pixels in :

s iS p z i LS

S

=

1

01

2 2

0

( )

and ( ) ( )

L

i s ii

L

i s ii

z z p z

z z p zσ

=

=

=

= −

Page 57: Digital Image Processing · Image Restoration • Image restoration: recover an image that has been degraded by using a prior knowledge of the degradation phenomenon. • Model the

Next

Restoration: How to remove noise

End of Lecture