Image Restoration Preview n Goal of image restoration

  • Slides: 58
Download presentation
Image Restoration

Image Restoration

Preview n Goal of image restoration n Improve an image in some predefined sense

Preview n Goal of image restoration n Improve an image in some predefined sense Difference with image enhancement ? Features n n n Image restoration v. s image enhancement Objective process v. s. subjective process A prior knowledge v. s heuristic process A prior knowledge of the degradation phenomenon is considered Modeling the degradation and apply the inverse process to recover the original image

Preview (cont. ) n Target n n Degraded digital image Sensor, digitizer, display degradations

Preview (cont. ) n Target n n Degraded digital image Sensor, digitizer, display degradations are less considered Spatial domain approach Frequency domain approach

Outline n n n n A model of the image degradation / restoration process

Outline n n n n A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering Periodic noise reduction by frequency domain filtering Linear, position-invariant degradations Estimating the degradation function Inverse filtering

A model of the image degradation/restoration process g(x, y)=f(x, y)*h(x, y)+h(x, y) G(u, v)=F(u,

A model of the image degradation/restoration process g(x, y)=f(x, y)*h(x, y)+h(x, y) G(u, v)=F(u, v)H(u, v)+N(u, v)

Noise models 雜訊模型 n Source of noise n n n Spatial properties of noise

Noise models 雜訊模型 n Source of noise n n n Spatial properties of noise n n n Image acquisition (digitization) Image transmission Statistical behavior of the gray-level values of pixels Noise parameters, correlation with the image Frequency properties of noise n n Fourier spectrum Ex. white noise (a constant Fourier spectrum)

Noise probability density functions n n Noises are taken as random variables Random variables

Noise probability density functions n n Noises are taken as random variables Random variables n Probability density function (PDF)

Gaussian noise n n Math. tractability in spatial and frequency domain Electronic circuit noise

Gaussian noise n n Math. tractability in spatial and frequency domain Electronic circuit noise and sensor noise mean Note: variance

Gaussian noise (PDF) 70% in [(m-s), (m+s)] 95% in [(m-2 s), (m+2 s)]

Gaussian noise (PDF) 70% in [(m-s), (m+s)] 95% in [(m-2 s), (m+2 s)]

Uniform noise n Less practical, used for random number generator Mean: Variance:

Uniform noise n Less practical, used for random number generator Mean: Variance:

Uniform PDF

Uniform PDF

Impulse (salt-and-pepper) nosie n Quick transients, such as faulty switching during imaging If either

Impulse (salt-and-pepper) nosie n Quick transients, such as faulty switching during imaging If either Pa or Pb is zero, it is called unipolar. Otherwise, it is called bipoloar. • In practical, impulses are usually stronger than image signals. Ex. , a=0(black) and b=255(white) in 8 -bit image.

Impulse (salt-and-pepper) nosie PDF

Impulse (salt-and-pepper) nosie PDF

Test for noise behavior n Test pattern Its histogram: 0 255

Test for noise behavior n Test pattern Its histogram: 0 255

Periodic noise n n n Arise from electrical or electromechanical interference during image acquisition

Periodic noise n n n Arise from electrical or electromechanical interference during image acquisition Spatial dependence Observed in the frequency domain

Sinusoidal noise: Complex conjugate pair in frequency domain

Sinusoidal noise: Complex conjugate pair in frequency domain

Estimation of noise parameters n Periodic noise n n Observe the frequency spectrum Random

Estimation of noise parameters n Periodic noise n n Observe the frequency spectrum Random noise with unknown PDFs n Case 1: imaging system is available n n Capture images of “flat” environment Case 2: noisy images available n n n Take a strip from constant area Draw the histogram and observe it Measure the mean and variance

Observe the histogram Gaussian uniform

Observe the histogram Gaussian uniform

Measure the mean and variance n Histogram is an estimate of PDF Gaussian: m,

Measure the mean and variance n Histogram is an estimate of PDF Gaussian: m, s Uniform: a, b

Outline n n n n A model of the image degradation / restoration process

Outline n n n n A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering Periodic noise reduction by frequency domain filtering Linear, position-invariant degradations Estimating the degradation function Inverse filtering

Additive noise only g(x, y)=f(x, y)+h(x, y) G(u, v)=F(u, v)+N(u, v)

Additive noise only g(x, y)=f(x, y)+h(x, y) G(u, v)=F(u, v)+N(u, v)

Spatial filters for de-noising additive noise n n Skills similar to image enhancement Mean

Spatial filters for de-noising additive noise n n Skills similar to image enhancement Mean filters Order-statistics filters Adaptive filters

Mean filters n Arithmetic mean Window centered at (x, y) n Geometric mean

Mean filters n Arithmetic mean Window centered at (x, y) n Geometric mean

original Noisy Gaussian m=0 s=20 Arith. mean Geometric mean

original Noisy Gaussian m=0 s=20 Arith. mean Geometric mean

Mean filters (cont. ) n Harmonic mean filter n Contra-harmonic mean filter Q=-1, harmonic

Mean filters (cont. ) n Harmonic mean filter n Contra-harmonic mean filter Q=-1, harmonic Q=0, airth. mean Q=+, ?

Pepper Noise 黑點 Contraharmonic Q=1. 5 Salt Noise 白點 Contraharmonic Q=-1. 5

Pepper Noise 黑點 Contraharmonic Q=1. 5 Salt Noise 白點 Contraharmonic Q=-1. 5

Wrong sign in contra-harmonic filtering Q=-1. 5 Q=1. 5

Wrong sign in contra-harmonic filtering Q=-1. 5 Q=1. 5

Order-statistics filters n Based on the ordering(ranking) of pixels n n n Suitable for

Order-statistics filters n Based on the ordering(ranking) of pixels n n n Suitable for unipolar or bipolar noise (salt and pepper noise) Median filters Max/min filters Midpoint filters Alpha-trimmed mean filters

Order-statistics filters n Median filter n Max/min filters

Order-statistics filters n Median filter n Max/min filters

bipolar Noise Pa = 0. 1 Pb = 0. 1 3 x 3 Median

bipolar Noise Pa = 0. 1 Pb = 0. 1 3 x 3 Median Filter Pass 2 3 x 3 Median Filter Pass 3

Pepper noise Salt noise Max filter Min filter

Pepper noise Salt noise Max filter Min filter

Order-statistics filters (cont. ) n Midpoint filter n Alpha-trimmed mean filter n Delete the

Order-statistics filters (cont. ) n Midpoint filter n Alpha-trimmed mean filter n Delete the d/2 lowest and d/2 highest gray-level pixels Middle (mn-d) pixels

Uniform noise m=0 s 2=800 Left + Bipolar Noise Pa = 0. 1 Pb

Uniform noise m=0 s 2=800 Left + Bipolar Noise Pa = 0. 1 Pb = 0. 1 5 x 5 Arith. Mean filter 5 x 5 Geometric mean 5 x 5 Median filter 5 x 5 Alpha-trim. Filter d=5

Adaptive filters n n n Adapted to the behavior based on the statistical characteristics

Adaptive filters n n n Adapted to the behavior based on the statistical characteristics of the image inside the filter region Sxy Improved performance v. s increased complexity Example: Adaptive local noise reduction filter

Adaptive local noise reduction filter n Simplest statistical measurement n n Mean and variance

Adaptive local noise reduction filter n Simplest statistical measurement n n Mean and variance Known parameters on local region Sxy n n g(x, y): noisy image pixel value s 2 h: noise variance (assume known a prior) m. L : local mean s 2 L : local variance

Adaptive local noise reduction filter (cont. ) n Analysis: we want to do n

Adaptive local noise reduction filter (cont. ) n Analysis: we want to do n n If s 2 h is zero, return g(x, y) If s 2 L> s 2 h , return value close to g(x, y) If s 2 L= s 2 h , return the arithmetic mean m. L Formula

Gaussian noise m=0 s 2=1000 Arith. mean 7 x 7 Geometric mean 7 x

Gaussian noise m=0 s 2=1000 Arith. mean 7 x 7 Geometric mean 7 x 7 adaptive

Outline n n n n A model of the image degradation / restoration process

Outline n n n n A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering Periodic noise reduction by frequency domain filtering Linear, position-invariant degradations Estimating the degradation function Inverse filtering

Periodic noise reduction n Pure sine wave n Appear as a pair of impulse

Periodic noise reduction n Pure sine wave n Appear as a pair of impulse (conjugate) in the frequency domain

Periodic noise reduction (cont. ) n n Bandreject filters Bandpass filters Notch filters Optimum

Periodic noise reduction (cont. ) n n Bandreject filters Bandpass filters Notch filters Optimum notch filtering

Bandreject filters * Reject an isotropic frequency ideal Butterworth Gaussian

Bandreject filters * Reject an isotropic frequency ideal Butterworth Gaussian

noisy spectrum filtered bandreject

noisy spectrum filtered bandreject

Bandpass filters n Hbp(u, v)=1 - Hbr(u, v)

Bandpass filters n Hbp(u, v)=1 - Hbr(u, v)

Notch filters n Reject(or pass) frequencies in predefined neighborhoods about a center frequency ideal

Notch filters n Reject(or pass) frequencies in predefined neighborhoods about a center frequency ideal Butterworth Gaussian

Horizontal Scan lines DFT Notch pass Notch reject

Horizontal Scan lines DFT Notch pass Notch reject

Outline n n n n A model of the image degradation / restoration process

Outline n n n n A model of the image degradation / restoration process Noise models Restoration in the presence of noise only – spatial filtering Periodic noise reduction by frequency domain filtering Linear, position-invariant degradations Estimating the degradation function Inverse filtering

A model of the image degradation /restoration process g(x, y)=f(x, y)*h(x, y)+h(x, y) G(u,

A model of the image degradation /restoration process g(x, y)=f(x, y)*h(x, y)+h(x, y) G(u, v)=F(u, v)H(u, v)+N(u, v) If linear, position-invariant system

Linear, position-invariant degradation Properties of the degradation function H n Linear system n n

Linear, position-invariant degradation Properties of the degradation function H n Linear system n n Position(space)-invariant system n n n H[af 1(x, y)+bf 2(x, y)]=a. H[f 1(x, y)]+b. H[f 2(x, y)] H[f(x, y)]=g(x, y) H[f(x-a, y-b)]=g(x-a, y-b) c. f. 1 -D signal n LTI (linear time-invariant system)

Linear, position-invariant degradation model n n Linear system theory is ready Non-linear, position-dependent system

Linear, position-invariant degradation model n n Linear system theory is ready Non-linear, position-dependent system n n n May be general and more accurate Difficult to solve compuatationally Image restoration: find H(u, v) and apply inverse process n Image deconvolution

Estimating the degradation function n Estimation by Image observation Estimation by experimentation Estimation by

Estimating the degradation function n Estimation by Image observation Estimation by experimentation Estimation by modeling

Estimation by image observation n Take a window in the image n n n

Estimation by image observation n Take a window in the image n n n Simple structure Strong signal content Estimate the original image in the window known estimate

Estimation by experimentation n n If the image acquisition system is ready Obtain the

Estimation by experimentation n n If the image acquisition system is ready Obtain the impulse response impulse Impulse response

Estimation by modeling (1) n Ex. Atmospheric model original k=0. 0025 k=0. 001 k=0.

Estimation by modeling (1) n Ex. Atmospheric model original k=0. 0025 k=0. 001 k=0. 00025

Estimation by modeling (2) n n Derive a mathematical model Ex. Motion of image

Estimation by modeling (2) n n Derive a mathematical model Ex. Motion of image Fourier transform Planar motion

Estimation by modeling: example original Apply motion model

Estimation by modeling: example original Apply motion model

Inverse filtering n With the estimated degradation function H(u, v) G(u, v)=F(u, v)H(u, v)+N(u,

Inverse filtering n With the estimated degradation function H(u, v) G(u, v)=F(u, v)H(u, v)+N(u, v) Unknown noise => Estimate of original image Problem: 0 or small values Sol: limit the frequency around the origin

Full inverse filter for Cut Outside 40% k=0. 0025 Cut Outside 70% Cut Outside

Full inverse filter for Cut Outside 40% k=0. 0025 Cut Outside 70% Cut Outside 85%