image restoration
image restoration
IMAGE RESTORATION
Basic Idea
• With Image Restoration one tries to repair errors or distortions
in an image, caused during the image creation process.
• In general our starting point is a degradation and noise model:
g(x, y) = H ( f(x, y) ) + (x, y)
Image restoration assumes a degradation model that is known
or can be estimated.
• Image restoration try to recover original image from degraded
with prior knowledge of degradation process.
• Restoration involves modeling of degradation and applying the
inverse process in order to recover the original image.
• Although the restore image is not the original image, its
approximation of actual image.
Image Enhancement vs. Image
Restoration
• Image enhancement: process image so that the result is more
suitable for a specific application, is largely a subjective
process.
• Image restoration: recover image from distortions to its
original image, is largely an objective process.
• Image enhancement techniques are basically heuristic
procedure designed to manipulate an image in order to take
advantage of the psychophysical aspects of human visual
systems.
• In contrast, the restoration approach usually involves
formulating a criterion of goodness that will yield an optimal
estimate of the desired result.
Model of Image Degradation/Restoration
Degradation process is modeled as a degradation function that
together with an additive noise, operates on an input image f(x, y) to
produce a degraded image g(x, y).
g ( x, y ) f ( x, y ) ( x, y )
Degraded images
Original image
Histogram
Image Degradation with Additive Noise
g ( x, y ) f ( x, y ) ( x, y )
Degraded images
Original image
Histogram
Estimation of Noise Parameters
g ( x, y ) f ( x, y ) h( x, y ) ( x, y )
ˆf ( x, y ) 1
mn ( s ,t )S xy
g ( s, t )
fˆ ( x, y ) g ( s, t )
( s ,t )S
xy
Geometric Mean Filter: Example
Image
Original
corrupted
image
by AWGN
Image Image
obtained obtained
using a 3x3 using a 3x3
arithmetic geometric
mean filter mean filter
( s ,t )S xy
g ( s, t ) Q 1
Positive Q is suitable for
eliminating pepper noise.
fˆ ( x, y ) Negative Q is suitable for
( s ,t )S xy
g ( s, t ) Q eliminating salt noise.
Image Image
obtained obtained
using a 3x3 using a 3x3
contra- contra-
harmonic harmonic
mean filter mean filter
With Q = 1.5 With Q=-1.5
Contra-harmonic Filters: Incorrect Use Example
Image Image
corrupted corrupted
by pepper by salt
noise with noise with
prob. = 0.1 prob. = 0.1
Image Image
obtained obtained
using a 3x3 using a 3x3
contra- contra-
harmonic harmonic
mean filter mean filter
With Q=-1.5 With Q=1.5
Order-Statistic Filters: Revisited
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
Min filter
fˆ ( x, y ) min g ( s, t )
Reduce “bright” noise
(salt noise)
( s ,t )S xy
Mid-point filter
ˆf ( x, y ) 1 max g ( s, t ) min g ( s, t )
2 ( s ,t )Sxy
( s , t )S xy
Median Filter : How it works
A median filter is good for removing impulse, isolated noise
Salt noise
Pepper noise
Median
Sorted
Degraded image Moving array
window
Salt noise Filter output
Pepper noise
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
Image
corrupted
by salt-and-
pepper
noise with
pa=pb= 0.1
3 4
Image Image
obtained obtained
using a 3x3 using a 3x3
max filter min filter
Alpha-trimmed Mean Filter
Formula:
1
fˆ ( x, y )
mn d
( s ,t )S xy
g r ( s, t )
Image 2 Image 2
obtained obtained
using a 5x5 using a 5x5
arithmetic geometric
mean filter mean filter
Alpha-trimmed Mean Filter: Example (cont.)
1 2
Image
additionally
Image corrupted
corrupted by additive
by additive salt-and-
uniform pepper
noise noise
Image 2
obtained
Image 2 using a 5x5
obtained alpha-
using a 5x5 trimmed
median filter mean filter
with d = 5
Alpha-trimmed Mean Filter: Example (cont.)
Image Image
obtained obtained
using a 5x5 using a 5x5
arithmetic geometric
mean filter mean filter
Image
obtained
Image using a 5x5
obtained alpha-
using a 5x5 trimmed
median filter mean filter
with d = 5
Adaptive Median Filter
• Adaptive median filter has three main purposes:
Methods:
1. Estimation by Image Observation
2. Estimation by Experiment
3. Estimation by Modeling
Restoration Using Degradation Model
• The degradations are modeled as being result of convolution, and
restoration seeks to find filters that apply process in reverse.
• The filters used in the restoration process often are called deconvolution
function.
• Using the sample gray levels of the object and background, we can
construct an un-blurred image of the same size and characteristics
as the observed sub-image.
Observation
DFT Subimage
Estimated Transfer
function Gs (u, v ) g s ( x, y )
Restoration
G ( u, v ) process by
H ( u, v ) H s ( u, v ) s estimation
Fˆs (u, v )
DFT Reconstructed
This case is used when we
Fˆs (u, v ) Subimage
know only g(x, y) and cannot
repeat the experiment! fˆs ( x, y )
Estimation by Experimentation
• If the equipment similar to the equipment used to acquire the
degraded image is available, it is possible in principle to obtain an
accurate estimate of the degradation.
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
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
k (u2 v2 )5/6
H(u, v) e
k = 0.0025
k = 0.001 k = 0.00025
Proposed by Hufnagel and Stanley in 1964
Inverse Filter
From degradation model:
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 frequency component (u, v) with in
a radius D0 from the center of (u, v).
0.0025 ( u 2 v 2 ) 5/6
H (u , v ) e
Wiener Filter: Minimum Mean Square
Error Filter
• The inverse filtering approach discussed so far makes no
explicit provision for handling noise.
• The current approach incorporates both the degradation
function and statistical characteristics of noise into the
restoration process.
• The method is founded on considering images and noise as
random processes.
• Wiener filtering was one of the first methods developed to
reduce additive random noise in images. It works on the
assumption that additive noise is a stationary random
process, independent of pixel location; the algorithm
minimizes the square error between the original and
reconstructed images.
Wiener Filter
• Wiener filtering is a statistical image processing technique
used to reduce noise and blur in images by estimating the
original image from a degraded version, assuming knowledge
of the image and noise spectral characteristics.
• It finds the optimal balance between noise removal and detail
preservation by minimizing the mean squared error between
the original and restored images.
Wiener Filter
• Wiener filtering is a statistical image processing technique
used to reduce noise and blur in images by estimating the
original image from a degraded version, assuming knowledge
of the image and noise spectral characteristics.
• It finds the optimal balance between noise removal and detail
preservation by minimizing the mean squared error between
the original and restored images.
• The objective is to find an estimate of the uncorrupted image
function f such that the mean square error between the
original and the estimate is minimized.
• It is assumed that:
– the noise and the image are uncorrelated;
– one or the other has zero mean;
– the gray levels in the estimate are a linear function of the
levels in the degraded image.
Wiener Filter: Minimum Mean Square Error Filter
Objective: optimize mean square error: e E ( f fˆ )
2 2
Wiener Filter Formula:
H *
(u , v ) S ( u , v )
Fˆ (u, v) f
2
G (u , v)
S f (u, v) H (u, v) S (u, v)
H * (u , v)
2
G (u , v )
H (u, v) S (u, v) / S f (u, v)
1 H (u , v)
2
2
G (u, v )
H (u , v) H (u , v) S (u, v) / S f (u, v)
where
H(u, v) = Degradation function
Sh(u, v) = Power spectrum of noise
Sf(u, v) = Power spectrum of the un-degraded image
Approximation of Wiener Filter
Wiener Filter Formula:
1 H (u , v )
2
Fˆ (u, v) 2
G (u, v)
H (u, v) H (u , v) S (u , v) / S f (u , v)
Difficult to estimate
Approximated Formula:
1 H (u, v)
2
ˆ
F (u, v) G (u, v)
2
H (u, v) H (u , v) K
s2=325
Note: K is
chosen
manually
s2=130
Different restoration approaches
Frequency domain Algebraic approaches
– Inverse filter – Unconstrained
– Wiener (minimum mean optimization
square error) filter – Constrained
optimization
52
Homomorphic filtering
INTRODUCTION
• Homomorphic filtering is a generalized technique for signal and image
processing, involving a nonlinear mapping to a different domain in which
linear filter techniques are applied, followed by mapping back to the
original domain.
• It simultaneously normalizes the brightness across an image and increases
contrast.
Applications
• Homomorphic filter is sometimes used for image enhancement.
• Homomorphic filtering is one such technique for removing multiplicative
noise that has certain characteristics.
• Homomorphic filtering is most commonly used for correcting non-uniform
illumination in images.
• Homomorphic filtering can be used for improving the appearance of a
grayscale image by simultaneous intensity range compression (illumination)
and contrast enhancement (reflection).
Illumination-Reflectance Model
• The illumination-reflectance model of image formation says that
the intensity at any pixel, which is the amount of light reflected
by a point on the object, is the product of the illumination of the
scene and the reflectance of the object(s) in the scene, i.e.,
I(x,y)=L(x,y) * R(x,y)
where I is the image, L is scene illumination, and R is scene
reflectance.
• Illumination Reflectance model can be used to address the
problem of improving the quality of an image that has been
acquired under poor illumination conditions.
• Illumination typically varies slowly across the image as
compared to reflectance which can change quite abruptly at
object edges.
Continued…