Digital-Image-Processing-5th-Module
Digital-Image-Processing-5th-Module
The principal goal of restoration techniques is to improve an image in some predefined sense.
Restoration attempts to recover an image that has been degraded, by using a priori knowledge
of the degradation phenomenon.
ii. Thus restoration techniques are oriented towards modelling the degradation and applying
the inverse process in order to recover the original image.
iii. As Fig. 1 shows, the degradation process is modelled as a degradation function that,
together with an additive noise term, operates on an input image f(x, y) to produce a degraded
image g(x, y).
iv. Given g(x, y), some knowledge about the degradation function H, and some knowledge
about the additive noise term f(x, y), the objective of restoration is to obtain an estimate f(x, y)
of the original image.
v. We want the estimate to be as close as possible to the original input image and, in general,
the more we know about H and f, the closer f(x, y) will be to f(x, y).
vi. The restoration approach used mostly is based on various types of image restoration filters
vii. We know that if H is a linear, position-invariant process, then the degraded image is given in
the spatial domain by
g(x,y)=h(x,y)∗f(x,y)+77(x,y) Eq.(1)
Where h(x, y) is the spatial representation of the degradation function and the symbol "*"
indicates convolution.
viii. Now, convolution in the spatial domain is analogous to multiplication in the frequency
domain, so we may write the model in Eq. (1) in an equivalent frequency domain
representation:
G(u,v)=H(u,v)F(u,v)+N(u,v) (2)
ix. Where the terms in capital letters are the Fourier transforms of the corresponding terms in
Eq. (1). These two equations are the bases for most of the restoration material.
x. This is about the basic image restoration model.
The noise terms are unknown so subtracting them from g(x,y) or G(u,v) is not a realistic
approach. In the case of periodic noise it is possible to estimate N(u,v) from the
spectrumG(u,v).
So N(u,v) can be subtracted from G(u,v) to obtain an estimate of original image. Spatial filtering
can be done when only additive noise is present. The following techniques can be used to
reduce the noise effect:
i) Mean Filter:
ii) (a)Arithmetic Mean filter: It is the simplest mean filter. Let Sxy represents the set of
coordinates in the sub image of size m*n centered at point (x,y). The arithmetic mean filter
computes the average value of the corrupted image g(x,y) in the area defined by Sxy. The value
of the restored image f at any point (x,y) is the arithmetic mean computed
This operation can be using a convolution mask in which all coefficients have value 1/mn. A
mean filter smoothes local variations in image Noise is reduced as a result of blurring. For every
pixel in the image, the pixel value is replaced by the mean value of its neighboring pixels with a
weight .This will resulted in a smoothing effect in the image.
This filter is useful for flinging the darkest point in image. Also, it reduces salt noise of the min
operation.
(c)Midpoint filter: The midpoint filter simply computes the midpoint between the maximum
and minimum values in the area encompassed by
It comeliness the order statistics and averaging .This filter works best for randomly distributed
noise like Gaussian or uniform noise.
(d)Harmonic Mean filter: The harmonic mean filtering operation is given by the expression
FIND MORE NOTES @ VTUMECHNOTES.COM NOTES MADE BY ANISH JAIN
The harmonic mean filter works well for salt noise but fails for pepper noise. It does well with
Gaussian noise also.
(c) Order statistics filter: Order statistics filters are spatial filters whose response is based on
ordering the pixel contained in the image area encompassed by the filter. The response of the
filter at any point is determined by the ranking result.
Median filter:
It is the best order statistic filter; it replaces the value of a pixel by the median of gray levels in
the Neighborhood of the pixel.
The original of the pixel is included in the computation of the median of the filter are quite
possible because for certain types of random noise, the provide excellent noise reduction
capabilities with considerably less blurring then smoothing filters of similar size. These are
effective for bipolar and unipolor impulse noise.
Using the l00th percentile of ranked set of numbers is called the max filter and is given by the
equation
It is used for finding the brightest point in an image. Pepper noise in the image has very low
values, it is reduced by max filter using the max selection process in the sublimated area sky.
The 0th percentile filter is min filter
Inverse filtering
The simplest approach to restoration is direct inverse filtering where we complete an estimate
of the transform of the original image simply by dividing the transform of the degraded image
G(u,v) by degradation functionH(u,v)
Therefore
From the above equation we observe that we cannot recover the undegraded image exactly
because N(u,v) is a random function whose Fourier transform is not known.
One approach to get around the zero or small-value problem is to limit the filter frequencies to
values near the origin.
We know that H(0,0) is equal to the average values of h(x,y). By Limiting the analysis to
frequencies near the origin we reduce the probability of encountering zero values.
The objective is to find an estimate of the uncorrupted image f such that the mean square error
between them is minimized. The error measure is given by
We assume 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.
The power spectrum of the under graded image is rarely known. An approach used frequently
when these quantities are not known or cannot be estimated then the expression used is
Color Fundamentals
RGB colors are used for color TV, monitors, and video cameras.
However, the primary colors of pigments are cyan (C), magenta (M), andyellow (Y), and the
secondary colors are red, green, and blue. A proper combination of the three pigment
primaries, or a secondary with its opposite primary, produces black.
Color characteristics
Color Models
The purpose of a color model is to facilitate the specification of colors in some standard way. A
color model is a specification of a coordinate system and a subspace within that system where
each color is representedby a single point. Color models most commonly used in image
processing are:
CMY and CMYK (cyan, magenta, yellow, black) models for colorprinting
In this model, each color appears in its primary colors red, green, and blue. This model is
based on a Cartesian coordinate system. The color subspace is the cube shown in the
figure below. The different colors inthis model are points on or inside the cube, and are
defined by vectors extending from the origin.
All color values R, G, and B have been normalized in the range [0, 1].However, we can
represent each of R, G, and B from 0 to 255.
Each RGB color image consists of three component images, one for eachprimary color as
shown in the figure below. These three images are combined on the screen to produce a color
FIND MORE NOTES @ VTUMECHNOTES.COM NOTES MADE BY ANISH JAIN
image.
The total number of bits used to represent each pixel in RGB image iscalled pixel depth.
For example, in an RGB image if each of the red, green, and blue images is an 8-bit
image, the pixel depth of the RGB image is 24-bits. The figure below shows the
component images of anRGB image.
Full color
where, all color values have been normalized to the range [0, 1].
In printing, combining equal amounts of cyan, magenta, and yellow produce muddy-
looking black. In order to produce true black, a fourthcolor, black, is added, giving rise to
the CMYK color model.
The figure below shows the CMYK component images of an RGB image.
Yellow Black
The RGB and CMY color models are not suited for describing colors in terms of human
FIND MORE NOTES @ VTUMECHNOTES.COM NOTES MADE BY ANISH JAIN
interpretation. When we view a color object, we describeit by its hue, saturation, and
brightness (intensity). Hence the HSI color model has been presented. The HSI model
decouples the intensity component from the color-carrying information (hue and
saturation) in a color image. As a result, this model is an ideal tool for developing color
image processing algorithms.
The hue, saturation, and intensity values can be obtained from the RGBcolor cube. That
is, we can convert any RGB point to a corresponding point is the HSI color model by
working out the geometrical formulas.
Approaches that process each component image individually and then form a
composite processed color image from the individuallyprocessed components.
In order for per color component and vector based processing to be equivalent, two
conditions have to be satisfied: First the process has to be applicable to both vectors and
scalars. Second, the operation on each component of a vector must be independent of
the other components.
Suppose that the process is neighborhood averaging. In fig 6.29(a) averaging would be
accomplished by summing the intensities of all the pixels in the neighbdorhood and
dividing by the total number of pixels in the neighborhood.
Fig 6.29(b) averaging would be doneby summing all the vectors in the neighborhood and
dividing each component by the total number of vectors in the neighborhood. But each
component of the average vector is the sum of the pixels in the image corresponding to
that component, which is the same as the result that would be obtained if the averaging
were done on a per-color component basis and then the vector was formed
Color Transformation
(𝑥, 𝑦) = 0.7ƒ(𝑥, 𝑦)
FIND MORE NOTES @ VTUMECHNOTES.COM NOTES MADE BY ANISH JAIN
In the RGB color space, three components must be transformed:
𝑠i = 0.7𝑟i i = 1,2,3
(a) (b)
Figure 15.8 (a) Original image. (b) Result of decreasing its intensity
Pseudocolor (also called false color) image processing consists of assigning colors to gray
values based on specific criterion. The term pseudo or false colour is used to differentiate
the process of assigning colours in monochrome images from the processes associated
with true colour images.The principal use of pseudocolor is for human visualization and
interpretation of gray scale events in an image or sequence of images.
The technique of intensity (sometimes called density) slicing and colour coding is one of the simplest
examples of pseudocolor image processing.
If an image is interepreted as a 3D function, the method can be viewed as one of placing planes
parallel to the coordinate plane of the image; each plan then “slices: the function in the area of
intersection. Figure 6.18 shows an example of using a plane at f(x,y) = li to slice the image function
into two levels.
If a different color is assigned to each side of the plane shown in fig 6.18, any pixel whose intensity
level is above the plane will be coded with one color, and any pixel below the plane will be coded
with the other.
Levels that lie on the plane itself may be arbitrarily assigned one of the two colors. The result is a
two color image whose relative appearance can be controlled by moving the slicing plane up and
down the intensity axis.
Let [0, L -1] represent the gray scale, Let [0, L – 1] represent the gray scale,
let level l0 represent black [f(x,y) = 0] and level lL-1 represent white [f(x,y) = L -1].
Suppose that P planes perpendicular to the intensity axis are defined at levels l1, l2… lp. Then
assuming that 0, P < L – 1, the P planes partition the gray scale into P + 1 intervals, V1, V2… VP + 1.
Fig 6.19 shows an alternative representation that defines the same mapping as in fig 6.18. According
to the mapping functions shown in fig 6.19, any input intensity level is assigned one of two colours,
depending on whether it is above or below the value of li.
When more levels are used, the mapping function takes on a staircase form
We can generalize the above technique by performing three independent transformations on the
intensity of the image, resulting in three images which are the red, green, blue component images
used to produce a color image. The three results are then fed separately into the red, green and blue
channels of a color television monitor.
This method produces a composite image whose color content is modulated by the nature of the
transformation functions.
The flexibility can be even more enhanced by using more than one monochrome images, for
example, the three components of an RGB and the thermal image.
We often come across multispectral images in remote sensing systems, for example, Landsat
Thematic Mapper (TM) Band 7 which targets the detection of hydrothermal
alteration zones in bare rock surfaces.
Multispectral image processing allows us to infer the wavelengths that cannot be captured by the
conventional RGB cameras or even human eyes. This is an important technique for space-based
images, or document and painting analysis.
Noise models
The principal source of noise in digital images arises during image acquisition and or transmission.
The performance of imaging sensors is affected by a variety of factors, such as environmental
conditions during image acquisition and by the quality of the sensing elements themselves. Images
are corrupted during transmission principally due to interference in the channels used for
transmission. Since main sources of noise presented in digital images are resulted from atmospheric
disturbance and image sensor circuitry, following assumptions can be made i.e. the noise model is
spatial invariant (independent of spatial location). The noise model is uncorrelated with the object
function.
GAUSSIAN NOISE:
These noise models are used frequently in practices because of its tractability in both spatial and
frequency domain.
Where z represents the gray level, μ= mean of average value of z, σ= standard deviation.
The Gaussian noise arises in an image due to factors such as electronic circuit noise and sensor noise
due to poor illumination. The images acquired by image scanners exhibit this phenomenon.
RAYLEIGH NOISE:
Unlike Gaussian distribution, the Rayleigh distribution is no symmetric. It is given by the formula
Where a>0. The mean and variance of this density are given by
Figure shows a plot of the Rayleigh density. Note the displacement from the origin and the fact that
the basic shape of this density is skewed to the right. The Rayleigh density can be quite useful for
approximating skewed histograms
If b>a, intensity b will appear as a light dot on the image and a appears as a dark dot If either Pa or
Pb is zero the noise is called unipolar. If neither probability is zero, and especially if they are
approximately equal, impulse noise value will resemble salt and pepper granules randomly
distributed over the image. For this reason, bipolar impulse noise is called salt and pepper noise.
In this case, the noise is signal dependent, and is multiplied to the image.