You are on page 1of 30

Best VTU Student Companion App You Can Get

DOWNLOAD NOW AND GET


Instant VTU Updates, Notes, Question Papers,
Previous Sem Results (CBCS), Class Rank, University Rank,
Time Table, Students Community, Chat Room and Many
More

CLICK BELOW TO DOWNLOAD VTU CONNECT APP


IF YOU DON’T HAVE IT

* Visit https://vtuconnect.in for more info. For any queries or questions wrt our
platform contact us at: support@vtuconnect.in
VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

Module 2: IMAGE ENHANCEMENT

Structure

2.1.0 Introduction
2.1.1 Objectives
2.1.2 Image Enhancement in Spatial domain
2.1.3 Some Basic Gray Level Trans -formations
2.1.4 Histogram Processing
2.1.5 Fundamentals of Spatial Filtering
2.1.6 Smoothing Spatial Filters
2.1.7 Sharpening Spatial Filters
2.2.1 Preliminary Concepts of Frequency Domain
2.2.2 The Discrete Fourier Transform (DFT) of Two Variables and
its properties.
2.2.3 Smoothing Frequency Domain filters
2.2.4 Sharpening Frequency Domain filters
2.2.5 Selective Filtering
2.2.6 Outcomes
2.2.7 Questions /Answers
2.2.8 Further Readings

2.1.0 INTRODUCTION

Image as Signals:
Signal: x(t)

Image : f (x, y) Intensity at x,y (continuous)

f(x, y) Intensity at pixel x,y (discrete)


Linear Image Processing:
g(m,n) =f (m,n) h(m,n)
In frequency domain
G(u,v) F(u,v) H (u,v)

ATMECE, ECE Page 1

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

What is Image Processing?

Image processing is the manipulation of an image in order to improve its quality, enhances its

ability to convey visual information and make it look better.

Image processing addresses three types of image problems:

Contrast: Refers to the variability of image intensity across the image. Edges are regions of
relatively high local contrast. Global contrast intensity variation across the entire image is referred
to as the dynamic range of the image.
Usually contrast variation is caused by illumination.
Blur: caused by either a resolution or focus problems, or relative motion between the camera and
the object during the image capturing.
Blur edges correspond to gradual change of intensity locally.
Noise: any unwanted intensity variation in the image. Usually modeled as a random process, but
it can be highly structured and deterministic in some instances
Major Categories of Image Processing Problems
While most image problems are relatively simple to describe, solving them effectively can be quite
difficult.
There is a broad and continuously expanding spectrum of applications to image processing. The
two major branches of image processing are enhancement and restoration.
Enhancement: aimed at improving the subjective quality or the objective utility of the image
and includes: point operations, local operations and global operations. Any of these can be linear
or non-linear.
Restoration: aims at recovering any image after degradation.

2.1.1 OBJECTIVES

1. Students will understand an Overview of image enhancement techniques in spatial domain.


2. Analyze that these techniques improve the quality of images.

ATMECE, ECE Page 2

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

3. Point and neighborhood processing are discussed in linear spatial filters and its core
concepts

2.1.2 IMAGE ENHANCEMENT IN SPATIAL DOMAIN

Spatial Domain Methods (Image Plane) Techniques are based on direct manipulation of pixels in

an image.

Suppose we have a digital image which can be represented by a two-dimensional Random field

f (x, y).

An image processing operator in the spatial domain may be expressed as a mathematical

Function T applied to the image f (x, y) to produce a new image g(x, y) T f (x, y) as follows.

g(x, y) = T f (x, y)

The operator T applied on f (x, y) may be defined over:

(i) A single pixel (x, y). In this case T is a grey level transformation (or mapping) Function.

(ii) Some neighborhood of (x, y).

(iii) T may operate to a set of input images instead of a single image.

2.1.3 SOME BASIC GRAY LEVEL TRANS-FORMATIONS


Enhancing an image provides better contrast and a more detailed image as compare to non-
enhanced image. Image enhancement has very applications. It is used to enhance medical images,
images captured in remote sensing, images from satellite e.t.c

The transformation function has been given below

s=T(r)

where r is the pixels of the input image and s is the pixels of the output image. T is a transformation
function that maps each value of r to each value of s. Image enhancement can be done through
gray level transformations which are discussed below.

The effect of this transformation will be to produce an image of higher contrast than the
original by darkening the levels below a value m and brightening the levels above m in the original
pixel spectrum. The technique is referred to as contrast stretching. The values of r below m are

ATMECE, ECE Page 3

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

compressed by the transformation function into a narrow range of S towards the dark end of the
spectrum; the opposite effect takes place for values of r above m.

.
Fig. 2.1: Intensity transformation Function.

In the limiting case shown in Fig 2.1(b), produces a 2-level (binary) image. This is also referred
to as image thresholding. Many powerful enhancement processing techniques can be formulated
in the spatial domain of an image.
Note: It is to be noted that there is no general theory of image enhancement. When an image is
processed for visual interpolation, the observer is the ultimate judge of how well a particular
method works. Visual evaluation of image quality is a subjective process thus making the
definition of a "good image" an elusive standard by which to compare algorithm performance.
2.1.3.1 Gray level transformation
There are three basic gray level transformation.
➢ Linear
➢ Logarithmic
➢ Power – law
The overall graph of these transitions has been shown below

ATMECE, ECE Page 4

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

Fig. 2.2: Basic Intensity transformation Function

Linear transformation
First, we will look at the linear transformation. Linear transformation includes simple identity and
negative transformation. Identity transformation has been discussed in our tutorial of image
transformation, but a brief description of this transformation has been given here.

Identity transition is shown by a straight line. In this transition, each value of the input image is
directly mapped to each other value of output image. That results in the same input image and
output image. And hence is called identity transformation. It has been shown below Fig 2.3

Fig. 2.3: Linear transformation Function

ATMECE, ECE Page 5

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

Negative transformation
The second linear transformation is negative transformation, which is invert of identity
transformation. In negative transformation, each value of the input image is subtracted from the
L-1 and mapped onto the output image.The result is somewhat like as shown in the Fig.2.4

Fig. 2.4: Original digital mammogram and negative image obtained using the negative transformation
In this case the following transition has been done.
s = (L – 1) – r
since the input image of Einstein is an 8 bpp image, so the number of levels in this image are 256.
Putting 256 in the equation, we get this
s = 255 – r
So each value is subtracted by 255 and the result image has been shown above. So what happens
is that, the lighter pixels become dark and the darker picture becomes light. And it results in image
negative. It has been shown in the Fig 2.5.

Fig. 2.5: Negative transformation Function


Image negatives
• Is obtained by using the negative transformation s=L-1-r
• Produces the equivalent of a photographic negative
• Suited for enhancing white or gray detail embedded in dark regions of an image
Log transformations

ATMECE, ECE Page 6

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

Logarithmic transformation further contains two type of transformation. Log transformation and
inverse log transformation.

Log transformation
The log transformations can be defined by this formula
s = c log(r + 1).
Where s and r are the pixel values of the output and the input image and c is a constant. The value
1 is added to each of the pixel value of the input image because if there is a pixel intensity of 0 in
the image, then log (0) is equal to infinity. So 1 is added, to make the minimum value at least 1.

During log transformation, the dark pixels in an image are expanded as compare to the higher
pixel values. The higher pixel values are kind of compressed in log transformation. This result in
following image enhancement.The value of c in the log transform adjust the kind of enhancement
you are looking for.

Fig. 2.6: Fourier spectrum and result of applying log transforms


• The general form of the log transformation: s=clog(1+r)
– Expand the values of dark pixels while compressing the high-level values
– Compress the dynamic range of images with large variations.
The inverse log transform is opposite to log transform.
Power-law transformation
There are further two transformation is power law transformations, that include nth power and
nth root transformation. These transformations can be given by the expression:

s=cr^γ

ATMECE, ECE Page 7

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

This symbol γ is called gamma, due to which this transformation is also known as gamma
transformation.

Variation in the value of γ varies the enhancement of the images is shown in the Fig. 2.7 Different
display devices / monitors have their own gamma correction, that’s why they display their image
at different intensity.

This type of transformation is used for enhancing images for different type of display devices.
The gamma of different display devices is different. For example, Gamma of CRT lies in between
of 1.8 to 2.5, that means the image displayed on CRT is dark.

• The basic form:


– Gamma correction
– CRT device have an intensity-to-voltage response that is a power function
• Produce images that are darker than intended
• Is important if displaying an image accurately on a computer screen

s = cr 
 1 maps a narrow range of dark input values into a wider range of output values, while
maps a narrow range of bright input values into a wider range of output values when   1
 : gamma, gamma correction

Fig. 2.7: Plots of the power law equation for various values of Gama

ATMECE, ECE Page 8

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

Fig. 2.8: b and d represents the image displayed without and with gama correction

Fig. 2.9: Aerial Image, (b) to (d)results of applying transforms with gama=3,4 and 5.
2.1.3.2 Piecewise-linear transformation functions
Principle Advantage: Some important transformations can be formulated only as a piecewise
function.
Principle Disadvantage: Their specification requires more user input that previous transformations
Types of Piecewise transformations are:

ATMECE, ECE Page 9

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

Contrast Stretching
One of the simplest piecewise linear functions is a contrast-stretching transformation, which is
used to enhance the low contrast images.
Low contrast images may result from:
Poor illumination
Wrong setting of lens aperture during image acquisition.

Fig. 2.10: Contrast stretching a. transformation function, low contrast image, result of contrast stretching and
threshold image.

Fig. 2.10 shows a typical transformation used for contrast stretching. The locations of points (r1,
s1) and (r2, s2) control the shape of the transformation function.
If r1 = s1 and r2 = s2, the transformation is a linear function that produces no changes in gray
levels.
If r1 = r2, s1 = 0 and s2 = L-1, the transformation becomes a thresholding function that creates a
binary image. As shown previously in slide 7.
Intermediate values of (r1, s1) and (r2, s2) produce various degrees of spread in the gray levels of
the output image, thus affecting its contrast.
In general, r1 ≤ r2 and s1 ≤ s2 is assumed, so the function is always increasing
Gray-level Slicing

ATMECE, ECE Page 10

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

Thresholding is the special case of clipping where a=b and output becomes binary. The
thresholding is used to make such an image binary. There is intensity level slicing without
background and with background. These transformations permit segmentation of certain gray
level regions from the rest of the image the transformation function and corresponding images as
shown in the Fig 2.11 and Fig 2.12 respectively.

Fig. 2.11: Transformation high lights the intensity range [a,b] and high lights the range.

Fig. 2.12: Transformation high lights the intensity range [a,b] and high lights the range.

Bit-plane slicing
Pixels are digital numbers, each one composed of bits. Instead of highlighting gray-level range,
we could highlight the contribution made by each bit is as shown in the Fig 2.13.

Fig. 2.13: Bit plane representation of an 8-bit image


Most significant bits contain the majority of visually significant data.

ATMECE, ECE Page 11

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

Fig. 2.14: An 8-bit greyscale image and its corresponding representation from bit 1 to bit 8

Fig. 2.15: Images reconstructed using Bit planes 8 and 7, Bit planes 8,7 and 6 and Bit planes 8,7,6 and 5
This method is useful and used in image compression
2.1.4 HISTOGRAM PROCESSING
• Histogram
In an image histogram, the x axis shows the gray level intensities and the y axis shows the
frequency of these intensities.
h(rk)=nk
– where is the kth gray level and is the number of pixels in the image having
gray level
– Normalized histogram
• p(rk)=nk / MN
Spreading out the frequencies in an image (or equalising the image) is a simple way to
improve dark or washed out images

ATMECE, ECE Page 12

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

Fig. 2.16: Four basic Images and their corresponding histograms.


The histogram of an image represents the relative frequency of occurrence of the various gray
levels in the image. It provides a total description of the appearance of an image. The type and
degree of enhancement obtained depends on the nature of the specified histogram.

Histogram Equalization

Histogram equalization is a common technique for enhancing the appearance of images. Suppose
we have an image which is predominantly dark. Then its histogram would be skewed towards the
lower end of the grey scale and all the image detail is compressed into the dark end of the
histogram. If we could `stretch out' the grey levels at the dark end to produce a more uniformly
distributed histogram then the image would become much clearer. Histogram equalization

ATMECE, ECE Page 13

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

involves finding a grey scale transformation function that creates an output image with a uniform
histogram (or nearly so) is as shown in the Fig. 2.17.

Fig. 2.17: Four basic Images and their corresponding histograms equalized images.

2.1.5. Fundamentals of Spatial Filtering


A mask is a filter. Concept of masking is also known as spatial filtering. Masking is also known
as filtering. In this concept we just deal with the filtering operation that is performed directly on
the image.
The process of filtering is also known as convolving a mask with an image. As this process
is same of convolution so filter masks are also known as convolution masks.The general process
of filtering and applying masks is consists of moving the filter mask from point to point in an
image. At each point (x,y) of the original image, the response of a filter is calculated by a pre-

ATMECE, ECE Page 14

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

defined relationship. All the filters values are pre-defined and are a standard the above process is
indicated in the Fig. 2.18.

Fig. 2.18: The mechanism of linear spatial filtering using a 3X3 filter mask.

2.1.6 Smoothing Spatial Filters


An image may be “dirty” (with dots, speckles, stains)
To remove speckles/dots on an image
Dots can be modeled as impulse or Gaussian noise
Can be removed by taking mean or median values of neighboring pixels (e.g. 3x3 window),
Equivalent to low pass filtering.
Filters are most commonly used for blurring and for noise reduction. Blurring is used in
preprocessing steps, such as removal of small details from an image prior to large object extraction.

The common masks used for blurring are.

• Box filter

ATMECE, ECE Page 15

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

• Weighted average filter


In the process of blurring we reduce the edge content in an image and try to make the transitions
between different pixel intensities as smooth as possible is as shown in the Fig. 2.19.

Fig. 2.19: original image of, (b)-(f) results of smoothing with square averaging filter masks of sizes 3,5,9,15 and 35
respectively.

This type of blurring is used to eliminate small object from an image.

2.1.7 Sharpening Spatial Filters

Smoothing filters are used to remove fine details from the original images. Sharpening spatial
filters seek to highlight fine detail – Remove blurring from images – Highlight edges Sharpening
filters are based on spatial differentiation.

ATMECE, ECE Page 16

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

The sudden changes of discontinuities in an image are called as edges. Significant


transitions in an image are called as edges. Masks or filters can also be used for edge detection in
an image and to increase sharpness of an image is shown in the Fig. 2.19.

Fig. 2.19: comparison between smoothing and sharpening of an image

2.2.1 Preliminary Concepts of Frequency Domain


Image enhancement in the frequency domain is straightforward. We simply compute the Fourier
transform of the image to be enhanced, multiply the result by a filter (rather than convolve in the
spatial domain), and take the inverse transform to produce the enhanced image.
The idea of blurring an image by reducing its high frequency components or sharpening an
image by increasing the magnitude of its high frequency components is intuitively easy to
understand. However, computationally, it is often more efficient to implement these operations as
convolutions by small spatial filters in the spatial domain. Understanding frequency domain
concepts is important, and leads to enhancement techniques that might not have been thought of
by restricting attention to the spatial domain.
Filtering
Low pass filtering involves the elimination of the high frequency components in the image. It
results in blurring of the image (and thus a reduction in sharp transitions associated with noise).
An ideal low pass filter would retain all the low frequency components, and eliminate all the high
frequency components. However, ideal filters suffer from two problems: blurring and ringing.
These problems are caused by the shape of the associated spatial domain filter, which has a large
number of undulations. Smoother transitions in the frequency domain filter, such as the
Butterworth filter, achieve much better results
Application of this type of filtering is easy:
1. Transform the image into the Fourier domain
2. Multiply the image by the filter.
3. Take the inverse transform of the Image.

ATMECE, ECE Page 17

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

The operator usually takes an image and a filter function in the Fourier domain. This image is then
multiplied with the filter function in a pixel-by-pixel fashion:
G( u,v ) = F(u,v)*H(u,v)
where F(u,v) is the input image in the Fourier domain, H(u,v) the filter function and G(u,v) is the
filtered image. To obtain the resulting image in the spatial domain, G(u,v) has to be re-transformed
using the inverse Fourier Transform. There are basically three different kinds of filters: lowpass,
high pass and bandpass filters.
2.2.2 The Discrete Fourier Transform (DFT) of Two Variables and its
properties.
The formula for 2-dimensional discrete Fourier transform is given below.

The discrete Fourier transform is actually the sampled Fourier transform, so it contains some
samples that denotes an image. In the above formula f(x,y) denotes the image, and F(u,v) denotes
the discrete Fourier transform. The formula for 2-dimensional inverse discrete Fourier transform
is given below.

The inverse discrete Fourier transform converts the Fourier transform back to the image
To filter an image in the frequency domain:
1. Compute F(u,v) the DFT of the image
2. Multiply F(u,v) by a filter function H(u,v)
3. Compute the inverse DFT of the result I as shown in the Fig. 2.20.

Fig. 2.20: Frequency domain filtering steps


2.2.3 Smoothing Frequency Domain filters

ATMECE, ECE Page 18

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

Smoothing is achieved in the frequency domain by dropping out the high frequency components
The basic model for filtering is:
G(u,v) = H(u,v)F(u,v)
where F(u,v) is the Fourier transform of the image being filtered and H(u,v) is the filter transform
function
Low pass filters – only pass the low frequencies, drop the high ones

Ideal Low Pass Filter


Simply cut off all high frequency components that are a specified distance D0 from the origin of
the transform is as shown in the Fig. 2.21.

Fig. 2.21: (a)Perspective plot of ILPF TF(b)Filter displayed as an image(c) Filter radial cross section

The transfer function for the ideal low pass filter can be given as:

1 if D(u, v)  D0
H (u, v) = 
0 if D(u, v)  D0
where D(u,v) is given as:
D(u, v) = [(u − M / 2) 2 + (v − N / 2) 2 ]1/ 2

➢ The sharp cutoff frequencies of an ILPF cannot be realized with electronic components,
although certainly can be simulated in a computer.
➢ The ILPF is not very practical. It is useful to study their behavior as a part of our
development of filtering concepts.
➢ The center lobe of the sinc is the principal cause of blurring, while the outer, smaller lobs
are mainly responsible for ringing.
➢ The spread of the sinc function is inversely proportional to the radius of H(u,v),for larger
values of D0 blurring effects will be absent.

ATMECE, ECE Page 19

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

Fig. 2.22: Original image and (b)-(f) results of filtering using ILPFs with cutoff frequencies set at the radii
values 5, 15, 30, 80 and 230

Butterworth Lowpass Filters (BPLF)


The transfer function of a Butterworth lowpass filter of order n with cut-off frequency at distance
D0 is shown in the Fig. 2.23 from the origin is defined as:

1
H (u , v ) =
1 + [ D (u , v ) / D0 ]2 n

Fig. 2.23: (a)Perspective plot of BLPF TF(b)Filter displayed as an image(c) Filter radial cross section

ATMECE, ECE Page 20

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

Fig. 2.23: Original image and (b)-(f) results of filtering using BLPFs with cutoff frequencies set at the radii values 5,
15, 30, 80 and 230

Fig. 2.24: (a)-(d) Spatial representation of BLPFs of order 1,2,5 and 20 and corresponding intensity profiles through
the center of filters.

The ringing effects increases as the function of filter order as shown in the Fig. 2.23 and Fig.2.24.
Gaussian Lowpass Filters
The transfer function of a Gaussian lowpass filter is as shown in the Fig. 2.25 and is defined as:

H (u, v) = e − D ( u ,v ) / 2 D0 2
2

Fig. 2.25: (a)Perspective plot of BLPF TF(b)Filter displayed as an image(c) Filter radial cross section

ATMECE, ECE Page 21

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

Fig. 2.26: Original image and (b)-(f) results of filtering using BLPFs with cutoff frequencies set at the radii values 5,
15, 30, 80 and 230
GLPF will have no ringing effects which is required in medical imaging in which any type of
artifact is unacceptable.
Practical application of LPF
The low-resolution text with broken character segments can be joined by using GLPF is as shown
in the below Fig. 2.27.

Fig. 2.27: Sample of text with broken segments and repaired with LP filtering process

ATMECE, ECE Page 22

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

The Fig. 2.28 shows the applications of LP filtering for producing a smoother, softer looking
results from sharp original. That is significant reduction in fine skin lines around the eyes,so that
the smoothed image look quite soft and pleasing.

Fig. 2.28: Original image and (b, c) result of filtering using a GLPF with D 0 = 100 and 80.

2.2.4 Sharping Frequency Domain filters


Edges and fine detail in images are associated with high frequency components
High pass filters – only pass the high frequencies, drop the low ones High pass frequencies are
precisely the reverse of low pass filters, so:
Hhp(u, v) = 1 – Hlp(u, v)

Ideal High Pass Filters


The ideal high pass filter is given as:
0 if D(u , v)  D0
H (u , v) = 
1 if D(u , v)  D0

ATMECE, ECE Page 23

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

where D0 is the cut off distance. The Fig.2.29 shows an image and cross section of IHPF.

Fig. 2.29: (a)Perspective plot of IHPF TF(b)Filter displayed as an image(c) Filter radial cross section

Fig. 2.30: Original image and (b)-(c) Results of ideal high pass filtering with D0 = 15,30,80
Results of ideal high pass filtering with D0 = 15
➢ The ringing is severe that it is produced distorted, thickened object boundaries
➢ The edges of the top 3 circles do not show well because they are not strong as other edges
of the image. i.e. closer to background intensity.
The smaller objects and lines are appeared almost solid white

ATMECE, ECE Page 24

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

Results of ideal high pass filtering with D0 = 80


➢ The ringing is not severe .
➢ The edges are much cleaner and less distorted.
➢ The smaller objects have been filtered properly.
NOTE: HPF is analogous to differentiation in the spatial domain, the background in all the
images is zero
Butterworth High Pass Filters
The Butterworth high pass filter is given as:

1
H (u , v ) =
1 + [ D0 / D (u , v )]2 n

where n is the order and D is the cut off distance. The Fig.2.31 shows an image and cross
0
section of BHPF

Fig. 2.31: (a)Perspective plot of BHPF TF(b)Filter displayed as an image(c) Filter radial cross section

Gaussian High Pass Filters (GHPF)


The Gaussian High Pass Filter is given as:

H (u, v) = 1 − e − D ( u ,v ) / 2 D0 2
2

where n is the order and D is the cut off distance. The Fig.2.32 shows an image and cross
0
section of GHPF

ATMECE, ECE Page 25

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

Fig. 2.32: (a)Perspective plot of GHPF TF(b)Filter displayed as an image(c) Filter radial cross section

Example: High-pass Filtering and Thresholding for Fingerprint Image Enhancement

In a finger print recognition by using an HPF the ridges are enhanced and smudges has been
reduced considerably using a threshold of the filtered image as shown in the Fig,2.33.

Fig. 2.33: (a)Thumb Print (b)result of HPF(c) Result of thresholding

Unsharp Masking and Highboost Filtering (revisited)


Unsharp Masking
unsharp mask is generally a linear or nonlinear filter that amplifies the high-frequency
components of a signal.
g mask ( x, y ) = f ( x, y ) − f LP ( x, y )
sharpened image = original image – blurred image
to subtract a blurred version of an image produces sharpening output image.

ATMECE, ECE Page 26

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

Obtain a sharp image by subtracting a lowpass filtered (i.e., smoothed) image from the original
image. Image sharpening emphasizes edges but low frequency components are lost.
Unsharp filtering - frequency-domain filter
H hp (u, v) = 1 - H lp (u, v )
Sharpening Filters: High Boost
High boost filter: amplify input image, then subtract a lowpass image.
High Boost = an original – LP
=(A-1) original + original - LP
H hb (u, v) = (A -1) - H hp (u, v)
High-boost filtering often desirable to emphasize high frequency components representing the
image details (by means such as sharpening) without eliminating low frequency components
representing the basic form of the signal.
High frequency emphasis
H hfe (u, v) = a + bH hp (u, v)
typically, 0.25≤ a ≤ 0.5, 1.5 ≤ b ≤ 2.0
In HP filtering process the DC term is set to Zero, thus reducing the average intensity in the filtered
image to 0. this drawback can be overcome by the use of High frequency emphasis filter, the
constant a gives control over the proportion of high frequencies that influence the final result. The
effect of the above explained concepts are indicated in the Fig. 2.34.

Fig. 2.34: (a)A chest of X-ray image (b)result of GHPF(c) Result of HE (d) Result of HE and histogram
equalization.

ATMECE, ECE Page 27

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

Homomorphic filtering
Many times, we want to remove shading effects from an image (i.e., due to uneven illumination)
➢ Enhance high frequencies
➢ Attenuate low frequencies but preserve fine detail
Consider the following model of image formation:
f (x, y) = i (x, y) r (x, y)
i(x,y): illumination
r(x,y): reflection
In general, the illumination component i(x,y) varies slowly and affects low frequencies mostly.
In general, the reflection component r(x,y) varies faster and affects high frequencies mostly.
IDEA: separate low frequencies due to i(x,y)
from high frequencies due to r(x,y) the resultant waveform is as shown in the Fig. 2.35.

Fig. 2.35: (a)An original image (b)result of Homomorphic filtering

2.2.5 Selective Filtering


These are the filters used to process specific bands of frequencies are known as band pass and band
reject filters. the filters which are used to process small regions of frequencies are known as notch
filters.

2.2.6 Outcomes

Students will be able to understand various transformation techniques used for image
enhancement. Its significance in spatial domain.
Students will be able to understand various filtering techniques in frequency domain.
Smoothing and sharpening the image is known using low pass and high pass filters.

ATMECE, ECE Page 28

VTU Connect Android App Download Now On Google Play Store


VTU Connect Android App Download Now On Google Play Store
DIGITAL IMAGE PROCESSING 15EC72

2.2.7 Questions

1. What is the importance of image enhancement in image processing? Explain in brief


any two-point processing techniques implemented in image processing
2. Explain histogram equalization technique
3 What is histogram matching? Explain the development and implementation of the
method.
4 Highlight the importance of histograms in image processing and develop a procedure to
perform histogram equalization.
5 Explain the following image enhancement techniques, highlighting their area of
application i) intensity level slicing and power law transformation.
6 Explain the following image enhancement techniques, highlighting their area of
application. Bit – plane slicing and image negatives
7 Explain the smoothing of images in frequency domain using different types of filters
8 Discuss homomorphic filtering.
9 Explain sharpening filters in the frequency domain
10 Explain the basic concept of High boost and selective filters

2.2.8 Further Readings

1. “Digital Image Processing”, Rafael Gonzalez and Richard E. Woods, Pearson


Education, 2001, 3 rd edition.
2. “Fundamentals of Digital Image Processing”, Anil K. Jain, Pearson Edun, 2004
3. “Digital Image Processing”- S.Jayaraman, S.Esakkirajan, T.Veerakumar, Tata
McGraw Hill 2014.

ATMECE, ECE Page 29

VTU Connect Android App Download Now On Google Play Store

You might also like