SMOOTHING, RESTORATION
AND
ENHANCEMENT
Spatial filters for
de-noising additive noise
• Skills similar to image enhancement
• Mean filters
• Order-statistics filters
• Adaptive filters
Courtesy: Jen-Chang Liu
Order-statistics filters
• Based on the ordering(ranking) of pixels
– Suitable for unipolar or bipolar noise (salt and
pepper noise)
• Median filters
• Max/min filters
• Midpoint filters
• Alpha-trimmed mean filters
Smoothing - Spatial Domain
The simplest approach is neighborhood averaging, where each
pixel is replaced by the average value of the pixels contained in some
neighborhood about it.
The simplest case is probably to consider the group of pixels
centered on the given pixel, and to replace the central pixel value by the
un-weighted (for weighted - Gaussian function is commonly used )
average of these (nine, in case of 3*3 neighborhood) pixels.
For example, the central pixel in Figure below is replaced by the value:
13 (the nearest integer to the average).
If any one of the pixels in the neighborhood has a faulty value
due to noise, this fault will now be smeared over nine pixels as the
image is smoothed. This tends to blur the image.
A better approach is to use a median filter.
A similar neighborhood around the pixel under consideration
is used, but this time the pixel value is replaced by the median pixel
value in the neighborhood.
Thus, if we have a 3*3 neighborhood, we write the 9 pixel
values in sorted order, and replace the central pixel by the fifth highest
value. For example, again taking the data shown in Figure above, the
central pixel is replaced by the value:
12
This approach has two advantages.
• Occasional spurious high or low values are not averaged in --
they are ignored
• The sharpness of edges is preserved. To see this, consider the
pixel data shown in the next slide.
When the neighborhood covers the left-hand nine pixels, the
median value is 10; when it covers the right hand ones, the median value
is 20; thus the edge is preserved.
• If there are large amounts of noise in an image, more than one
pass of median filtering may be useful to further reduce the noise.
• A rather different real space technique for smoothing is to
average multiple copies of the image.
• The idea is that over several images, the noise will tend to cancel
itself out if it is independent from one image to the next.
• Statistically, we expect the effects of noise to be reduced by a
factor n-1/2, if we use n images. One particular situation where this
technique is of use, is in low lighting conditions.
Original Image Median Filtered Image
Noisy Image
Original Image Median Filtered Image
Noisy Image
Original Image Median Filtered Image
Noisy Image
Periodic noise reduction
BESSEL
• Bandreject filters
• Bandpass filters OTHERS
• Notch filters - Butterworth
• Optimum notch filtering - Chebyshev
- Weiner
- Bessel
- Gaussian
- Bilateral, Box;
- Ring filters
- Gabor
- DWT, DCT
Original Image Noisy Image
Median Filtered Image Filtered using Wiener Filter
Original Image Noisy Image
Median Filtered Image Filtered using Wiener Filter
MATHEMATICAL MODEL OF IMAGE DEGRADATION
Gs (u , v) ^
H s (u , v) =
Fs (u , v) F (u , v) = G (u , v)
H s (u , v)
Obtain restoration as:
F (u , v) = H −1 (u , v)G (u , v)
Minimize
(by Optimization):
(Constrained Least Squares, Splines, TV-Reg)
Refs:
https://www.clear.rice.edu/elec431/projects95/lords/wolf.html;
https://user.eng.umd.edu/~fywang/assets/lab3/html/lab3.html;
https://www.cs.uoi.gr/~cnikou/Courses/Digital_Image_Processing
/Chapter_05b_Image_Restoration_(Linear_Restoration).pdf
Inverse filtering
• With the estimated degradation function
H(u,v)
G(u,v)=F(u,v)H(u,v)+N(u,v)
Unknown
noise
=> ˆ G (u , v) N (u, v)
F (u, v) = = F (u , v) +
H (u , v) H (u, v)
Estimate of Problem: 0 or small values
original image Sol: limit the frequency
around the origin
Psuedo- Inverse Filter
Given H(u,v), one may directly estimate
the original image by
G (u , v) = H (u , v) F (u , v) + N (u, v)
original, f degraded: g
At (u,v) where H(u,v) ≈ 0, the 20 20
noise N(u,v) term will be amplified! 40 40
60 60
20 40 60 20 40 60
Fˆ (u , v) = G (u , v) / H (u , v)
inverse filter
20
N (u , v)
= F (u , v) + 40
H (u , v) 60
20 40 60
WEINER
FILTER
H (u, v) is the transform of
the degradation function
and
G (u, v) is the transform of
the degraded image.
Al- Khwarizmi
Engineering
Journal,
Vol.3, No.1,
pp 48-62 (2007)
inverse filtering Wiener filtering
Other types of degradations, typically present in images/videos:
- Low contrast
- Low illumination
- Optical distortions (more on this later)
- Blur : defocus, motion
- Scratches
- Low resolution
- Ghosts
- Fog/mist; atmospheric conditions
- Glare
- Degraded ink or Material (due to aging, lack of proper
preservation etc.) being imaged
- Ice/water/dirt on lens
- Color Saturation, fading, diffusion, ….
- …..
These could be spatially varying, or even exist as combinations.
Modern methods of Noise Removal use:
• Iterative and Adaptive Kalman Filtering
• Discrete Wavelet (multi-channel) transform
• SVD (PCA), ICA • Level Set Methods
• Fuzzy-based methods • Basis Pursuit
• Graph-based approaches
• Optimization frameworks
• Stanford – DUDE
• Non-linear ANNs
• Minimax Risk
• Anisotropic diffusion (filtering)
• Manifold-based learning
• Bilateral & Homomorphic filtering
• CLAHE
• Non-local means
• Shock Filter
• Particle Filtering
• DL based methods ??
IMAGE RESTORATION (WIENER) AND ENHANCEMENT
CLAHE - contrast-limited adaptive histogram equalization
Weiner
And
Inverse filter
outputs
Image Enhancement
CONTRAST STRETCHING
This is a pixel-based operation, where a given gray level
r ∈ [0, L] mapped into a gray level s ∈ [0, L] according to a transformation
function:
s = T(r)
This process is mainly used to enhance done to handle
low-contrast images occurring due to poor or non-uniform lighting
conditions or due to non-linearity or small dynamic range of the
imaging sensor.
Following examples shows some typical contrast
stretching transformations.
s
S=T(r)
Original image After contrast stretching
s
S=T(r)
Original image After contrast stretching
How to find a s = T(r), which depends on the image data
and hence produces a global transform/enhancement of the
image, and not simply a local transformation of the pixel ??
Let us look at Histogram Equalization next.