Image Filtering: A Comprehensive Study
Image Filtering: A Comprehensive Study
A Comprehensive Study
What is image processing?
An image is defined as a 2-d function f(x,y) where x
and y are spatial coordinates and amplitude of f at
any pair of coordiantes (x,y) is called the intensity or
grey level of image at that point. The image consists
of number of elements called pixels and we process
these pixels .
Digital image processing refers to processing digital
images such they are used for human or
autonomous machine interpretation
steps in digital image processing
* Image acquisition
* image enhancement
* image restoration
* color image processing
* wavelets and multiresolution processing
* compression
* morphological processing
* segmentation
* representation and description
* object recognition
Image Enhancement
Objective of enhancement is to process image so
that result is more suitable than original image for
specific application.
Enhancement approaches fall into two broad
categories spatial domain : direct manipulation of
pixels in an image and frequency domain :
manipulation of fourier transform of an image.
Spatial domain methods directly operate on the
pixels, they are represented using expression
g(x,y) = T [ f(x,y) ] where f(x,y) is input image g(x,y)
is processed image and T is an operator on f
defined over some neighborhood of (x,y) which is
usually defined a square subimage centered
at(x,y).
The operator T is applied at each location
(x,y) to yeild output g at that location. The process
uses pixels in the area of image spanned by
neighbourhood.
Frequency domain is space defined by the values of
fourier transform and its frequency variables.
Compute the discreet fourier transform F(u,v)of an
imagef(x,y)
Multiply F(u,v) by the filter function H(x,y)
Compute inverse Fourier transform on the result.
Considering continuous function f(x) of a single variable x representing
distance
The Fourier transform of that function is denoted F(u), where u represents
spatial frequency is defined by
The inverse Fourier transform for regenerating f(x) from F(u) is given by
consider a particular function f(x) defined as
top hat funtion Fourier transform
Two Dimensional fourier transform
Gradient filter
Horizontal and vertical edge detection
+45 and -45 degree edge detection
Frequency domain techniques
Instead of simply replacing the pixel value with the mean of neighbouring
pixel values, it replaces it with the median of those values. The median is
calculated by first sorting all the pixel values from the surrounding
neighbourhood into numerical order and then replacing the pixel being
considered with the middle pixel value
Mode
The mode filter computes the mode of the grey-level values (the most
frequently occurring grey-level value) within the filter window
surrounding each pixel. Mode filtering is ideal for cleaning up thematic
maps for presentation purposes, in that it replaces small "island" themes
by their larger, surrounding themes.
The gradient of the image intensity at each point, gives the direction
of the largest possible increase from light to dark and the rate of
change in that direction. The result therefore shows how "abruptly"
or "smoothly" the image changes at that point, and therefore how
likely it is that that part of the image represents an edge, as well as
how that edge is likely to be oriented. In practice, the magnitude
(likelihood of an edge) calculation is more reliable and easier to
interpret than the direction calculation.
'
0
1
) , ( v u H
0
) , ( D v u D
0
) , ( D v u D >
2 2 1/ 2
( , ) [( / 2) ( / 2) ] D u v u M v N +
Shape of ideal low pass filter
Spatial domain
Frequency domain
L
The drawback of this filter function is a ringing effect which occurs along the
edges of filtered real domain image. The drawback of this filter function is a
ringing effect which occurs along the edges of the filtered real domain image.
The following example will apply "ideal" low, high, and band pass filters to a 2
dimensional rectangular pulse with low level added noise
two representations will be given, the image and a surface rendering.
The fourier transform of the rectangular pulse is the two dimensional equivalent
low pass filter zeroies all frequency components above a cutoff .
The result transformed back into the spatial domain.
As expected the high frequency components have been removed.
The rectangular pulse is "rounded" since high frequency
components
were required for the transition
Butterworth Lowpass Filters
2
1
The vertical edges and sharp corners of Ideal low pass filter are non-
realizable in the physical world. Although we can emulate these filter
masks with a computer, side effects such as blurring and ringing
become aparent.
0
2
2
2
) , (
) , (
D
v u D
e v u H
Ideal
Butterworth:
Gaussian:
n
v u D
D
v u H
2
0
2
) , (
1
1
| ) , ( |
1
]
1
'
0
1
) , ( v u H
0
) , ( D v u D >
0
) , ( D v u D
2
0
2
2 / ) , (
1 ) , (
D v u D
e v u H
Implementation Details
This system is designed to accept 256 bitmap image with
size of 64x64 pixels as input.
The developed system uses the Discrete Fourier
Transform algorithm to carry out the image transform
operation
Software and Hardware Requirements
Hardware Specifications:
Processor with minimum 400 MHz clock speed
128 Kb L2 Processor Cache
Minimum 32 MB RAM
Hard Disk Drive of capacity not less than 4GB
14 SVGA Color Monitor
Standard Keyboard
Software Specifications:
Operating System Microsoft Windows 9x
Turbo c
Implementation of spatial domain filters
Read the bitmap data and the pixel data from the bitmap
image header of the file
Read the bitmap data and the pixel data from the bitmap
image header of the file