Professional Documents
Culture Documents
UNIT 1
FUNDAMENTALS OF DIP
INTRODUCTION
• It is denoted as f(x ,y), where ‘x’ and ‘y’ are spatial co-ordinates and amplitude of ‘f’
at any pair of co-ordinates(x, y) is called intensity of the image at that point.
(i) the methods whose input and output are images and
(ii) the methods whose inputs may be images and outputs are attributes
extracted from those images.
• Image enhancement.
• Image restoration.
• Image compression.
• Segmentation.
• Representation.
• Recognition.
• Interpretation.
Image Acquisition.
• If the output is not in digital form, it is converted to digital form using analog to
digital converter.
Image Pre-processing
Image Enhancement
Image Restoration
Image Enhancement
• Principal objective is to process an image so that result is more suitable than original
image.
Image Restoration
Wavelets
• These are the foundations for representing images in various degrees of resolution.
• Used for image data compression and for pyramidal representation, in which images
are sub divided into smaller regions.
Image Compression
• It deals with techniques for reducing the storage required to save an image or the
bandwidth require to transmit it.
Segmentation
• Output segmentation stage is raw pixel data consisting either boundary of a region or
all the points in the region.
• Representation and description is the process of converting raw pixel data to a form
suitable for computer processing.
Knowledge Base
• Knowledge about the problem domain is coded into the image processing system in
the form of knowledge base.
• Each module will interact with the knowledge base to decide about the appropriate
technique for the right application
(1) Amount of source illumination incident on the scene being viewed, i(x,y).
(2) Amount of illumination reflected by the objects in the scene,r(x,y).
F(x,y) = i(x,y)r(x,y)
It is the brightness of a pixel. The value associated with a pixel representing it’s
lightness from black to white. Usually defined as, a value from 0 to 255, with 0 being
black and 255 being white.
Optical Illusions
[ ]
128 127 1 . .
255 . . . .
120 . . . .
. . . . .
. . . . .
f(x,y)
Gray Level
A pixel p at coordinates (x, y) has four horizontal and vertical neighbours whose
coordinates are given by (x+1, y), (x-1, y), (x, y+1), (x, y-1). This set of pixels called
the 4-neighbors of p, is denoted by N4(p). Each pixel is a unit distance from (x, y), and
some of the neighbors of p lie outside the digital image if (x, y) is on the border of the
image.
The four diagonal neighbors of p have coordinates (x+1, y+1), (x+1, y-1), (x-1, y+1),
(x-1, y-1) and are denoted by ND(p). These points, together with the 4-neighbors, are
called the 8- neighbors of p, denoted by N8(p). As before, some of the points in ND(p)
and N8(p) fall outside the image if (x, y) is on the border of the image.
Imaging Geometry:
The basic transformations in image geometry are scaling, translation and rotation.
Here all transformation is expressed in 3D coordinate system (x, y, z).
1. Translation:
The point (x, y, z) is translated to new location with coordinates (x0, y0, z0) which
can be done by translation i.e.,
x*=x0+x
y*=y0+y
z*=z0+z
Therefore, x*, y* and z* are the coordinates of new location. The above equations
are written in the form of matrix as:
2. Scaling:
The scaling of coordinates (x, y, z) are represented by Sx, Sy and Sz. Then scaling
transformation matrix is
3. Rotation:
Rotation of arbitrary requires three steps. They are the arbitrary point is
translated to origin, performs rotation and translates the point back to its current
position.Rotation of a point about x-axis by angle α is denoted by Rα .Similar
transformations are performed for y and z axis at an angle of β and θ respectively.
Spectrum of White Light: In1666 Sir Isaac Newton, 24 year old, discovered white
light spectrum.There are 2 types of color image processes
2. Full color image process: The process to manipulate realcolor images such
as color photographs.
Electromagnetic Spectrum
Red = 700 nm
Green = 546.1nm
Blue = 435.8 nm
Additive primary colors: RGBuse in the case of light sourcessuch as color monitors.
Color Characterization
Brightness: Intensity
Amount of red (X), green (Y) and blue (Z) to form any particularcolor is called tristimulus
Trichromatic coefficients:
X
x=
X +Y +Z
Y
y=
X +Y +Z
Z
z=
X +Y + Z
x+ y+ z=1
CIE Chromaticity Diagram
The RGB Cube is divided into6 intervals on each axis to achievethe total 6 3 = 216 common colors.
However, for 8 bit color representation, there are the total256 colors. Therefore, the remaining40
colors are left to OS.
C = Cyan
M = Magenta
Y = Yellow
K = Black
[ ][][ ]
C 1 R
M =1 −G
Y 1 B
HSI Color Model
RGB, CMY models are not good for human interpreting.HSI (Hue.Saturation,Intensity)color model
decouples the intensity component from the color carrying information(hue and saturation) in a color
image. Thus HSI Model is an ideal tool for developing image processing algorithms based on colour
descriptions that are natural and intuitive to humans.
Intensity: Brightness
All points contained in the plane segment by the intensity axis and boundaries of the
cube have same hue. All colours generated by three colours lie in the triangle defined by
those colors.If two of those points are black &white, third is a colour point, all points on the
triangle have same hue because black and white components cannot change hue.
Intensity is given by a position on the vertical axis
Example: HSI Components of RGB Cube
RGB CUBE
H= {θ360−θ if B≤G
if B>G
1
( R G ) ( R B )
cos 1 2
1/ 2
(
R G ) 2
( R B )( G B )
1
I= ( R+G+ B )
3
3
S=1−
R+G+B
RG sector:
0≤H< 120
R=I 1+
[ S cos H
∘
cos (60 −H ) ]
B=I (1−S )
G=1−( R+B)
BR sector
240≤H ≤360
H=H −240
B=I 1+
[ S cos H
∘
cos(60 −H ) ]
G=I (1−S )
R=1−(G+B)
GB sector
120≤H <240
H=H −120
R=I (1−S )
G=I 1+
[ S cos H
∘
cos(60 −H ) ]
B=1−( R+G)
UNIT 2
IMAGE TRANSFORMS
INTRODUCTION
Transform is basically a mathematical tool for representing a signal. Need for transform
is given as follows:
Every action in time domain will have an impact in the frequency domain.
(3) Transforms whose basics function depends on the statistics of o/p data.
Transform whose basic function is sinusoidal in nature include Fourier, discrete cosine
&discrete sine transform.
FOURIER TRANSFORM
The Fourier Transform is used in a wide range of applications, such as image analysis, image
filtering, image reconstruction and image compression.
The DFT is the sampled Fourier Transform and therefore does not contain all frequencies
forming an image, but only a set of samples which is large enough to fully describe the
spatial domain image. The number of frequencies corresponds to the number of pixels in the
spatial domain image, i.e. the image in the spatial and Fourier domain are of the same size.
For a square image of size N×N, the two-dimensional DFT is given by:
where f(a,b) is the image in the spatial domain and the exponential term is the basis function
corresponding to each point F(k,l) in the Fourier space. The equation can be interpreted as:
the value of each point F(k,l) is obtained by multiplying the spatial image with the
corresponding base function and summing the result.The basic functions are sine and cosine
waves with increasing frequencies, i.e. F(0,0) represents the DC-component of the image
which corresponds to the average brightness and F(N-1,N-1) represents the highest
frequency.In a similar way, the Fourier image can be re-transformed to the spatial domain.
The inverse Fourier transform is given by:
To obtain the result for the above equations, a double sum has to be calculated for each image
point. However, because the Fourier Transform is separable, it can be written as
where
Using these two formulas, the spatial domain image is first transformed into an intermediate
image using N one-dimensional Fourier Transforms. This intermediate image is then
transformed into the final image, again using None-dimensional Fourier Transforms.
Expressing the two-dimensional Fourier Transform in terms of a series of 2N one-
dimensional transforms decreases the number of required computations.
Even with these computational savings, the ordinary one-dimensional DFT has
complexity. This can be reduced to if we employ the Fast Fourier
Transform (FFT) to compute the one-dimensional DFTs. This is a significant improvement, in
particular for large images. There are various forms of the FFT and most of them restrict the
size of the input image that may be transformed, often to where n is an integer. The
mathematical details are well described in the literature.
The Fourier Transform produces a complex number valued output image which can be
displayed with two images, either with the real and imaginary part or
with magnitude and phase. In image processing, often only the magnitude of the Fourier
Transform is displayed, as it contains most of the information of the geometric structure of
the spatial domain image. However, if we want to re-transform the Fourier image into the
correct spatial domain after some processing in the frequency domain, we must make sure to
preserve both magnitude and phase of the Fourier image.
The Fourier domain image has a much greater range than the image in the spatial domain.
Hence, to be sufficiently accurate, its values are usually calculated and stored in float values.
There are a variety of properties associated with the Fourier transform and the inverse Fourier
transform. The following are some of the most relevant for digital image processing.
* The Fourier transform is, in general, a complex function of the real frequency variables. As
such the transform con be written in terms of its magnitude and phase.
* A 2D signal can also be complex and thus written in terms of its magnitude and phase.
The symbol (*) indicates complex conjugation. For real signals equation leads directly to,
* If a 2D signal is real and even, then the Fourier transform is real and even
* The Fourier and the inverse Fourier transforms are linear operations
where a and b are 2D signals (images) and and are arbitrary, complex constants.
* The Fourier transform in discrete space, ,is periodic in both and .Both
periods are
integers
DISCRETE COSINE TRANSFORM (DCT):
This is a transform that is similar to the Fourier transform in the sense that the new
independent variable represents again frequency. The DCT is defined below.
N−1
C(u )=a(u) ∑ f ( x )cos
x=0
[ (2 x+1 )uπ
2N ] , u=0,1,…,N −1
a(u )=
{ √ 1/N
√ 2/N u=1,…, N−1
u=0
N−1
f (x )= ∑ a (u)C(u )cos
u=0
[ (2 x+1 )uπ
2N ]
N−1
f (x )= ∑ a (u)C(u )cos
u=0
[ (2 x+1 )uπ
2N ]
Two dimensional signals (images)
The DCT is a real transform. This property makes it attractive in comparison to the
Fourier transform.
The DCT has excellent energy compaction properties. For that reason it is widely used in
image compression standards (as for example JPEG standards).
There are fast algorithms to compute the DCT, similar to the FFT for computing the DFT.
HADAMARD TRANSFORM (HT)
Definition
In a similar form as the Walsh transform, the 2-D Hadamard transform is defined as follows.
Forward
[ ]
N −1 N−1 n−1
1 ( b i ( x ) bi ( u)+b i ( y )b i ( v ) )
H (u , v )= ∑ ∑ f ( x , y ) ∏ (−1 )
N x=0 y=0 i=0 , N=2n or
n−1
N −1 N−1 ∑ ( b i ( x ) bi ( u)+b i ( y ) bi ( v ) )
1
H (u , v )=
N
∑ ∑ f ( x , y )(−1) i=0
x=0 y=0
Inverse
[ ]
N−1 N−1 n−1
1 ( b i ( x ) bi ( u)+b i ( y )b i ( v ) )
f (x , y )=
N
∑ ∑ H (u , v ) ∏ (−1 )
u=0 v=0 i=0 etc.
Most of the comments made for Walsh transform are valid here.
The Hadamard transform differs from the Walsh transform only in the order of basis
functions. The order of basis functions of the Hadamard transform does not allow the fast
computation of it by using a straightforward modification of the FFT. An extended
version of the Hadamard transform is the Ordered Hadamard Transform for which a fast
algorithm called Fast Hadamard Transform (FHT) can be applied.
H 2 N=
[ HN H N
H N −H N ]
UNIT – 3
• Process an image so that the result will be more suitable than the original image for a
specific application.
• A method which is quite useful for enhancing an image may not necessarily be the best
approach for enhancing another images
Frequency Domain :
Good images
– A good image is one which gives the best machine recognition results.
A certain amount of trial and error usually is required before a particular image enhancement
approach is selected.
Spatial Domain
g(x,y) = T[f(x,y)]
where
– f(x,y) is the input image
Point Processing
• The simplest kind of range transformations are these independent of position x,y:
g = T(f)
s = T(r)
Where
Obstacle with point processingAssume that f is the clown image and T is a random
function and apply g = T(f):
1. Linear function
2. Logarithm function
3. Power-law function
IDENTITY FUNCTION
IMAGE NEGATIVES
LOG TRANSFORMATIONS
s = c log (1+r)
• c is a constant and r ³ 0
• Log curve maps a narrow range of low gray-level values in the input image into a
wider range of output levels.
Used to expand the values of dark pixels in an image while compressing the higher-level
values
Example of Logarithm:
A Fourier spectrum with values in the range 0 to 1.5 x 10 6 is shown in figure below..When
these values are scaled linearly for display in an 8- bit system, the brightest pixels will
dominate the display, at the expense of lower values of the spectrum.Effect of this dominance
is illustrated vividly by the relatively small area of the imageas shown in figure below that is
not perceived as black.
Fourier Spectrum with range = 0 to 1.5 x 10 6andResult after apply the log transformation with c = 1,
range = 0 to 6.2
• Used to expand the values of high pixels in an image while compressing the darker-
level values
POWER-LAW TRANSFORMATIONS
s = crg
• Power-law curves with fractional values of g map a narrow range of dark input values
into a wider range of output values, with the opposite being true for higher values of
input levels.
• c = g = 1 a Identity function
• Variety of devices used for image capture, printing and display respond according to
power law. The process used to correct these power law response phenomena is called
gamma correction.
Plots of s = crgfor various values of g(c = 1 in all cases)
• A cathode ray tube (CRT), for example, converts a video signal to light in a nonlinear
way. The light intensity I is proportional to a power (γ) of the source voltage VS
Gamma Correction
(a) a magnetic resonance image of an upper thoracic human spine with a fracture dislocation
and spinal cord impingement
• When the g is reduced too much, the image begins to reduce contrast to the point
where the image started to have very slight “wash-out” look, especially in the
background.
a b
c d
Example 3:
(a) image has a washed-out appearance, it needs a compression of gray levels a needs g> 1
• Advantage:
• Disadvantage:
CONTRAST STRETCHING
(b) a low-contrast image : result from poor illumination, lack of dynamic range in the
imaging sensor, or even wrong setting of a lens aperture of image acquisition
(c) result of contrast stretching: (r1,s1) = (rmin,0) and (r2,s2) = (rmax,L-1)
GRAY-LEVEL SLICING
– Display a high value of all gray levels in the range of interest and a low value
for all other gray levels.This transformation produces binary image.
– Brightens the desired range of gray levels but preserves the background and
gray level tonalities in the image.
(a) Transformation highlights range [A,B] of gray level and reduces all others to a
constant level
(b) Transformation highlights range [A,B] but preserves all other levels
BIT-PLANE SLICING
• Useful for analyzing the relative importance played by each bit of the image
Examples:
• The (binary) image for bit-plane 7 can be obtained by processing the input image with
a thresholding gray-level transformation.
8 bit planes
Bit-plane 7 Bit-plane 6
HISTOGRAM PROCESSING
• Histogram of a digital image with gray levels in the range [0,L-1] is a discrete
function
h(rk) = nk
Where
Normalized Histogram
• dividing each of histogram at gray level rk by the total number of pixels in the image, n
p(rk) = nk / n
• For k = 0,1,…,L-1
Example
Dark image:Components of histogram are concentrated on the low side of the gray scale.
Bright image:Components of histogram are concentrated on the high side of the gray
Low-contrast image:histogram is narrow and centered toward the middle of the gray scale
High-contrast image:histogram covers broad range of the gray scale and the distribution of
pixels is not too far from uniform, with very few vertical lines being much higher than the
others.
Cumulative Histograms:
HISTOGRAM EQUALIZATION
• As the low-contrast image’s histogram is narrow and centered toward the middle of
the gray scale, if we distribute the histogram to a wider range the quality of the image
will be improved.
• PDF of transformed variable ,s is determined by gray level PDF of input image and by
the chosen transformation function.
Example
• Histogram equalization has a disadvantage which is that it can generate only one type
of output image.
• With Histogram Specification, we can specify the shape of the histogram that we wish
the output image to have.
Let pr(r) denote continuous probability density function of gray-level of input image, r
Let pz(z) denote desired (specified) continuous probability density function of gray-level of
output image, z
r
s T ( r ) pr ( w )dw
0
Where w is a dummy variable of integration.
z
g( z ) p
0
z ( t )dt s
s = T(r) = G(z)
z = G-1(s) = G-1[T(r)]
Assume G-1 exists and satisfies the condition (a) and (b)
Procedure Conclusion
z = G-1(s) = G-1[T(r)]
4. Obtain the output image by applying the processed gray-level from the inversed
transformation function to all the pixels in the input image
Example
Assume an image has a gray level probability density function pr(r) as shown
2r 2 ;0 r 1
pr ( r )
0 ; elsewhere
r
0
pr ( w )dw 1
Discrete formulation
k
s k =T (r k )= ∑ pr (r j )
j=0
k
nj
¿∑ k=0,1,2,. .. , L−1
j =0 n
k
G( z k )=∑ p z ( z i )=sk k=0,1,2,. .. , L−1
i=0
z k =G−1 [ T (r k ) ]
¿ G−1 [ s k ] k =0,1,2, .. . , L−1
Example
IMAGE EQUALIZATION
The histogram equalization doesn’t make the result image look better than the original image.
Consider the histogram of the result image, the net effect of this method is to map a very
narrow interval of dark pixels into the upper end of the gray scale of the output image. As a
consequence, the output image is light and has a washed-out appearance.
Since the problem with the transformation function of the histogram equalization was caused
by a large concentration of pixels in the original image with levels near 0 a reasonable
approach is to modify the histogram of that image so that it does not have this property.
Histogram Specification
• There are no rules for specifying histograms, and one must resort to analysis on a
case-by-case basis for any given enhancement task.
LOCAL ENHANCEMENT
• Histogram processing methods are global processing, in the sense that pixels are
modified by a transformation function based on the gray-level content of an entire
image.
• Sometimes, we may need to enhance details over small areas in an image, which is
called a local enhancement.
(a)(b)(c)
(b) global histogram equalization (enhance noise & slightly increase contrast but the
construction is not changed)
(c) local histogram equalization using 7x7 neighborhood (reveals the small squares inside
larger ones of the original image.
• Define a square or rectangular neighborhood and move the center of this area from
pixel to pixel.
• At each location, the histogram of the points in the neighborhood is computed and
either histogram equalization or histogram specification transformation function is
obtained.
In the figure(c)basically, the original image consists of many small squares inside the
larger dark ones.However, the small squares were too close in gray level to the larger
ones, and their sizes were too small to influence global histogram equalization
significantly.So, when we use the local enhancement technique, it reveals the small
areas.Note also the finer noise texture is resulted by the local processing using
relatively small neighborhoods.
ARITHMETIC/LOGIC OPERATIONS
LOGIC OPERARIONS
• Logic operation performs on gray-level images, the pixel values are processed as
binary numbers
IMAGE SUBTRACTION
– image( b). is nearly identical visually to image( a), with a very slightly drop in
overall contrast due to less variability of the gray-level values in the image.
• the values in a filter subimage are referred to as coefficients, rather than pixel.
Simply move the filter mask from point to point in an image.at each point (x,y),
the response of the filter at that point is calculated using a predefined relationship.
Output is simply the average of the pixels contained in the neighborhood of the filter mask.It
is called averaging filters or lowpass filters.By replacing the value of every pixel in an image
by the average of the gray levels in the neighborhood will reduce the “sharp” transitions in
gray levels.For sharp transitions
Thus, smoothing can reduce noises (desirable) and blur edges (undesirable)
The basic strategy behind weighting the center point the highest and then reducing the
value of the coefficients as a function of increasing distance from the origin is simply
an attempt to reduce blurring in the smoothing process.
Example
b). - f). results of smoothing with square averaging filter masks of size n = 3, 5, 9, 15
and 35, respectively.
Note:
• the response is based on ordering (ranking) the pixels contained in the image area
encompassed by the filter
• example
Median Filters
• replaces the value of a pixel by the median of the gray levels in the neighborhood of
that pixel (the original value of the pixel is included in the computation of the median)
• quite popular because for certain types of random noise (impulse noise [ salt and
pepper noise) , they provide excellent noise-reduction capabilities, with considering
less blurring than linear smoothing filters of similar size.
Example : Median Filters
Derivative operator
First-order derivative
∂2 f
=f ( x+1 )+ f ( x−1 )−2 f (x )
∂ x2
• when we consider an image function of two variables, f(x,y), at which time we will
dealing with partial derivatives along the two spatial axes.
Gradient operator
f ( x, y ) f ( x, y ) f ( x, y )
f
xy x y
Laplacian operator
2
f ( x , y ) 2
f ( x, y )
f
2
x 2
y 2
Discrete Form of Laplacian
from
2 f
f ( x, y 1) f ( x, y 1) 2 f ( x, y )
y 2
2 f
f ( x, y 1) f ( x, y 1) 2 f ( x, y )
y 2
yields
2 f [ f ( x 1, y ) f ( x 1, y )
f ( x, y 1) f ( x, y 1) 4 f ( x, y )]
Give the same result, but we have to keep in mind that when combining (add / subtract) a
Laplacian-filtered image with another image.
• as it is a derivative operator,
f ( x, y ) 2 f ( x, y )
g ( x, y )
f ( x, y ) f ( x , y )
2
Example
1 1 1
1 -8 1
1 1 1
BACKGROUND
• Any function that periodically repeats itself can be expressed as the sum of sines
and/or cosines of different frequencies, each multiplied by a different coefficient
(Fourier series).
• Even functions that are not periodic (but whose area under the curve is finite) can be
expressed as the integral of sines and/or cosines multiplied by a weighting function
(Fourier transform).
• The advent of digital computation and the “discovery” of fast Fourier Transform
(FFT) algorithm in the late 1950s revolutionized the field of signal processing, and
allowed for the first time practical processing and meaningful interpretation of a host
of signals of exceptional human and industrial importance.
• The frequency domain refers to the plane of the two dimensional discrete Fourier
transform of an image.
• The purpose of the Fourier transform is to represent a signal as a linear combination
of sinusoidal signals of various frequencies.
The one-dimensional Fourier transform and its inverseFourier transform (continuous case)
F (u ) f ( x)e j 2ux dx where j 1
jθ
Inverse Fourier transform e =cosθ + j sin θ
∞ j2π ux
f (x )=∫−∞ F(u)e du
The two-dimensional Fourier transform and its inverseFourier transform (continuous case)
∞ ∞
∫ ∫
F(u, v)= −∞ −∞ f (x, y)e
−j2π(ux+vy)
dx dy
Inverse Fourier transform
∞ ∞ j 2π(ux+vy)
f (x , y)=∫−∞ ∫−∞ F(u,v)e dudv
The one-dimensional Fourier transform and its inverse (discrete time case)
The 1/M multiplier in front of the Fourier transform sometimes is placed in the front of
the inverse instead. Other times both equations are multiplied by 1/ M
• Unlike continuous case, the discrete Fourier transform and its inverse always exist,
only if f(x) is finite duration. F(u) can be expressed in polar coordinates:
F (u ) F (u ) e jf (u )
1/2
where F (u ) �� R 2 (u ) I 2 (u ) �
� (magnitude or spectrum)
�I (u ) �
f (u ) tan 1 � � (phase angle or phase spectrum)
�R (u ) �
Power spectrum:
2 2 2
P(u)=|F (u)| =R (u)+I (u)
Some One-Dimensional Fourier Transform Examples
The transform of a constant function is a DC value only
Frequency is directly related to rate of change. The frequency of fast varying components in
an image is higher than slowly varying components
BASIC FILTERS AND THEIR PROPERTIES
H (u , v )= {
1
0 if (u , v )=( M /2, N /2)
otherwise .
All this filter would do is set F(0,0) to zero (force the average value of an image to zero) and
leave all other frequency components of the Fourier transform untouched and make
prominent edges stand out
Low frequency filters: eliminate the gray-level detail and keep the general gray-level
appearance. (blurring the image)
Low frequency filters: have less gray-level variations in smooth areas and emphasized
transitional (e.g., edge and noise) gray-level detail. (sharpening images)
The distinction and links between spatial and frequency filtering
If the size of spatial and frequency filters is same, then the computation burden in
spatial domain is larger than in frequency domain;
However, whenever possible, it makes more sense to filter in the spatial domain using
small filter masks.
Filtering in frequency is more intuitive. We can specify filters in the frequency, take
their inverse transform, and the use the resulting filter in spatial domain as a guide for
constructing smaller spatial filter masks.
Fourier transform and its inverse are linear process, so the following discussion is limited to
linear processes
There is two reasons that filters based on Gaussian functions are of particular importance: 1)
their shapes are easily specified; 2) both the forward and inverse Fourier transforms of a
Gaussian are real Gaussian function
• Let H(u) denote a frequency domain, Gaussian filter function given the equation
2 2
H (u)=Ae−u / 2 σ
The simplest lowpass filter is a filter that “cuts off” all high-frequency components of the
Fourier transform that are at a distance greater than a specified distance D0 from the origin of
the transform
• The transfer function of an ideal lowpass filter
H (u , v )=
{
1
0
if D(u , v )≤D 0
if D (u , v )>D 0
where D(u,v) : the distance from point (u,v) to the center of ther frequency rectangle (M/2,
N/2)
1
2
D ( u , v )=[( u−M / 2)2 +( v−N /2 )2 ]
ILPF is a type of “nonphysical” filters and can’t be realized with electronic components and
is not very practical.
The blurring and ringing phenomena can be seen, in which ringing behavior is characteristic
of ideal filter.
Figure 4.13 (a) A frequency-domain ILPF of radius 5. (b) Corresponding spatial filter. (c)
Five impulses in the spatial domain, simulating the valuesof five pixels. (d) Convolution of
(b) and (c) in the spatial domain.
f (x , y )∗h( x , y )⇔ F (u ,v ) H (u ,v )
Notation: the radius of center component and the number of circles per unit distance from the
origin are inversely proportional to the value of the cutoff frequency.
frequency
spatial
spatial
spatial
The BLPF may be viewed as a transition between ILPF AND GLPF, BLPF of order 2 is a
good compromise between effective lowpass filtering and acceptable ringing characteristics.
1
H (u , v )= 2n
1+ [ D(u , v )/ D0 ]
n=2 ,D0=5,15,30,80,and 230
−D2 (u , v ) /2 D 20
H (u , v )=e
D0=5,15,30,80,and 230
Gaussian lowpass filter for reducing the horizontal sensor scan lines and simplifying the
detection of features like the interface boundaries.
H (u , v )=
{0
1
if D(u , v )≤D 0
if D (u , v )> D0
1
H (u , v )= 2n
1+ [ D 0 / D(u , v ) ]
−D 2 ( u, v )/2 D 20
H (u , v )=1−e
H (u , v )=
{
0
1
if D(u , v )≤D 0
if D (u , v )> D0
The result is smoother than that of IHPFs and sharper than that of GHPFs
1
H (u , v )= 2n
1+ [ D 0 / D(u , v ) ]
−D 2 ( u, v )/2 D 20
H (u , v )=1−e
Spatial domain
HOMOMORPHIC FILTERING
Problems:
When the illumination radiating to an object is non-uniform, the detail of the dark part in the
image is more discernable.
aims:
Simultaneously compress the gray-level range and enhance contrast, eliminate the effect of
non-uniform illumination, and emphasis the details.
Principal:
Two examples
PART B
UNIT -5
IMAGE RESTORATION
Image Restoration refers to a class of methods that aim to remove or reduce the degradations
that have occurred while the digital image was being obtained. All natural images when
displayed have gone through some sort of degradation:
During Display Mode
Others
In most of the existing image restoration methods we assume that the degradation process can
be described using a mathematical model.
• A camera works by exposing a sheet of light sensitive film to a scene, for a short
period of time.
• The light from the scene, hitting the film, causes the film to change chemically, and
eventually results in a picture representation of the scene.
• This is known as an exposure.
• If the scene changes during that exposure, a blurred image will result, since light from
many scenes hit the film.
NOISE MODELS
The principal sources of noise in digital images arise during image acquisition (digitization)
and/or transmission.The performance of imaging sensors is affected by a variety of factors,
such as environmental conditions during image acquisition.
RESTORATION USING SPATIAL FILTERING
Spatial filtering is the method of choice in situations when only additive noise is present.
MEAN FILTERS
Here each restored pixel is given by the product of the pixels in the sub image window
raised to the power of 1/mn.
It works well for salt noise, but fails for pepper noise and it does well with other types of
noise like Gaussian noise.
MEDIAN FILTER
This filter replaces the value of a pixel by the median of the gray levels in the neighborhood
of that pixel.The original value of the pixel is included in the computation of the
median.Median filters provide excellent noise reduction capabilities,with less blurring.
Median filters are effective in the presence of both bipolar and unipolar impulse noise.