Digital Image Processing Chapter 5: Image Restoration

Concept of Image Restoration Image restoration is to restore a degraded image back to the original image while image enhancement is to manipulate the image so that it is suitable for a specific application.

Degradation model: g ( x, y ) = f ( x, y ) ∗ h ( x, y ) + η ( x, y ) where h(x,y) is a system that causes image distortion and η(x,y) is noise. (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Noise Models Noise cannot be predicted but can be approximately described in statistical way using the probability density function (PDF) Gaussian noise:

p( z ) = Rayleigh noise

1 2πσ

e

− ( z − μ ) 2 / 2σ 2

⎧⎪ 2 −( z −a )2 / b ( z − a )e p( z ) = ⎨ b ⎪⎩ 0

for z ≥ a for z < a

Erlang (Gamma) noise

⎧ a b z b−1 ⎪ ( z − a )e −az p( z ) = ⎨ (b − 1)! ⎪⎩ 0

for z ≥ 0 for z < 0

Noise Models (cont.) Exponential noise p( z ) = ae − az Uniform noise

⎧⎪ 1 p( z ) = ⎨ b - a ⎪⎩ 0

for a ≤ z ≤ b otherwise

Impulse (salt & pepper) noise

⎧ Pa ⎪ p( z ) = ⎨ Pb ⎪0 ⎩

for z = a for z = b otherwise

PDF: Statistical Way to Describe Noise PDF tells how much each z value occurs.

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Image Degradation with Additive Noise g ( x, y ) = f ( x, y ) + η ( x, y ) Degraded images

Original image

Histogram

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Image Degradation with Additive Noise (cont.) g ( x, y ) = f ( x, y ) + η ( x, y ) Degraded images

Original image

Histogram

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Chapter 4 2-D DFT Properties

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Chapter 4 2-D DFT Properties (cont.)

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Chapter 4 2-D DFT Properties (cont.)

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Chapter 4 2-D DFT Properties (cont.)

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Estimation of Noise

We cannot use the image histogram to estimate noise PDF.

It is better to use the histogram of one area of an image that has constant intensity to estimate noise PDF. (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Periodic Noise

Periodic noise looks like dots In the frequency domain (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Periodic Noise Reduction by Freq. Domain Filtering Degraded image

DFT Periodic noise can be reduced by setting frequency components corresponding to noise to zero.

Band reject filter

Restored image (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Band Reject Filters Use to eliminate frequency components in some bands

Periodic noise from the previous slide that is Filtered out.

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Notch Reject Filters A notch reject filter is used to eliminate some frequency components.

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

DFT

Noise

Notch filter (freq. Domain)

Restored image

DFT (no shift)

DFT of noise

Noise

Restored image (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

g ( x, y ) = f ( x, y ) ∗ h ( x, y ) + η ( x, y ) To remove this part Arithmetic mean filter or moving average filter (from Chapter 3)

ˆf ( x, y ) = 1 g ( s, t ) ∑ mn ( s ,t )∈S xy Geometric mean filter

⎛ ⎞ fˆ ( x, y ) = ⎜ ∏ g ( s, t ) ⎟ ⎜ ( s ,t )∈S ⎟ xy ⎝ ⎠

mn = size of moving window 1 mn

Geometric Mean Filter: Example

Original image

Image corrupted by AWGN

Image obtained using a 3x3 arithmetic mean filter

Image obtained using a 3x3 geometric mean filter

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Harmonic and Contraharmonic Filters Harmonic mean filter

mn

fˆ ( x, y ) =

( s ,t )∈S xy

1 g ( s, t )

Contraharmonic mean filter

fˆ ( x, y ) =

Q +1 g ( s , t ) ∑

( s ,t )∈S xy

Q g ( s , t ) ∑

( s ,t )∈S xy

Works well for salt noise but fails for pepper noise

mn = size of moving window Positive Q is suitable for eliminating pepper noise. Negative Q is suitable for eliminating salt noise.

Q = the filter order For Q = 0, the filter reduces to an arithmetic mean filter. For Q = -1, the filter reduces to a harmonic mean filter.

Contraharmonic Filters: Example Image corrupted by pepper noise with prob. = 0.1

Image corrupted by salt noise with prob. = 0.1

Image obtained using a 3x3 contraharmonic mean filter With Q = 1.5

Image obtained using a 3x3 contraharmonic mean filter With Q=-1.5 (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Contraharmonic Filters: Incorrect Use Example Image corrupted by pepper noise with prob. = 0.1

Image corrupted by salt noise with prob. = 0.1

Image obtained using a 3x3 contraharmonic mean filter With Q=-1.5

Image obtained using a 3x3 contraharmonic mean filter With Q=1.5 (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Order-Statistic Filters: Revisit

Original image subimage Statistic parameters Mean, Median, Mode, Min, Max, Etc. Moving window

Output image

Order-Statistics Filters Median filter

fˆ ( x, y ) = median {g ( s, t )} ( s ,t )∈S xy

Max filter

fˆ ( x, y ) = max {g ( s, t )} ( s ,t )∈S xy

Reduce “dark” noise (pepper noise)

Min filter

fˆ ( x, y ) = min {g ( s, t )} ( s ,t )∈S xy

Reduce “bright” noise (salt noise)

Midpoint filter

ˆf ( x, y ) = 1 ⎛⎜ max {g ( s, t )}+ min {g ( s, t )}⎞⎟ ( s ,t )∈S xy 2 ⎝ ( s ,t )∈S xy ⎠

Median Filter : How it works A median filter is good for removing impulse, isolated noise Salt noise

Pepper noise Median

Degraded image Salt noise Pepper noise

Moving window

Sorted array Filter output

Normally, impulse noise has high magnitude and is isolated. When we sort pixels in the moving window, noise pixels are usually at the ends of the array.

Therefore, it’s rare that the noise pixel will be a median value.

Median Filter : Example 1

2

3

4

Image corrupted by saltand-pepper noise with pa=pb= 0.1

Images obtained using a 3x3 median (Images filter from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Max and Min Filters: Example Image corrupted by pepper noise with prob. = 0.1

Image corrupted by salt noise with prob. = 0.1

Image obtained using a 3x3 max filter

Image obtained using a 3x3 min filter

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Alpha-trimmed Mean Filter Formula:

fˆ ( x, y ) =

1 mn − d

∑ g ( s, t )

( s ,t )∈S xy

r

where gr(s,t) represent the remaining mn-d pixels after removing the d/2 highest and d/2 lowest values of g(s,t). Total mn pixels Lowest Gray Level

d/2

d/2

Highest Gray Level

This filter is useful in situations involving multiple types of noise such as a combination of salt-and-pepper and Gaussian noise.

Alpha-trimmed Mean Filter: Example 1

2

Image corrupted by additive uniform noise

Image 2 obtained using a 5x5 arithmetic mean filter

Image 2 obtained using a 5x5 geometric mean filter

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Alpha-trimmed Mean Filter: Example (cont.) 1 Image corrupted by additive uniform noise

Image 2 obtained using a 5x5 median filter

2

Image additionally corrupted by additive salt-andpepper noise Image 2 obtained using a 5x5 alphatrimmed mean filter with d = 5

Alpha-trimmed Mean Filter: Example (cont.) Image obtained using a 5x5 arithmetic mean filter

Image obtained using a 5x5 geometric mean filter

Image obtained using a 5x5 median filter

Image obtained using a 5x5 alphatrimmed mean filter with d = 5

-Filter behavior depends on statistical characteristics of local areas inside mxn moving window - More complex but superior performance compared with “fixed” filters Statistical characteristics: Local mean:

1 mL = g ( s, t ) ∑ mn ( s ,t )∈S xy Local variance:

1 2 σ = ( g ( s , t ) − m ) ∑ L mn ( s ,t )∈S xy 2 L

Noise variance:

ση

2

Adaptive, Local Noise Reduction Filter Purpose: want to preserve edges Concept: 1. If ση2 is zero, Æ No noise the filter should return g(x,y) because g(x,y) = f(x,y) 2. If σL2 is high relative to ση2, Æ Edges (should be preserved), the filter should return the value close to g(x,y) 3. If σL2 = ση2, Æ Areas inside objects the filter should return the arithmetic mean value mL Formula: 2 σ fˆ ( x, y ) = g ( x, y ) − η2 (g ( x, y ) − mL ) σL

Adaptive Noise Reduction Filter: Example Image corrupted by additive Gaussian noise with zero mean and σ2=1000 Image obtained using a 7x7 geometric mean filter

Image obtained using a 7x7 arithmetic mean filter

Image obtained using a 7x7 adaptive noise reduction filter (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Adaptive Median Filter Purpose: want to remove impulse noise while preserving edges Algorithm:Level A:

A1= zmedian – zmin A2= zmedian – zmax If A1 > 0 and A2 < 0, goto level B Else increase window size If window size <= Smax repeat level A Else return zxy Level B: B1= zxy – zmin B2= zxy – zmax If B1 > 0 and B2 < 0, return zxy Else return zmedian where zmin = minimum gray level value in Sxy zmax = maximum gray level value in Sxy zmedian = median of gray levels in Sxy zxy = gray level value at pixel (x,y) Smax = maximum allowed size of Sxy

Adaptive Median Filter: How it works Level A: A1= zmedian – zmin A2= zmedian – zmax

Determine whether zmedian is an impulse or not If A1 > 0 and A2 < 0, goto level B Else Æ Window is not big enough increase window size If window size <= Smax repeat level A Else return zxy

Level B: Æ zmedian is not an impulse Determine whether zxy B1= zxy – zmin is an impulse or not B2= zxy – zmax If B1 > 0 and B2 < 0, Æ zxy is not an impulse return zxy Æ to preserve original details Else return zmedian Æ to remove impulse

Image corrupted by salt-and-pepper noise with pa=pb= 0.25

Image obtained using a 7x7 median filter

Image obtained using an adaptive median filter with Smax = 7

More small details are preserved (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Estimation of Degradation Model Degradation model: g ( x, y ) = f ( x, y ) ∗ h ( x, y ) + η ( x, y ) or

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

Purpose: to estimate h(x,y) or H(u,v) Why? If we know exactly h(x,y), regardless of noise, we can do deconvolution to get f(x,y) back from g(x,y). Methods: 1. Estimation by Image Observation 2. Estimation by Experiment 3. Estimation by Modeling

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Estimation by Image Observation Original image (unknown) f(x,y)

f(x,y)*h(x,y)

g(x,y)

Observation Estimated Transfer function

Gs (u, v )

G (u, v ) H ( u, v ) ≈ H s ( u, v ) = s Fˆs (u, v ) This case is used when we know only g(x,y) and cannot repeat the experiment!

Fˆs (u, v )

DFT

Subimage g s ( x, y )

Restoration process by estimation DFT Reconstructed Subimage fˆs ( x, y )

Estimation by Experiment Used when we have the same equipment set up and can repeat the experiment. Response image from Input impulse image the system

System H( )

Aδ ( x, y )

g ( x, y )

DFT

DFT

DFT {Aδ ( x, y )} = A

G ( u, v ) G ( u, v ) H ( u, v ) = A

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Estimation by Modeling Used when we know physical mechanism underlying the image formation process that can be expressed mathematically. Original image

Severe turbulence

Example: Atmospheric Turbulence model

H (u, v ) = e

− k ( u 2 + v 2 )5 / 6

k = 0.0025 Mild turbulence

k = 0.001

Low turbulence

k = 0.00025 (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Estimation by Modeling: Motion Blurring Assume that camera velocity is ( x0 (t ), y0 (t )) The blurred image is obtained by T

g ( x, y ) = ∫ f ( x + x0 (t ), y + y0 (t ))dt 0

where T = exposure time. ∞ ∞

G ( u, v ) =

− j 2π ( ux + vy ) g ( x , y ) e dxdy ∫

− ∞− ∞

⎡T ⎤ − j 2π ( ux +vy ) = ∫ ∫ ⎢ ∫ f ( x + x0 (t ), y + y0 (t ))dt ⎥ e dxdy − ∞− ∞ ⎣ 0 ⎦ ∞ ∞

⎡∞ ∞ ⎤ − j 2π ( ux + vy ) = ∫ ⎢ ∫ ∫ f ( x + x0 (t ), y + y0 (t ))e dxdy ⎥dt 0 ⎣ − ∞− ∞ ⎦ T

Estimation by Modeling: Motion Blurring (cont.) ⎡∞ ∞ ⎤ − j 2π ( ux + vy ) G (u, v ) = ∫ ⎢ ∫ ∫ f ( x + x0 (t ), y + y0 (t ))e dxdy ⎥dt 0 ⎣ − ∞− ∞ ⎦ T

T

[

]

= ∫ F (u, v )e − j 2π ( ux0 ( t )+ vy0 ( t )) dt 0 T

= F (u, v ) ∫ e − j 2π ( ux0 ( t )+ vy0 ( t )) dt 0

Then we get, the motion blurring transfer function: T

H (u, v ) = ∫ e − j 2π ( ux0 ( t )+vy0 ( t )) dt 0

For constant motion ( x0 (t ), y0 (t )) = (at , bt ) T

H (u, v ) = ∫ e − j 2π ( ua +vb ) dt = 0

T sin(π (ua + vb))e − jπ ( ua +vb ) π (ua + vb)

Motion Blurring Example For constant motion

T H ( u, v ) = sin(π (ua + vb))e − jπ ( ua + vb ) π (ua + vb)

Original image

Motion blurred image a = b = 0.1, T = 1 (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

G ( u, v ) = F ( u, v ) H ( u, v ) + N ( u, v ) after we obtain H(u,v), we can estimate F(u,v) by the inverse filter: G ( u, v ) N ( u, v ) Fˆ (u, v ) = = F ( u, v ) + H ( u, v ) H ( u, v ) Noise is enhanced when H(u,v) is small.

To avoid the side effect of enhancing noise, we can apply this formulation to freq. component (u,v) with in a radius D0 from the center of H(u,v).

In practical, the inverse filter is not Popularly used.

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Inverse Filter: Example

Original image

Blurred image Due to Turbulence

H (u, v ) = e

−0.0025( u 2 + v 2 )5 / 6

Result of applying the full filter

Result of applying the filter with D0=40

Result of applying Result of applying the filter with D0=70 the filter with D0=85

Wiener Filter: Minimum Mean Square Error Filter

{

Objective: optimize mean square error: e 2 = E ( f − fˆ ) 2

}

Wiener Filter Formula: * ⎤ ⎡ ( , ) ( , ) H u v S u v f Fˆ (u, v ) = ⎢ ⎥G ( u , v ) 2 ⎢⎣ S f (u, v ) H (u, v ) + Sη (u, v ) ⎥⎦

⎤ ⎡ H * ( u, v ) =⎢ ⎥G ( u , v ) 2 ⎢⎣ H (u, v ) + Sη (u, v ) / S f (u, v ) ⎥⎦ 2 ⎤ ⎡ 1 H (u, v ) =⎢ ⎥G ( u , v ) 2 ⎢⎣ H (u, v ) H (u, v ) + Sη (u, v ) / S f (u, v ) ⎥⎦

where H(u,v) = Degradation function Sη(u,v) = Power spectrum of noise Sf(u,v) = Power spectrum of the undegraded image (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Approximation of Wiener Filter Wiener Filter Formula: 2 ⎡ 1 ⎤ H ( u , v ) Fˆ (u, v ) = ⎢ ⎥G ( u , v ) 2 ⎢⎣ H (u, v ) H (u, v ) + Sη (u, v ) / S f (u, v ) ⎥⎦

Difficult to estimate

Approximated Formula: 2 ⎡ 1 ⎤ H (u, v ) ˆ F ( u, v ) = ⎢ ⎥G ( u , v ) 2 ⎢⎣ H (u, v ) H (u, v ) + K ⎥⎦

Practically, K is chosen manually to obtained the best visual result!

Wiener Filter: Example

Original image

Blurred image Due to Turbulence

Result of the full inverse filter

Result of the inverse filter with D0=70

Result of the full Wiener filter

Wiener Filter: Example (cont.)

Original image

Result of the inverse filter with D0=70

Blurred image Due to Turbulence

Result of the Wiener filter

Example: Wiener Filter and Motion Blurring Image degraded by motion blur + AWGN

Result of the inverse filter

Result of the Wiener filter

ση2=650

ση2=325 Note: K is chosen manually

ση2=130

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Constrained Least Squares Filter Degradation model:

Written in a matrix form g = Hf + η

g ( x, y ) = f ( x, y ) ∗ h ( x, y ) + η ( x, y )

Objective: to find the minimum of a criterion function

C=

∑∑ [∇

M −1 N −1

2

f ( x, y )

]

2

x =0 y =0

Subject to the constraint 2 2 ˆ g − Hf = η

where

w = wT w 2

We get a constrained least square filter * ⎤ ⎡ H ( u , v ) Fˆ (u, v ) = ⎢ G ( u, v ) 2 2⎥ ⎢⎣ H (u, v ) + γ P(u, v ) ⎥⎦

where

⎡ 0 −1 0 ⎤ ⎢− 1 4 − 1⎥ P(u,v) = Fourier transform of p(x,y) = ⎢ ⎥ ⎢⎣ 0 − 1 0 ⎥⎦

Constrained Least Squares Filter: Example Constrained least square filter * ⎤ ⎡ H ( u , v ) Fˆ (u, v ) = ⎢ G ( u, v ) 2 2⎥ ⎢⎣ H (u, v ) + γ P(u, v ) ⎥⎦ γ is adaptively adjusted to achieve the best result.

Results from the previous slide obtained from the constrained least square filter

Constrained Least Squares Filter: Example (cont.) Image degraded by motion blur + AWGN

Result of the Constrained Least square filter

ση2=650

ση2=325

ση2=130

Result of the Wiener filter

Constrained Least Squares Filter:Adjusting γ Define r = g − Hfˆ

T It can be shown that φ (γ ) = r r = r

We want to adjust gamma so that 1. Specify an initial value of γ 2. Compute r

r = η ±a 2

2

2

1

where a = accuracy factor

2

3. Stop if 1 is satisfied 2 2 Otherwise return step 2 after increasing γ if r < η − a or decreasing γ if r > η + a Use the new value of γ to recompute * ⎡ ⎤ ( , ) H u v Fˆ (u, v ) = ⎢ G ( u, v ) 2 2⎥ ⎢⎣ H (u, v ) + γ P(u, v ) ⎥⎦ 2

2

Constrained Least Squares Filter:Adjusting γ (cont.) * ⎡ ⎤ ( u, v ) H ˆ F ( u, v ) = ⎢ G ( u, v ) 2 2⎥ ⎢⎣ H (u, v ) + γ P(u, v ) ⎥⎦

R(u, v ) = G (u, v ) − H (u, v ) Fˆ (u, v ) 1 r = MN 2

1 mη = MN 1 σ η2 = MN

M −1 N −1

2 r ∑∑ ( x, y )

x =0 y =0

M −1 N −1

∑∑η ( x, y ) x =0 y =0

M −1 N −1

∑∑ [η ( x, y ) − m ]

2

η

x =0 y =0

[

η = MN σ η2 − mη 2

For computing r

]

For computing η

2

2

Constrained Least Squares Filter: Example Original image

Use correct noise parameters

Blurred image Due to Turbulence

Use wrong noise parameters

Correct parameters: Initial γ = 10-5 Correction factor = 10-6 a = 0.25 ση2 = 10-5

Wrong noise parameter ση2 = 10-2

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Results obtained from constrained least square filters

Geometric Mean filter This filter represents a family of filters combined into a single expression 1−α

⎡ ⎤ α⎢ ⎥ * * ⎡ H ( u, v ) ⎤ ⎢ H ( u, v ) ⎥ ˆ F ( u, v ) = ⎢ ⎥ 2 ⎢ ⎡ Sη (u, v ) ⎤ ⎥ H ( u , v ) 2 ⎢⎣ ⎥⎦ ⎢ H (u, v ) + β ⎢ ⎥⎥ ⎢⎣ ⎣ S f (u, v ) ⎦ ⎥⎦

α = 1 Æ the inverse filter α = 0 Æ the Parametric Wiener filter α = 0, β = 1 Æ the standard Wiener filter β = 1, α < 0.5 Æ More like the inverse filter β = 1, α > 0.5 Æ More like the Wiener filter Another name: the spectrum equalization filter

G ( u, v )

Geometric Transformation These transformations are often called rubber-sheet transformations: Printing an image on a rubber sheet and then stretch this sheet according to some predefine set of rules.

A geometric transformation consists of 2 basic operations: 1. A spatial transformation : Define how pixels are to be rearranged in the spatially transformed image. 2. Gray level interpolation : Assign gray level values to pixels in the spatially transformed image.

Geometric Transformation : Algorithm ( x′, y ′)

( x, y )

Image f to be restored

1

3

Distorted image g

1. Select coordinate (x,y) in f to be restored 2. Compute 4. get pixel value at g ( x′, y ′) x′ = r ( x, y ) By gray level interpolation y ′ = s( x, y ) 5. store that value in pixel f(x,y) ′ ′ ( x , y ) 3. Go to pixel in a distorted image g 5

Spatial Transformation To map between pixel coordinate (x,y) of f and pixel coordinate (x’,y’) of g x′ = r ( x, y ) y ′ = s( x, y ) For a bilinear transformation mapping between a pair of Quadrilateral regions

x′ = r ( x, y ) = c1 x + c2 y + c3 xy + c4 y ′ = s( x, y ) = c5 x + c6 y + c7 xy + c8

( x′, y ′)

( x, y )

To obtain r(x,y) and s(x,y), we need to know 4 pairs of coordinates ( x, y ) and its corresponding ( x′, y ′) which are called tiepoints. (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Gray Level Interpolation: Nearest Neighbor Since ( x′, y ′) may not be at an integer coordinate, we need to Interpolate the value of g ( x′, y ′) Example interpolation methods that can be used: 1. Nearest neighbor selection 2. Bilinear interpolation 3. Bicubic interpolation

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Gray Level Interpolation: Bilinear interpolation

Geometric Distortion and Restoration Example Original image and tiepoints

Tiepoints of distorted image

Distorted image

Restored image Use nearest neighbor intepolation (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Geometric Distortion and Restoration Example (cont.) Original image and tiepoints

Tiepoints of distorted image

Distorted image

Restored image Use bilinear intepolation (Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

Example: Geometric Restoration Original image

Geometrically distorted Image Use the same Spatial Trans (Bilinear). as in the previous example Restored image

Difference between 2 above images

(Images from Rafael C. Gonzalez and Richard E. Wood, Digital Image Processing, 2nd Edition.

## Digital Image Processing Digital Image Processing - CPE, KU

Domain Filtering. Band reject filter ... Reject Filter: Degraded image. DFT. Notch filter. (freq. Domain). Restored image. Noise ..... Then we get, the motion blurring transfer function: dt e. vuH. T ..... Another name: the spectrum equalization filter ...