chapter 5 image restoration. image enhancement ◦ subjective process image restoration ◦...

30
Chapter 5 Image Restoration

Upload: emmeline-barker

Post on 01-Jan-2016

298 views

Category:

Documents


7 download

TRANSCRIPT

Page 1: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Chapter 5 Image Restoration

Page 2: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Image enhancement◦ Subjective process

Image restoration◦ Objective process to recover the original

image. Involving formula or criteria that will yield an

optimal result.

Page 3: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

5. 1 Model of Image degradation and restoration5. 1 Model of Image degradation and restoration

•g(x,y)=h(x,y)f(x,y)+(x,y)

Note: H is a linear, position-invariant process.

Page 4: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Spatial and frequency property of noise◦ White noise (random noise)

A sequence of random positive/negative numbers whose mean is zero. Independent of spatial coordinates and the image

itself. In the frequency domain, all the frequencies are

the same. All the frequencies are corrupted by an additional

constant frequency.

◦ Periodic noise

Page 5: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Gaussian noise

◦ : mean; : variance

◦ 70% [(-), (+)]◦ 95 % [(-2),

(+2)]

22 2/)(

2

1)(

zezp

•Because of its tractability, Gaussian (normal) noise model is often applicable at best.

Page 6: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

The problem of adding noise to an image is identical to that of adding a random number to the gray level of each pixel.◦ Noise models describe the distribution

(probability density function, PDF) of these random numbers.

◦ How to match the PDF of a group of random numbers to a specific noise model? Histogram matching.

Page 7: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Rayleigh noise

= a+(b/4)1/2

= b(4-)/4

azfor

azforeazbzp

baz

0

)(2

)(/)( 2

Page 8: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Erlang (gamma) noise

=b/a; =b/a2

00

0)!1()(

1

zfor

zforeb

zazp

azbb

Page 9: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Exponential noise

=1/a; =1/a2

• A special case Erlang noise model when b = 1.

00

0)(

zfor

zforaezp

az

Page 10: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Uniform noise

=(a+b)/2; =(b-a)2/12

otherwise

bzaforabzp

0

1)(

Page 11: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Impulse noise (salt and pepper noise)

otherwise

bzfor

azfor

P

P

zp b

a

0

)(

Page 12: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

ExampleExample

Page 13: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Results of adding noiseResults of adding noise

Page 14: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Results of adding noiseResults of adding noise

Page 15: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Gaussian noise: ◦ electronic circuit noise and sensor noise due to

poor illumination or high temperature. Rayleigh noise:

◦ Noise in range imaging. Erlang noise:

◦ Noise in laser imaging. Impulse noise:

◦ Quick transients take place during imaging. Uniform noise:

◦ Used in simulations.

Page 16: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

How do we know which noise model adaptive to the currently available imaging tool?◦ Image a solid gray board that is illuminated

uniformly. ◦ Crop a small patch of constant grey level and

analyze its histogram to see which model matches.

Page 17: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Gaussian n: Find the mean and standard deviation of

the histogram (Gaussian noise). Rayleigh, Erlang, and uniform noise:

Calculate the a and b from and . Impulse noise:

Compute the height of peaks at gray levels 0 and 255 to find Pa and Pb.

Page 18: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Estimation of Noise ParametersEstimation of Noise Parameters

Page 19: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Used when only additive noise is present.

Mean filters◦Arithmetic mean filter:

The new pixel value is resulted from averaging the pixels in the area by Sxy.

◦Geometric mean filter:

Achieves smoothing comparable to arithmetic approach, but tends to lose less image detail.

xySts

tsgmn

yxf),(

),(1

),(ˆ

mn

Sts xy

tsgyxf

/1

),(

),(),(ˆ

Page 20: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Median filter

Max filter: find the brightest points to reduce the pepper noise

Min filter: find the darkest point to reduce the salt noise

Midpoint filter: combining statistics and averaging.

),(),(ˆ),(

tsgmedianyxfxySts

),(max),(ˆ),(

tsgyxfxySts

),(min),(ˆ),(

tsgyxfxySts

),(min),(max

2

1),(ˆ

),(),(tsgtsgyxf

xyxy StsSts

Page 21: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Example 5.3Example 5.3Iteratively applying median filter to an image corrupted by impulse noise.

Page 22: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Combining the advantages of mean filter and order-statistics filter.◦ Suppose delete d/2 lowest and d/2 highest gray-

level value in the neighborhood of Sxy and average the remaining mn-d pixel, denoted by gr(s, t).

where d=0 ~ mn-1

xyStsr tsg

dmnyxf

),(

),(1

),(ˆ

Page 23: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving
Page 24: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Filters whose behavior changes based on statistical characteristics of the image.

Two adaptive filters are considered:(1) Adaptive, local noise reduction filter.(2) Adaptive median filter.

Page 25: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Two parameters are considered:◦ Mean: measure of average gray level.◦ Variance: measure of average contrast.

Four measurements:(1) noisy image at (x, y ): g(x, y )(2) The variance of noise 2

(3) The local mean mL in Sxy

(4) The local variance 2L

Page 26: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Given the corrupted image g(x, y), find f(x, y).Conditions:

(a) 2 is zero (Zero-noise case)

– Simply return the value of g(x, y).(b) If 2

L is higher than 2

– Could be edge and should be preserved.– Return value close to g(x, y).

(c) If 2L = 2

– when the local area has similar properties with the overall image.

– Return arithmetic mean value of the pixels in Sxy.

General expression:

]),([),(),(ˆ2

2

LL

myxgyxgyxf

Page 27: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Adaptive, Local Noise Reduction FilterAdaptive, Local Noise Reduction Filter

Page 28: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Adaptive median filter can handle impulse noise with larger probability (Pa and Pb are large).

This approach changes window size during operation (according to certain criteria).

First, define the following notations:zmin=minimum gray-level value in Sxy

zmax=maximum gray-level value in Sxy

zmed=median gray-level value in Sxy

zxy= gray-level at (x,y)Smax=maximum allowed size of Sxy

Page 29: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

The adaptive median filter algorithm works in two levels: A and B

Level A: A1=zmed-zmin A2=zmed-zmax

If A1>0 and A2<0 goto level Belse increase the window sizeIf window size Smax repeat level

Aelse output zxy

Level B: B1=zxy-zmin B2=zxy-zmax

If B1>0 AND B2<0, output zxy

Else output zmed.

Page 30: Chapter 5 Image Restoration.  Image enhancement ◦ Subjective process  Image restoration ◦ Objective process to recover the original image.  Involving

Example 5.5Example 5.5