0% found this document useful (0 votes)
5 views175 pages

digital image processing

The document outlines the syllabus and assessment structure for a Digital Image Processing course at Shri Sakthikailassh Women’s College. It includes details on internal and external marks distribution, course objectives, and a comprehensive syllabus covering topics such as image enhancement, restoration, compression, and segmentation. Additionally, it highlights the applications of digital image processing in various fields, including medical imaging and remote sensing.

Uploaded by

pgcriteria2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views175 pages

digital image processing

The document outlines the syllabus and assessment structure for a Digital Image Processing course at Shri Sakthikailassh Women’s College. It includes details on internal and external marks distribution, course objectives, and a comprehensive syllabus covering topics such as image enhancement, restoration, compression, and segmentation. Additionally, it highlights the applications of digital image processing in various fields, including medical imaging and remote sensing.

Uploaded by

pgcriteria2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 175

SHRI SAKTHIKAILASSH WOMEN’S COLLEGE

Military Road, Ammapet, Salem-636 003

C
SSW

DEPARTMENT OF COMPUTER SCIENCE


II M.Sc – DIGITAL IMAGE PROCESSING
PAPER CODE: 23PCSC07
STUDY MATERIAL

2023-2024

DIGITAL IMAGE PROCESSING Page 1


INTERNAL & EXTERNAL MARKS PATTERN

Theory –Marks Distribution

Maximum Marks : 100 Marks


External [EA] : 75
Marks Internal [CIA] : 25

Theory - Question Paper Pattern [External] (Total Marks: 75)


PART – A (15 x 1 = 15 Marks)
(Answer ALL questions),

PART – B (2 x 5 = 10 Marks)
(Answer ANY TWO questions)

&
C
(Open Choice – 2 out of 5 questions)
W

PART – C(5 x 10 = 50 Marks)


SS

(Answer ALL questions)

&

(One question from each unit with Internal Choice)

Theory - Internal Marks Distribution (Total Marks: 25)


Attendance : 5 Marks
Assignment : 5 Marks
Test : 15 Marks

DIGITAL IMAGE PROCESSING Page 2


SYLLABUS
OBJECTIVES:
● To provide complete knowledge on Digital Image Processing methods, such as image
processing methods in Spatial domain and Frequency domain, Edge detection,
Compression, Segmentation, and Morphological concepts, which enable the students to
understand the concepts and implement them empirically

UNIT–I
Introduction: What is Digital image processing – the origin of DIP – Examples of fields
that use
DIP – Fundamentals steps in DIP – Components of an image processing system. Digital Image
Fundamentals: Elements of Visual perception – Light and the electromagnetic spectrum – Image
sensing and acquisition – Image sampling and Quantization – Some Basic relationship between
Pixels – Linear & Nonlinear operations.

UNIT–II
Image Enhancement in the spatial domain:- Background – some basic Gray level
Transformations – Histogram Processing – Enhancement using Arithmetic / Logic operations –
Basics of spatial filtering – Smoothing spatial filters – Sharpening spatial filters – Combining
spatial enhancement methods.

UNIT–III
Image Restoration: A model of the Image Degradation / Restoration Process – Noise
models –
Restoration is the process of noise only – Spatial Filtering – Periodic Noise reduction by
frequency domain filtering – Linear, Portion – Invariant Degradations – Estimating the
degradation function – Inverse filtering – Minimum mean square Error Filtering – Constrained
C
least squares filtering – Geometric mean filter – Geometric Transformations.

UNIT–IV

S SW
Image Compression: Fundamentals – Image compression models – Elements of
Information
Theory – Error Free compression – Lossy compression – Image compression standards.

UNIT–V
Image Segmentation: Detection and Discontinuities – Edge Linking and Boundary
deduction –
Thresholding – Region-Based segmentation – Segmentation by Morphological watersheds – The
use of motion in segmentation.

DIGITAL IMAGE PROCESSING Page 3


TEXTBOOKS
1. Rafael Gonzalez, Richard E. Woods, “Digital Image Processing”, Fourth Edition,
PHI/Pearson Education, 2013.
2. A. K. Jain, Fundamentals of Image Processing, Second Ed., PHI, New Delhi, 2015.

REFERENCES
1. B.Chanla, D. Dutta Majumder, “DigitalImageProcessingand Analysis”, PHI, 2003.
2. Nick Elford, “Digital Image Processing a practical introducing using Java”, Pearson
Education, 2004.
3. Todd R.Reed,“Digital Image Sequence Processing,Compression,andAnalysis”,CRC Press,
2015.
4. L.Prasad,S.S.Iyengar,“WaveletAnalysiswithApplicationstoImageProcessing”,CRCPress,
2015.

OUTCOMES:
At the end of this course, students should able
Review the fundamental concepts of a digital image processing system and Analyze images in the
frequency domain using various transforms
• Evaluate the techniques for image enhancement and image restoration. Categorize various
compression techniques

• Interpret Image compression standards, and Interpret image segmentation and representation
techniques

• Gain idea to process various image used in various fields such as weather forecasting, Diagnosis
of various disease using image such as tumor, cancer etc

DIGITAL IMAGE PROCESSING Page 4


UNIT - I

INTRODUCTION

o The field of digital image processing refers to processing digital images by means
of a digital computer.

C
S SW

o A digital image is composed of a finite number of elements, each of which has a


particular location and value. These elements are called picture elements, image
elements, pels, and pixels.
o Pixel is the term used most widely to denote the elements of a digital image.
o The input of that system is a digital image and the system process that image using
efficient algorithms, and gives an image as an output. The most common example
is Adobe Photoshop. It is one of the widely used application for processing digital
images.

What is an Image
o An image is nothing more than a two dimensional signal. It is defined by the mathematical
function f(x,y) where x and y are the two co-ordinates horizontally and vertically.

o The value of f(x,y) at any point is gives the pixel value at that point of an image.

DIGITAL IMAGE PROCESSING Page 5


C
o The above figure is an example of digital image that you are now viewing on your

SW
computer screen. But actually , this image is nothing but a two dimensional array of
numbers ranging between 0 and 255.
S
Three types of computerized processes in this field:
• low- level processes
• mid- level processes
• high-level processes

• Low-level processes involve primitive operations such as image preprocessing to


reduce noise, contrast enhancement, and image sharpening. A low-level process is
characterized by the fact that both its inputs and outputs are images.
• Mid-level processing on images involves tasks such as segmentation (partitioning
an image into regions or objects), description of those objects to reduce them to a
form suitable for computer processing, and classification (recognition) of
individual objects. A mid-level process is characterized by the fact that its inputs
generally are images, but its outputs are attributes extracted from those images (e.g.,
edges, contours, and the identity of individual objects).
• High-level processing involves “making sense” of an ensemble of recognized
objects, as in image analysis, and, at the far end of the continuum, performing the
cognitive functions normally associated with vision.

FIELDS THAT USE DIGITAL IMAGE PROCESSING:

Since digital image processing has very wide applications and almost all of the technical
fields are impacted by DIP, we will just discuss some of the major applications of DIP.

DIGITAL IMAGE PROCESSING Page 6


o Electromagnetic waves can be thought of as stream of particles, where each particle is
moving with the speed of light. Each particle contains a bundle of energy. This bundle of
energy is called a photon.

The electromagnetic spectrum according to the energy of photon is shown below.

o In this electromagnetic spectrum, we are only able to see the visible spectrum. Visible
spectrum mainly includes seven different colors that are commonly term as (VIBGOYR).
VIBGOYR stands for violet , indigo , blue , green , orange , yellow and Red.

o But that doesnot nullify the existence of other stuff in the spectrum. Our human eye can
only see the visible portion, in which we saw all the objects. But a camera can see the
C
other things that a naked eye is unable to see. For example: x rays , gamma rays , e.t.c.

S W
Hence the analysis of all that stuff too is done in digital image processing.
S
❖ Applications of Digital Image Processing
Some of the major fields in which digital image processing is widely used are mentioned below

• Image sharpening and restoration

• Medical field

• Remote sensing

• Transmission and encoding

• Machine/Robot vision
DIGITAL IMAGE PROCESSING Page 7
• Color processing

• Pattern recognition

• Video processing

• Microscopic Imaging

• Others

❖ Image sharpening and restoration


o Image sharpening and restoration refers here to process images that have been captured
from the modern camera to make them a better image or to manipulate those images in

C
way to achieve desired result. It refers to do what Photoshop usually does.

S SW
o This includes Zooming, blurring , sharpening , gray scale to color conversion, detecting
edges and vice versa , Image retrieval and Image recognition. The common examples are:

The original image

The zoomed image

DIGITAL IMAGE PROCESSING Page 8


Blurr image

C
Sharp image
SSW

Edges

DIGITAL IMAGE PROCESSING Page 9


❖ Medical field
The common applications of DIP in the field of medical is

• Gamma ray imaging

• PET scan

• X Ray Imaging


C

Medical CT
W

• UV imaging
SS

❖ UV imaging
o In the field of remote sensing , the area of the earth is scanned by a satellite or from a very
high ground and then it is analyzed to obtain information about it. One particular
application of digital image processing in the field of remote sensing is to detect
infrastructure damages caused by an earthquake.

o As it takes longer time to grasp damage, even if serious damages are focused on. Since
the area effected by the earthquake is sometimes so wide , that it not possible to examine
it with human eye in order to estimate damages. Even if it is , then it is very hectic and
time consuming procedure. So a solution to this is found in digital image processing.

o An image of the effected area is captured from the above ground and then it is analyzed
to detect the various types of damage done by the earthquake.

DIGITAL IMAGE PROCESSING Page 10


The key steps include in the analysis are

• The extraction of edges

• Analysis and enhancement of various types of edges

❖ Transmission and encoding


C
W
o The very first image that has been transmitted over the wire was from London to New
S
S
York via a submarine cable. The picture that was sent is shown below.

o The picture that was sent took three hours to reach from one place to another.

o Now just imagine , that today we are able to see live video feed , or live cctv footage from
one continent to another with just a delay of seconds. It means that a lot of work has been
done in this field too. This field doesnot only focus on transmission , but also on encoding.
Many different formats have been developed for high or low bandwith to encode photos
and then stream it over the internet or e.t.c.

DIGITAL IMAGE PROCESSING Page 11


❖ Machine/Robot vision
Apart form the many challenges that a robot face today , one of the biggest challenge still
is to increase the vision of the robot. Make robot able to see things , identify them , identify the
hurdles e.t.c. Much work has been contributed by this field and a complete other field of computer
vision has been introduced to work on it.

❖ Hurdle detection
Hurdle detection is one of the common task that has been done through image processing,
by identifying different type of objects in the image and then calculating the distance between
robot and hurdles.

C
W

❖ Line follower robot


SS

Most of the robots today work by following the line and thus are called line follower
robots. This help a robot to move on its path and perform some tasks. This has also been achieved
through image processing.

DIGITAL IMAGE PROCESSING Page 12


❖ Color processing
Color processing includes processing of colored images and different color spaces that
are used. For example RGB color model , YCbCr, HSV. It also involves studying transmission
, storage , and encoding of these color images.

❖ Pattern recognition
Pattern recognition involves study from image processing and from various other fields
that includes machine learning ( a branch of artificial intelligence). In pattern recognition ,
image processing is used for identifying the objects in an images and then machine learning
is used to train the system for the change in pattern. Pattern recognition is used in computer
aided diagnosis , recognition of handwriting , recognition of images e.t.c

❖ Video processing
A video is nothing but just the very fast movement of pictures. The quality of the video
depends on the number of frames/pictures per minute and the quality of each frame being used.
Video processing involves noise reduction , detail enhancement , motion detection , frame rate
conversion , aspect ratio conversion , color space conversion e.t.c.

FUNDAMENTAL STEPS IN DIGITAL IMAGE PROCESSING:


An idea of all the methodologies that can be applied to images for different purposes and
possibly with different objectives
C
o Image acquisition is the first process in Figure. Acquisition could be as simple as

S SW
being given an image that is already in digital form. Generally, the image
acquisition stage involves preprocessing, such as scaling.
o Image enhancement is the process of manipulating an image so that the result is
more suitable than the original for a specific application. The word specific is
important here, because it establishes at the outset that enhancement techniques are
problem oriented.
o Image restoration is an area that also deals with improving the appearance of an
image. In the sense that restoration techniques tend to be based on mathematical or
probabilistic models of image degradation. Enhancement, on the other hand, is
based on human subjective preferences regarding what constitutes a “good”
enhancement result.

DIGITAL IMAGE PROCESSING Page 13


Outputs of these processes generally are images

Wavelets and
Color image
Multiresolution Compression Morphological
Processing
Processing Processing

Image Segmentation
Restoration

Knowledge base

Image
Filtering and Representation
Enhancement & description
C
W
SS

Image Object

Acquisition Recognition

Problem Domain

o Color image processing is an area that has been gaining in importance because of
the significant increase in the use of digital images over the Internet. Color is used
also in later chapters as the basis for extracting features of interest in an image.

o Wavelets are the foundation for representing images in various degrees of


resolution. In particular, this material is used in this book for image data

DIGITAL IMAGE PROCESSING Page 14


compression and for pyramidal representation, in which images are subdivided
successively into smaller regions.
o Compression, as the name implies, deals with techniques for reducing the storage
required saving an image, or the bandwidth required transmitting it. Image
compression is familiar (perhaps inadvertently) to most users of computers in the
form of image file extensions, such as the jpg file extension used in the JPEG (Joint
Photographic Experts Group) image compression standard.

o Morphological processing deals with tools for extracting image components that
are useful in the representation and description of shape. a transition from processes
that output images to processes that output image attributes
.
o Segmentation procedures partition an image into its constituent parts or objects. In
general, autonomous segmentation is one of the most difficult tasks in digital image
processing. A rugged segmentation procedure brings the process a long way toward
successful solution of imaging problems that require objects to be identified
individually.
o Representation and description almost always follow the output of a segmentation

C
stage, which usually is raw pixel data, constituting either the boundary of a region

SW
(i.e., the set of pixels separating one image region from another) or all the points in

S
the region itself. In either case, converting the data to a form suitable for computer
processing is necessary. The first decision that must be made is whether the data
should be represented as a boundary or as a complete region.
Boundary representation is appropriate when the focus is on external shape
characteristics, such as corners and inflections. Regional representation is
appropriate when the focus is on internal properties, such as texture or skeletal
shape.
o Description, also called feature selection, deals with extracting attributes that result
in some quantitative information of interest or are basic for differentiating one class
of objects from another.

DIGITAL IMAGE PROCESSING Page 15


o Recognition is the process that assigns a label (e.g., “vehicle”) to an object based
on its descriptors. As detailed in Section 1.1, we conclude our coverage of digital
image processing with the development of methods for recognition of individual
objects.
Need for prior knowledge or about the interaction between the knowledge base and the
processing modules in Figure Knowledge about a problem domain is coded into an image
processing system in the form of a knowledge database. This knowledge may be as simple as
detailing regions of an image where the information of interest is known to be located, thus limiting
the search that has to be conducted in seeking that information.

COMPONENTS OF AN IMAGE PROCESSING SYSTEM:

C
Figure shows the basic components comprising a typical general-purpose system used
W
for digital image processing.
SS

Network

Computer Mass storage


Image displays

Specialized Image processing


Hardcopy Image processing Software
Hardware

Image sensors

Problem Domain

With reference to sensing, two elements are required to acquire digital images.
o The first is a physical device that is sensitive to the energy radiated by the object
we wish to image.

DIGITAL IMAGE PROCESSING Page 16


o The second, called a digitizer, is a device for converting the output of the physical
sensing device into digital form. For instance, in a digital video camera, the sensors
produce an electrical output proportional to light intensity. The digitizer converts
these outputs to digital data.
o Specialized image processing hardware usually consists of the digitizer just
mentioned, plus hardware that performs other primitive operations, such as an
arithmetic logic unit (ALU) that performs arithmetic and logical operations in
parallel on entire images. This type of hardware sometimes is called a front-end
subsystem, and its most distinguishing characteristic is speed. In other words, this
unit performs functions that require fast data throughputs (e.g., digitizing and
averaging video images at 30 frames/s) that the typical main computer cannot
handle.
o The computer in an image processing system is a general-purpose computer and
can range from a PC to a supercomputer. C
S SW
o Software for image processing consists of specialized modules that perform
specific tasks. A well-designed package also includes the capability for the user to
write code that, as a minimum, utilizes the specialized modules. More sophisticated
software packages allow the integration of those modules and general-purpose
software commands from at least one computer language.
o Mass storage capability is a must in image processing applications. An image of
size 1024 X 1024 pixels, in which the intensity of each pixel is an 8-bit quantity,
requires one megabyte of storage space if the image is not compressed. When
dealing with thousands, or even millions, of images, providing adequate storage in
an image processing system can be a challenge. Digital storage for image
processing applications falls into three principal categories:
1)Short-term storage for use during processing.
2)On-line storage for relatively fast recall.
3) Archival storage, characterized by infrequent access
o Another is by specialized boards, called frame buffers, that store one or more
images and can be accessed rapidly, usually at video rates (e.g., at 30 complete

DIGITAL IMAGE PROCESSING Page 17


images per second). The latter method allows virtually instantaneous image zoom,
as well as scroll (vertical shifts) and pan (horizontal shifts).
o Image displays in use today are mainly color (preferably flat screen) TV monitors.
Monitors are driven by the outputs of image and graphics display cards that are an
integral part of the computer system.
o Hardcopy devices for recording images include laser printers, film cameras, heat-
sensitive devices, inkjet units, and digital units, such as optical and CDROM disks.
o Networking is almost a default function in any computer system in use today.
Because of the large amount of data inherent in image processing applications, the
key consideration in image transmission is bandwidth.

DIGITAL IMAGE FUNDAMENTALS:


ELEMENTS OF VISUAL PERCEPTION:
C
Although the field of digital image processing is built on a foundation of mathematical and

S SW
probabilistic formulations, human intuition and analysis play a central role in the choice of one
technique versus another, and this choice often is made based on subjective, visual judgments.
Structure of the Human Eye:
Figure shows a simplified horizontal cross section of the human eye. The eye is nearly a
sphere, with an average diameter of approximately 20 mm.

DIGITAL IMAGE PROCESSING Page 18


o Three membranes enclose the eye: the cornea and sclera outer cover; the choroid;
and the retina. The cornea is a tough, transparent tissue that covers the anterior
surface of the eye. Continuous with the cornea, the sclera is an opaque membrane
that encloses the remainder of the optic globe. The choroid lies directly below the
sclera.
o This membrane contains a network of blood vessels that serve as the major source
of nutrition to the eye. Even superficial injury to the choroid, often not deemed
serious, can lead to severe eye damage as a result of inflammation that restricts
blood flow. The choroid coat is heavily pigmented and hence helps to reduce the
amount of extraneous light entering the eye and the backscatter within the optic
globe.
o At its anterior extreme, the choroid is divided into the ciliary body and the iris. The
latter contracts or expands to control the amount of light that enters the eye. The
central opening of the iris (the pupil) varies in diameter from approximately 2 to 8
C
mm. The front of the iris contains the visible pigment of the eye, whereas the back

SW
contains a black pigment. The lens is made up of concentric layers of fibrous cells

S
and is suspended by fibers that attach to the ciliary body. It contains 60 to 70%
water, about 6% fat, and more protein than any other tissue in the eye.
o The lens is colored by a slightly yellow pigmentation that increases with age. In
extreme cases, excessive clouding of the lens, caused by the affliction commonly
referred to as cataracts, can lead to poor color discrimination and loss of clear
vision. The lens absorbs approximately 8% of the visible light spectrum, with
relatively higher absorption at shorter wavelengths.
o Both infrared and ultraviolet light are absorbed appreciably by proteins within the
lens structure and, in excessive amounts, can damage the eye. The innermost
membrane of the eye is the retina, which lines the inside of the wall’s entire
posterior portion. When the eye is properly focused, light from an object outside
the eye is imaged on the retina. Pattern vision is afforded by the distribution of
discrete light receptors over the surface of the retina.

DIGITAL IMAGE PROCESSING Page 19


o There are two classes of receptors: cones and rods. The cones in each eye number
between 6 and 7 million. They are located primarily in the central portion of the
retina, called the fovea, and are highly sensitive to color. Humans can resolve fine
details with these cones largely because each one is connected to its own nerve end.
Muscles controlling the eye rotate the eyeball until the image of an object of interest
falls on the fovea. Cone vision is called photopic or bright-light vision.

Image Formation in the Eye:


o In an ordinary photographic camera, the lens has a fixed focal length, and focusing
at various distances is achieved by varying the distance between the lens and the
imaging plane, where the film (or imaging chip in the case of a digital camera) is
located. In the human eye, the converse is true;
o The distance between the lens and the imaging region (the retina) is fixed, and the

C
focal length needed to achieve proper focus is obtained by varying the shape of the

SW
lens. The fibers in the ciliary body accomplish this, flattening or thickening the lens

S
for distant or near objects, respectively.

o The distance between the center of the lens and the retina along the visual axis is
approximately 17 mm. The range of focal lengths is approximately 14 mm to 17
mm, the latter taking place when the eye is relaxed and focused at distances greater
than about 3 m. The geometry in Figure illustrates how to obtain the dimensions of
an image formed on the retina.
o For example, suppose that a person is looking at a tree 15 m high at a distance of
100 m. Letting h denote the height of that object in the retinal image, the geometry

DIGITAL IMAGE PROCESSING Page 20


of Figure yields 15/100=h/17 or h=2.55mm Perception then takes place by the
relative excitation of light receptors, which transform radiant energy into electrical
impulses that ultimately are decoded by the brain.
LIGHT AND THE ELECTROMAGNETIC SPECTRUM:
Figure shows, the range of colors we perceive in visible light represents a very small
portion of the electromagnetic spectrum. On one end of the spectrum are radio waves with
wavelengths billions of times longer than those of visible light. On the other end of the spectrum
are gamma rays with wavelengths millions of times smaller than those of visible light.
The electromagnetic spectrum can be expressed in terms of wavelength, frequency, or
energy. Wavelength (λ) and frequency (v) are related by the expression
λ =c/v

C
W
SS

o where c is the speed of light(2.998X10-8m/s). The energy of the various components


of the electromagnetic spectrum is given by the expression
o E=hv
o where h is Planck’s constant. The units of wavelength are meters, with the terms
microns (denoted and equal to10-6) and nanometers being used just as frequently.

DIGITAL IMAGE PROCESSING Page 21


Frequency is measured in Hertz (Hz), with one Hertz being equal to one cycle of
a sinusoidal wave per second.
o A commonly used unit of energy is the electron-volt. Electromagnetic waves can
be visualized as propagating sinusoidal waves with wavelength λ (Fig.a), or they
can be thought of as a stream of massless particles, each traveling in a wavelike
pattern and moving at the speed of light. Each massless particle contains a certain
amount (or bundle) of energy.
o Each bundle of energy is called a photon. From Equation that energy is proportional
to frequency, so the higher-frequency (shorter wavelength) electromagnetic
phenomena carry more energy per photon.
o Thus, radio waves have photons with low energies; microwaves have more energy

C
than radio waves, infrared still more, then visible, ultraviolet, X-rays, and finally
W
gamma rays, the most energetic of all. This is the reason why gamma rays are so
SS
dangerous to living organisms.
o Light is a particular type of electromagnetic radiation that can be sensed by the
human eye. The visible band of the electromagnetic spectrum spans the range from
approximately 0.43 µm (violet) to about 0.79 µm (red).
o For convenience, the color spectrum is divided into six broad regions: violet, blue,
green, yellow, orange, and red. No color (or other component of the
electromagnetic spectrum) ends abruptly, but rather each range blends smoothly
into the next, as shown in the above Figure.

o The colors that humans perceive in an object are determined by the nature of the
light reflected from the object. A body that reflects light relatively balanced in all
visible wavelengths appears white to the observer. However, a body that favors
reflectance in a limited range of the visible spectrum exhibits some shades of color.
o For example, green objects reflect light with wavelengths primarily in the 500 to
570 nm range while absorbing most of the energy at other wavelengths. Light that
is void of color is called monochromatic (or achromatic) light.

DIGITAL IMAGE PROCESSING Page 22


o The only attribute of monochromatic light is its intensity or amount. Because the
intensity of monochromatic light is perceived to vary from black to grays and
finally to white, the term gray level is used commonly to denote monochromatic
intensity.
o The range of measured values of monochromatic light from black to white is
usually called the gray scale, and monochromatic images are frequently referred to
as gray-scale images. Chromatic (color) light spans the electromagnetic energy
spectrum from approximately 0.43 to 0.79µm as noted previously. In addition to
frequency, three basic quantities are used to describe the quality of a chromatic light
source:
• Radiance,
• Luminance, and
• Brightness.
o Radiance is the total amount of energy that flows from the light source, and it is
usually measured in watts (W).
C
o Luminance, measured in lumens (lm), gives a measure of the amount of energy an
W

observer perceives from a light source. For example, light emitted from a source
SS

operating in the far infrared region of the spectrum could have significant energy
(radiance), but an observer would hardly perceive it; its luminance would be almost
zero.
o Brightness is a subjective descriptor of light perception that is practically
impossible to measure. It embodies the achromatic notion of intensity and is one of
the key factors in describing color sensation. Gamma radiation is important for
medical and astronomical imaging, and for imaging radiation in nuclear
environments. Hard (high-energy) X-rays are used in industrial applications. Chest
and dental X-rays are in the lower energy (soft) end of the X-ray band. The soft X-
ray band transitions into the far ultraviolet light region, which in turn blends with
the visible spectrum at longer wavelengths.

DIGITAL IMAGE PROCESSING Page 23


IMAGE SENSING AND ACQUISITION:
o Most of the images in which we are interested are generated by the combination of
an “illumination” source and the reflection or absorption of energy from that source
by the elements of the “scene” being imaged.
o For example, the illumination may originate from a source of electromagnetic
energy such as radar, infrared, or X-ray system. An example in the first category is
light reflected from a planar surface. An example in the second category is when
X-rays pass through a patient’s body for the purpose of generating a diagnostic X-
ray film.
o In some applications, the reflected or transmitted energy is focused onto a photo
converter (e.g., a phosphor screen), which converts the energy into visible light.
Electron microscopy and some applications of gamma imaging use this approach.
o Figure shows the three principal sensor arrangements used to transform
o illumination energy into digital images. The idea is simple: Incoming energy is transformed
into a voltage by the combination of input electrical power and sensor material that is
responsive to the particular type of energy being detected. The output voltage waveform is
the response of the sensor(s), and a digital quantity is obtained from each sensor by
digitizing its response. C
S SW

DIGITAL IMAGE PROCESSING Page 24


C
W
SS

Image Acquisition Using a Single Sensor:

For example, a green (pass) filter in front of a light sensor favors light in the green band of
the color spectrum. As a consequence, the sensor output will be stronger for green light than for
other components in the visible spectrum. In order to generate a 2-D image using a single sensor,
there has to be relative displacements in both the x- and y-directions between the sensor and the
area to be imaged.

DIGITAL IMAGE PROCESSING Page 25


o Figure shows an arrangement used in high-precision scanning, where a film
negative is mounted onto a drum whose mechanical rotation provides displacement
in one dimension. The single sensor is mounted on a lead screw that provides
motion in the perpendicular direction. Because mechanical motion can be
controlled with high precision, this method is an inexpensive (but slow) way to
obtain high-resolution images.
o Other similar mechanical arrangements use a flat bed, with the sensor moving in
two linear directions. These types of mec

C
W
SS
hanical
digitizers sometimes are referred to as microdensitometers. Another example of
imaging with a single sensor places a laser source coincident with the sensor.
Moving mirrors are used to control the outgoing beam in a scanning pattern and to
direct the reflected laser signal onto the sensor.

Image Acquisition Using Sensor Strips


Motion perpendicular to the strip provides imaging in the other direction, as shown in
Fig.(a).This is the type of arrangement used in most flat bed scanners.

DIGITAL IMAGE PROCESSING Page 26


o Sensing devices with 4000 or more in-line sensors are possible. In-line sensors are
used routinely in airborne imaging applications, in which the imaging system is
mounted on an aircraft that flies at a constant altitude and speed over the
geographical area to be imaged.
o One-dimensional imaging sensor strips that respond to various bands of the

C
electromagnetic spectrum are mounted perpendicular to the direction of flight. The

W
imaging strip gives one line of an image at a time, and the motion of the strip
S
S
completes the other dimension of a two-dimensional image.
o Lenses or other focusing schemes are used to project the area to be scanned onto
the sensors. Sensor strips mounted in a ring configuration are used in medical and
industrial imaging to obtain cross-sectional (“slice”) images of 3-D objects, as
Fig. (b) shows.

DIGITAL IMAGE PROCESSING Page 27


o A rotating X-ray source provides illumination and the sensors opposite the source
collect the X-ray energy that passes through the object (the sensors obviously have
to be sensitive to X-ray energy). This is the basis for medical and industrial
computerized axial tomography (CAT).
o It is important to note that the output of the sensors must be processed by
reconstruction algorithms whose objective is to transform the sensed data into
meaningful cross-sectional images.
C
o In other words, images are not obtained directly from the sensors by motion alone;

S SW
they require extensive processing. A 3-D digital volume consisting of stacked
images is generated as the object is moved in a direction perpendicular to the sensor
ring. Other modalities of imaging based on the CAT principle include magnetic
resonance imaging (MRI) and positron emission tomography (PET).The
illumination sources, sensors, and types of images are different, but conceptually
they are very similar to the basic imaging approach shown in Fig.(b).

Image Acquisition Using Sensor Arrays


o Numerous electromagnetic and some ultrasonic sensing devices frequently are
arranged in an array format. This is also the predominant arrangement found in
digital cameras. A typical sensor for these cameras is a CCD array, which can be
manufactured with a broad range of sensing properties and can be packaged in
rugged arrays of elements or more.
o CCD sensors are used widely in digital cameras and other light sensing instruments.
The response of each sensor is proportional to the integral of the light energy
projected onto the surface of the sensor, a property that is used in astronomical and
other applications requiring low noise images.
o Noise reduction is achieved by letting the sensor integrate the input light signal over
minutes or even hours. Because the array sensor is two-dimensional, its key
advantage is that a complete image can be obtained by focusing the energy pattern
onto the surface of the array.

DIGITAL IMAGE PROCESSING Page 28


A Simple Image Formation Model
We denote images by two-dimensional functions of the form f(x,y) . The value or
amplitude of f at spatial coordinates (x,y) is a positive scalar quantity whose physical meaning is
determined by the source of the image.

C
W

When an image is generated from a physical process, its intensity values are proportional
SS

to energy radiated by a physical source (e.g., electromagnetic waves). As a consequence, f(x, y)


must be nonzero and finite; that is,
0 <f(x, y) <∞
The function f(x,y)may be characterized by two components:
(1) The amount of source illumination incident on the scene being viewed,
(2) The amount of illumination reflected by the objects in the scene.
Appropriately, these are called the illumination and reflectance components and are denoted by
i(x, y) and r(x, y), respectively. The two functions combine as a product to form f(x, y):
F(x, y) =i(x, y) r(x, y)

DIGITAL IMAGE PROCESSING Page 29


Where
0<i(x, y) < ∞
and
0<r(x, y) <1
The nature i(x, y) of is determined by the illumination source, and r(x, y) is determined by
the characteristics of the imaged objects. It is noted that these expressions also are applicable to
images formed via transmission of the illumination through a medium, such as a chest X-ray.

IMAGE SAMPLING AND QUANTIZATION


We see that there are numerous ways to acquire images, but our objective in all is the same:
to generate digital images from sensed data. The output of most sensors is a continuous voltage
waveform whose amplitude and spatial behavior are related to the physical phenomenon being
sensed. To create a digital image, we need to convert the continuous sensed data into digital form.
This involves two processes: sampling and quantization.
Basic Concepts in Sampling and Quantization
The basic idea behind sampling and quantization is illustrated in Figure. Figure (a) shows
a continuous image f that we want to convert to digital form. An image may be continuous with
respect to the x- and y-coordinates, and also in amplitude.
(a) (b)

C
SW
S

(c) (d)

DIGITAL IMAGE PROCESSING Page 30


o To convert it to digital form, we have to sample the function in both coordinates
and in amplitude. Digitizing the coordinate values is called sampling. Digitizing the
amplitude values is called quantization. The one-dimensional function in Fig.(b) is
a plot of amplitude (intensity level) values of the continuous image along the line
segment AB in Fig.(a).
o The random variations are due to image noise. To sample this function; we take
equally spaced samples along line AB, as shown in Fig.(c).The spatial location of
each sample is indicated by a vertical tick mark in the bottom part of the figure.
o The samples are shown as small white squares superimposed on the function. The
set of these discrete locations gives the sampled function. However, the values of
the samples still span (vertically) a continuous range of intensity values. In order to
form a digital function, the intensity values also must be converted (quantized) into
discrete quantities.
o The right side of Fig. (c) Shows the intensity scale divided into eight discrete
intervals, ranging from black to white. The vertical tick marks indicate the specific
value assigned to each of the eight intensity intervals. The continuous intensity
levels are quantized by assigning one of the eight values to each sample. The
assignment is made depending on the vertical proximity of a sample to a vertical
tick mark.
o The digital samples resulting from both sampling and quantization are shown in
Fig. (d). Starting at the top of the image and carrying out this procedure line by line
C
produces a two-dimensional digital image.

S SW
o It is implied in Figure that, in addition to the number of discrete levels used; the
accuracy achieved in quantization is highly dependent on the noise content of the
sampled signal. Sampling in the manner just described assumes that we have a
continuous image in both coordinate directions as well as in amplitude.

DIGITAL IMAGE PROCESSING Page 31


o When a sensing array is used for image acquisition, there is no motion and the
number of sensors in the array establishes the limits of sampling in both directions.
Quantization of the sensor outputs is as before.
o Figure (a) shows a continuous image projected onto the plane of an array sensor.
Figure (b) shows the image after sampling and quantization. Clearly, the quality of
a digital image is determined to a large degree by the number of samples and
discrete intensity levels used in sampling and quantization.

Representing Digital Images:


o Let f(s, t) represent a continuous image function of two continuous variables, s and
C
t. We convert this function into a digital image by sampling and quantization, as

SW
explained in the previous section. Suppose that we sample the continuous image

S
into a 2-D array, f(x, y), containing M rows and N columns, where (x, y) are discrete
coordinates.
o For notational clarity and convenience, we use integer values for these discrete
coordinates: x = 0, 1, 2,………..,M-1 and y = 0, 1,2,………..,N-1 Thus, for
example, the value of the digital image at the origin is F(0,0) , and the next
coordinate value along the first row is f(0,1) . Here, the notation (0, 1) is used to
signify the second sample along the first row.
o It does not mean that these are the values of the physical coordinates when the
image was sampled. In general, the value of the image at any coordinates (x, y) is
denoted f(x, y), where x and y are integers. The section of the real plane spanned

DIGITAL IMAGE PROCESSING Page 32


by the coordinates of an image is called the spatial domain, with x and y being
referred to as spatial variables or spatial coordinates.

Spatial and Intensity Resolution:


o Spatial resolution is a measure of the smallest discernible detail in an image.
Quantitatively, spatial resolution can be stated in a number of ways, with line pairs
per unit distance, and dots (pixels) per unit distance being among the most common
measures. Suppose that we construct a chart with alternating black and white
vertical lines, each of width W units (W can be less than 1).
o The width of a line pair is thus 2W, and there are W line pairs per unit distance. For
example, if the width of a line is 0.1 mm, there are 5 line pairs per unit distance
(mm). A widely used definition of image resolution is the largest number of
discernible line pairs per unit distance (e.g., 100 line pairs per mm). Dots per unit
distance are a measure of image resolution used commonly in the printing and
publishing industry.
o In the U.S., this measure usually is expressed as dots per inch (dpi). To give you an
idea of quality, newspapers are printed with a resolution of 75 dpi, magazines at
133 dpi, glossy brochures at 175 dpi, and the book page at which you are presently
looking is printed at 2400 dpi. The key point in the preceding paragraph is that, to
be meaningful, measures of spatial resolution must be stated with respect to spatial
units.
o Image size by itself does not tell the complete story. To say that an image has, say,
a resolution 1024 X 1024 pixel is not a meaningful statement without stating the
spatial dimensions encompassed by the image. Size by itself is helpful only in
C
making comparisons between imaging capabilities. For example, a digital camera

S SW
with a 20-megapixel CCD imaging chip can be expected to have a higher capability
to resolve detail than an 8-megapixel camera, assuming that both cameras are
equipped with comparable lenses and the comparison images are taken at the same
distance.

DIGITAL IMAGE PROCESSING Page 33


o Intensity resolution similarly refers to the smallest discernible change in intensity
level. We have considerable discretion regarding the number of samples used to
generate a digital image, but this is not true regarding the number of intensity levels.
o Based on hardware considerations, the number of intensity levels usually is an
integer power of two, as mentioned in the previous section. The most common
number is 8 bits, with 16 bits being used in some applications in which
enhancement of specific intensity ranges is necessary.
Image Interpolation:
o Interpolation is a basic tool used extensively in tasks such as zooming, shrinking,
rotating, and geometric corrections. Our principal objective in this section is to
introduce interpolation and apply it to image resizing (shrinking and zooming),
which are basically image resampling methods. Uses of interpolation in
applications such as rotation and geometric corrections.
o Fundamentally, interpolation is the process of using known data to estimate values
at unknown locations. We begin the discussion of this topic with a simple example.
Suppose that an image of size 500 X 500 pixels has to be enlarged 1.5 times to 750
X 750 pixels.
C
SW
o A simple way to visualize zooming is to create an imaginary 750 X 750 grid with

S
the same pixel spacing as the original, and then shrink it so that it fits exactly over
the original image. Obviously, the pixel spacing in the shrunken 750 X 750 grid
will be less than the pixel spacing in the original image.
o To perform intensity-level assignment for any point in the overlay, we look for its
closest pixel in the 750 X 750 original images and assign the intensity of that pixel
to the new pixel in the grid. When we are finished assigning intensities to all the
points in the overlay grid, we expand it to the original specified size to obtain the
zoomed image.

DIGITAL IMAGE PROCESSING Page 34


SOME BASIC RELATIONSHIPS BETWEEN PIXELS
o Consider several important relationships between pixels in a digital image. As
mentioned before, an image is denoted by f(x, y).When referring in this section to
a particular pixel, we use lowercase letters, such as p and q.
Neighbors of a Pixel:
o A pixel p at coordinates f(x, y) has four horizontal and vertical neighbors whose
coordinates are given by
(x + 1, y) (x - 1, y) (x, y + 1) (x, y - 1)
o 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 neighbor locations 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 and are denoted by ND(P).
(x + 1, y + 1) (x + 1, y - 1) (x - 1, y + 1) (x - 1, y - 1)
o These points, together with the 4-neighbors, are called the 8-neighbors of p,
denoted by N4(P). As before, some of the neighbor locations in ND(P) and N8(P)
fall outside the image if (x, y)is on the border of the image.

Adjacency, Connectivity, Regions, and Boundaries:


Let V be the set of intensity values used to define adjacency. In a binary image V= {1}, if
we are referring to adjacency of pixels with value 1. In a gray-scale image, the idea is the same,
but set V typically contains more elements. For example, in the adjacency of pixels with a range
of possible intensity values 0 to 255, set V could be any subset of these 256 values. We consider
three types of adjacency:
C

(a) 4-adjacency. Two pixels p and q with values from V are 4-adjacent if q is in the set N4(P).
W

(b) 8-adjacency. Two pixels p and q with values from V are 8-adjacent if q is in the set N8(P).
SS

(c) m-adjacency (mixed adjacency).Two pixels p and q with values from V are
m-adjacent if
(i) q is in N4(P) or
(ii) q is in ND(P) and the set N4(P)∩ N4(q) has no pixels whose values are from
V.

DIGITAL IMAGE PROCESSING Page 35


Mixed adjacency is a modification of 8-adjacency. It is introduced to eliminate the ambiguities
that often arise when 8-adjacency is used.
Distance Measures
For pixels p, q, and z, with coordinates (x, y), (s, t), and (v, w), respectively, D is a
distance function or metric if
• D(p, q)≥0 (D(p, q)=0 if p=q),
• D(p, q)= D(q, p), and
• D(p, z)≤ D(p, q)+ D(q, z)
The Euclidean distance between p and q is defined as
De (p, q) = [(x-s) 2+(y-t) 2] 1/2
For this distance measure, the pixels having a distance less than or equal to some value r from (x,
y) are the points contained in a disk of radius r centered at (x, y).
The D4 distance (called the city-block distance) between p and q is defined as
D4 (p, q) = | x – s | + | y - t |
In this case, the pixels having a D4 distance from (x, y) less than or equal to some value r
form a diamond centered at (x, y). For example, the pixels with D4 distance ≤ 2 from (x, y) (the
center point) form the following contours of constant distance:

2
C
2 1

S W 2
2 1
2 S 0
1
1
2
2

2
The pixels with D4=1 are the 4-neighbors of (x, y). The D8 distance (called the chessboard
distance) between p and q is defined as
D8 (p, q) = max (| x - s |, | y - t |)
In this case, the pixels with distance from (x, y) less than or equal to some value r form a
square centered at. For example, the pixels with D8 distance ≤ 2 from (x, y) (the center point)
form the following contours of constant distance:

DIGITAL IMAGE PROCESSING Page 36


2 2 2 2 2
2 1 1 1 2
2 1 0 1 2
2 1 1 1 2
2 2 2 2 2

The pixels with D8 = 1 are the 8-neighbors of (x, y).

C
S W
S

DIGITAL IMAGE PROCESSING Page 37


UNIT – I

QUESTION BANK

1 MARKS

1) At what points, a continuous image is digitized?


a. Sampling

b. Vertex
c. Contour
d. Random
Hide Answer Workspace

Answer: a) Sampling points

Explanation: Sampling is a process of reducing continuous-time signals to discrete-time signals.

2) ________ represents the transition between image function's continuous values and its digital
equivalent.
a. Rasterization
b. Quantization
C
SW
c. Sampling
d. None of the above
Hide Answer Workspace S
Answer: a) Quantization

Explanation: Quantization is a mechanism that involves the conversion of a continuous range of


values into a finite range of discrete values.

3) Which of the following correctly describes the slightest visible change in the level of intensity?
Contour
a. Saturation
b. Contrast
c. Intensity Resolution
Hide Answer Workspace

DIGITAL IMAGE PROCESSING Page 38


Answer: d) Intensity Resolution

Explanation: Intensity resolution can be defined as the total number of bits required to quantize
an image.

4) What is the name of the tool that helps in zooming, shrinking, rotating, etc.?
a. Filters
b. Interpolation
c. Sampling
d. None of the above
Hide Answer Workspace

Answer: b) Interpolation

Explanation: Interpolation is one such basic tool that is used to zoom, shrink, rotate, etc.

5) The dynamic range of the imaging system is a quantitative relation where the upper limit can
be determined by
a. Brightness
b. Contrast
c. Saturation
C
d. Noise
Hide Answer Workspace
S W
Answer: c) Saturation
S
Explanation: Saturation is taken as a numerator.

6) The lower limit of the dynamic range ratio can be determined by


a. Brightness
b. Contrast
c. Saturation
d. Noise
Hide Answer Workspace

Answer: d) Noise

Explanation: Noise is taken as a denominator.

DIGITAL IMAGE PROCESSING Page 39


7) Which of the following is the most famous single sensor utilized for image acquisition?
a. Photodiode
b. CMOS
c. Microdensitometer
d. None of the above
Hide Answer Workspace

Answer: a) Photodiode

Explanation: The photodiode is a p-n junction semiconductor device that transmutes the light into
an electric current.

8) What is the full form of CAT in image processing?


a. Computer-Aided Tomography
b. Computer-Aided Telegraphy
c. Computerized Axial Tomography
d. Computerized Axial Telegraphy
Hide Answer Workspace

Answer: c) Computerized Axial Tomography

Explanation: Computerized Axial Tomography is based on image acquisition that uses sensor
strips.

9) What is meant by the section of the real plane that the image coordinates have spanned?
a. Coordinate Axis
C
SW
b. Plane of Symmetry
c. Spatial Domain
d. None of the above
Hide Answer Workspace
S
Answer: c) Spatial Domain

Explanation: Spatial Domain refers to the section of the real plane that has been spanned by the
coordinates of an image, where x and y coordinates are called Spatial coordinates.

10) Which of the following is the effect of using an inadequate amount of intensity levels in a
digital image's smooth areas?

DIGITAL IMAGE PROCESSING Page 40


a. Contouring
b. Interpolation
c. Gaussian smooth
d. False Contouring
Hide Answer Workspace

Answer: d) False Contouring

Explanation: False contouring is caused when the grey-level resolution of a digital image gets
decreased.

11) What is the name of the process in which the known data is utilized to evaluate the value at an
unknown location?
a. Interpolation
b. Acquisition
c. Pixelation
d. None of the above
Show Answer Workspace

12) Which of the following is not a correct example of Image Multiplication?


a. Masking
b. Shading Correction
c. Pixelation
d. Region of Interest Operations
Hide Answer Workspace C
Answer: c) Pixelation
S W
S
Explanation: Pixelation deals with the amplification of pixels.

13) Name the procedure in which individual pixel values of the digital image get altered.
a. Neighborhood Operations
b. Image Registration
c. Geometric Spatial Transformation
d. Single Pixel Operation
Hide Answer Workspace

DIGITAL IMAGE PROCESSING Page 41


Answer: d) Single Pixel Operation

Explanation: It is expressed as a transformation function T of the form s=T(z), where z is the


intensity.

14) Which of the following possess maximum frequency?


a. Gamma Rays
b. UV Rays
c. Microwaves
d. Radio waves
Show Answer Workspace

15) Which of the following color possess the longest wavelength in the visible spectrum?
a. Yellow
b. Red
c. Blue
d. Violet
Hide Answer Workspace

Answer: b) Red

Explanation: In the visible spectrum, red has the longest wavelength. The visible colors are
ranged from shortest to longest wavelength, i.e., Violet, Blue, Green, Yellow, Orange, and Red.

5 MARKS:

C
1. Explain Types of computerized processes in detail.

SW
2. Explain Components of an image processing system in detail (April 2012).

S
3. Explain Light and the electromagnetic spectrum in detail.
4. Explain some basic relationships between pixels in detail (April 2012).

10 MARKS:
1. Explain Examples of fields that use digital image processing in detail.
2. Explain Fundamental steps in digital image processing in detail (April 2012).
3. Explain Image sensing and acquisition in detail (April 2012)..
4. Explain Image sampling and quantization in detail.

DIGITAL IMAGE PROCESSING Page 42


UNIT - II
IMAGE ENHANCEMENT IN SPATIAL DOMANI

1. BACKGROUND:
Image enhancement approaches fall into two broad categories: spatial domain methods
and frequency domain methods. The term spatial domain refers to the image plane itself, and
approaches in this category are based on direct manipulation of pixels in an image. Frequency
domain processing techniques are based on modifying the Fourier transform of an image.
The term spatial domain refers to the aggregate of pixels composing an image. Spatial
domain methods are procedures that operate directly on these pixels. Spatial domain processes
will be denoted by the expression
g (x, y) = T [f (x, y)]

where f(x, y) is the input image, g(x, y) is the processed image, and T is an operator on f,
defined over some neighborhood of (x, y). In addition, T can operate on a set of input images,
such as performing the pixel-by-pixel sum of K images for noise reduction.

The principal approach in defining a neighborhood about a point (x, y) is to use a square
or rectangular sub image area centered at (x, y), as shown in below figure 1.
C
W
SS

Figure 1: 3*3 neighborhood about a point (x, y) in an image.

DIGITAL IMAGE PROCESSING Page 43


The center of the sub image is moved from pixel to pixel starting, say, at the top left
corner. The operator T is applied at each location (x, y) to yield the output, g, at that location.
The process utilizes only the pixels in the area of the image spanned by the neighborhood.
Although other neighborhood shapes, such as approximations to a circle, sometimes are used,
square and rectangular arrays are by far the most predominant because of their ease of
implementation.
The simplest form of T is when the neighborhood is of size 1*1 (that is, a single pixel). In
this case, g depends only on the value of f at (x, y), and T becomes a gray-level (also called an
intensity or mapping) transformation function of the form s = T(r) where, for simplicity in
notation, r and s are variables denoting, respectively, the gray level of f(x, y) and g(x, y) at any
point (x, y).
For example, if T(r) has the form shown in Fig. 2(a), the effect of this transformation

C
W
would be to produce an image of higher contrast than the original by darkening the levels below
SS
m and brightening the levels above m in the original image. In this technique, known as contrast
stretching, the values of r below m are compressed by the transformation function into a narrow
range of s, toward black. The opposite effect takes place for values of r above m. In the limiting
case shown in Fig. 2(b), T(r) produces a two-level (binary) image. A mapping of this form is
called a thresholding function.

DIGITAL IMAGE PROCESSING Page 44


2. SOME BASIC GRAY LEVEL TRANSFORMATIONS:
1. Image Negatives:
The negative of an image with gray levels in the range [0,L-1]is obtained by using the
negative transformation shown in Fig. 3.3, which is given by the expression

Figure 3: Some basic gray-level transformation functions used for image ehancement.
C

Reversing the intensity levels of an image produces the equivalent of a photographic


W

negative. This type of processing is particularly suited for enhancing white or gray detail
SS

embedded in dark regions of an image, especially when the black areas are dominant in size.
2. Log Transformations:
The general form of the log transformation
s = c log (1 + r)
where c is a constant, and it is assumed that r ≥ 0.
The shape of the log curve in Fig. 3 shows that this transformation maps a narrow range of low
gray-level values in the input image into a wider range of output levels. The opposite is true
of higher values of input levels. We would use a transformation of this type to expand the values

DIGITAL IMAGE PROCESSING Page 45


of dark pixels in an image while compressing the higher-level values. The opposite is true of the
inverse log transformation.
3. Power-Law Transformations:
Power-law transformations have the basic form
s = c rγ

where c and γ are positive constants, Also can be represented as


s = c (r+ε)γ
An offset measurable when input is zero
We see in Fig. 4 that curves generated with values of g>1 have exactly the opposite effect
as those generated with values of g<1. Finally, we note that from above equation reduces to the
identity transformation when c=g=1.

C
W
SS

Figure 4: Plots of the equation s = c r γ for various values of g (c=1 in all cases).

Plots of s versus r for various values of g are shown in Fig. 4. As in the case of the log
transformation, 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.

DIGITAL IMAGE PROCESSING Page 46


A variety of devices used for image capture, printing, and display respond according to a
power law. By convention, the exponent in the power-law equation is referred to as gamma. The
process used to correct this power-law response phenomenon is called gamma correction.
Gamma correction is straightforward. All we need to do is preprocess the input image before
inputting it into the monitor by performing the transformation
s = r1/2.5 = r0.4
Gamma correction is important if displaying an image accurately on a computer screen is
of concern. Images that are not corrected properly can look either bleached out, or, what is more
likely, too dark
For example, cathode ray tube (CRT) devices have an intensity-to-voltage response that
is a power function, with exponents varying from approximately 1.8 to 2.5.With reference to the
curve for g=2.5 in Fig. 3.6, we see that such display systems would tend to produce images that
are darker than intended.
Contrast stretching:
One of the simplest piecewise linear functions is a contrast-stretching transformation.
Low-contrast images can result from poor illumination, lack of dynamic range in the imaging
sensor, or even wrong setting of a lens aperture during image acquisition. The idea behind
contrast stretching is to increase the dynamic range of the gray levels in the image being
processed.
C
W
• If r1,s1 and r2,s2 control the shape of the transformation function.and if r1=s1 and r2=s2
S
S
the transformation is a linear function that produces no changes in intensity levels !
• If r1=r2 and s1=0 and s2 =L-1, the transformation becomes a thresholding function that
creates a binary image.
• In general r1≤r2 and s1 ≤s2 is assumed so that the function is single valued and
monotonically increasing. This preserves the order of intensity levels, thus preventing the
creation of intensity artifacts in the processed image.
Gray level slicing:
It is highlighting a specific range of intensities in an image often is of interest. Its
applications include enhancing features such as masses of water in satellite imagery and
enhancing flaws in X-ray images.

DIGITAL IMAGE PROCESSING Page 47


• The intensity level slicing process can be implemented for these defects/noise etc.
• It can be done in several ways
Ex: One is to display in one value (say, white), all the values in the range of interest and
in another (say, black), all other intensities.
Bit-plane slicing:
Instead of highlighting gray-level ranges, highlighting the contribution made to total
image appearance by specific bits might be desired. Suppose that each pixel in an image is
represented by 8 bits. Imagine that the image is composed of eight 1-bit planes, ranging from bit
plane 0 for the least significant bit to bit plane 7 for the most significant bit. In terms of 8-bit
bytes, plane 0 contains all the lowest order bits in the bytes comprising the pixels in the image
and plane 7 contains all the high-order bits.

C
S SW
Figure 5: Bit-plane representation of an 8-bit image.
Decomposing an image into its bit planes is useful for analyzing the relative importance of
each bit in the image, a process that aids in determining the adequacy of the number of bits used
to quantize the image. It is useful in image compression.
• The reconstruction is done by using few planes only.
• It is done by multiplying the pixels of the nth plane by a constant 2n-1.
• All the generated planes are added together (few of 8 planes)
• If we use bit plane 7 and 8, multiply bit plane 8 by 128 and plane 7 by 64 and then added
together.

DIGITAL IMAGE PROCESSING Page 48


3. Histogram Processing:

The histogram of a digital image with gray levels in the range [0, L-1] is a discrete
function h(rk)=nk, where rk is the kth gray level and nk is the number of pixels in the image
having gray level rk. Histograms are the basis for numerous spatial domain processing
techniques.
Histogram manipulation can be used effectively for image enhancement. Histograms are
simple to calculate in software and also lend themselves to economic hardware implementations,
thus making them a popular tool for real-time image processing.
The horizontal axis of each histogram plot corresponds to gray level values, rk. The
vertical axis corresponds to values of
H(rk)=nk or p(rk)=nk/n if the values are normalized.
Thus, as indicated previously, these histogram plots are simply plots of h(rk)=nk versus
rk or p(rk)=nk/n versus rk.
Histogram Equalization:
Consider for a moment continuous functions, and let the variable r represent the gray
levels of the image to be enhanced. In the initial part of our discussion we assume that r has been

C
normalized to the interval [0, 1], with r=0 representing black and r=1 representing white. Later,

SW
we consider a discrete formulation and allow pixel values to be in the interval [0, L-1]. For any r

S
satisfying the aforementioned conditions, we focus attention on transformations of the form
s=T(r) 0 ≤ r ≤ 1 ......(1)
that produce a level s for every pixel value r in the original image. For reasons that will become
obvious shortly, we assume that the transformation function T(r) satisfies the following
conditions:
a. T(r) is a monotonically increasing function in the interval 0 ≤ r ≤ L-1:
T(r) be single valued is needed to guarantee that the inverse transformation will exist, and
the monotonicity condition preserves the increasing order from black to white in the
output image.
b. 0 ≤ T(r) ≤ L-1 for 0 ≤ r ≤ L-1:
It guarantees that the output gray levels will be in the same range as the input levels.
Figure 6 gives an example of a transformation function that satisfies these two conditions.
DIGITAL IMAGE PROCESSING Page 49
Figure 6 A gray-level transformation functions that is both single valued and monotonically increasing.
The inverse transformation from s back to r is denoted
r = T-1(s) 0 ≤ s ≤1 ......(2)
The gray levels in an image may be viewed as random variables in the interval [0, 1]. One
of the =most fundamental descriptors of a random variable is its probability density function
(PDF). Let pr(r) and ps(s) denote the probability density functions of random variables r and s,
respectively,
where the subscripts on p are used to denote that pr and ps are different functions. A basic
result from an elementary probability theory is that, if pr(r) and T(r) are known and T-1(s)
C

satisfies condition(a) specified, then the probability density function ps(s) of the transformed
W

variable s can be obtained using a rather simple formula:


SS

.........(3)
A transformation function of particular importance in image processing has the form

..........(4)
where w is a dummy variable of integration. From Leibniz’s rule in calculus

For discrete values we deal with probabilities and summations instead of probability
density functions and integrals. The probability of occurrence of gray level rk in an image is
approximated by

DIGITAL IMAGE PROCESSING Page 50


The discrete version of the transformation function

The transformation (mapping) given in Eq.(8) is called histogram equalization or histogram


linearization.
The inverse transformation from s back to r is denoted by

Histogram Matching:
As indicated in the preceding discussion, histogram equalization automatically determines
a transformation function that seeks to produce an output image that has a uniform histogram.
When automatic enhancement is desired, this is a good approach because the results from this

C
technique are predictable and the method is simple to implement. But in few applications, its

SW
required to extract specified histogram then the method used to generate a processed image that
has a specified histogram is called histogram matching or histogram specification.
S
Let us return for a moment to continuous gray levels r and z and let pr(r) and pz(z) denote
their corresponding continues probability density functions. In this notation, r and z denote the
gray levels of the input and output (processed) images, respectively. We can estimate pr(r) from
the given input image, while pz(z) is the specified probability density function that we wish the
output image to have.
Let s be a random variable with the property

DIGITAL IMAGE PROCESSING Page 51


where ‘w’(omega)is a dummy variable of integration.
Suppose next that we define a random variable z with the property

where t is a dummy variable of integration. It then follows from these two equations that
G(z)=T(r) and, therefore, that z must satisfy the condition.

The transformation T(r) can be obtained from Eq. (10) once pr(r) has been estimated from the
input image. Similarly, the transformation function G(z) can be obtained using Eq. (11) because
C

pz(z) is given.
W

The discrete formulation of Eq. (3.3-10) is given by Eq. (3.3-8), which we repeat here for
SS

convenience:

where n is the total number of pixels in the image, nj is the number of pixels with gray level rj ,
and L is the number of discrete gray levels. Similarly, the discrete formulation of Eq. (11) is
obtained from the given histogram pz(zi),i=0,1, 2,p ,L-1, and has the form

DIGITAL IMAGE PROCESSING Page 52


Finally, the discrete version of Eq. (12) is given by

or, from Eq. (13),

C
Figure 7(a) Graphical interpretation of mapping from rk to sk via T(r). (b) Mapping of zq to its

S SW
corresponding value vq via G(z). (c) Inverse mapping from sk to its corresponding value of zk.
The procedure we have just developed for histogram matching may be summarized as follows:
1. Obtain the histogram of the given image.
2. Use Eq. (13) to pre-compute a mapped level sk for each level rk.
3. Obtain the transformation function G from the given pz(z) using Eq. (14).
4. Pre-compute zk for each value of sk using the iterative scheme defined in connection with Eq.
5. For each pixel in the original image, if the value of that pixel is rk, map this value to its
corresponding level sk; then map level sk into the final level zk. Use the pre-computed values
from Steps (2) and (4) for these mappings

DIGITAL IMAGE PROCESSING Page 53


4. ENHANCEMENT USING ARITHMETIC/LOGIC OPERATIONS:
Arithmetic/logic operations involving images are performed on a pixel-by-pixel basis
between two or more images (this excludes the logic operation NOT, which is performed on a
single image). Logic operations similarly operate on a pixel-by-pixel basis. We need only be
concerned with the ability to implement the AND, OR, and NOT logic operators because these
three operators are functionally complete. When dealing with logic operations on gray-scale
images, pixel values are processed as strings of binary numbers. For example, performing the
NOT operation on a black, 8-bit pixel (a string of eight 0’s) produces a white pixel (a string of
eight 1’s). Intermediate values are processed the same way, changing all 1’s to 0’s and vice
versa.
The four arithmetic operations, subtraction and addition (in that order) are the most useful
for image enhancement.

C
S SW
Image Subtraction:
The difference between two images f(x, y) and h(x, y), expressed as
g(x, y) = f(x, y) - h(x, y),
And it is obtained by computing the difference between all pairs of corresponding pixels from f
and h. The key usefulness of subtraction is the enhancement of differences between images.
One of the most commercially successful and beneficial uses of image subtraction is in
the area of medical imaging called mask mode radiography. In this case h(x, y), the mask, is an
X-ray image of a region of a patient’s body captured by an intensified TV camera (instead of
traditional X-ray film) located opposite an X-ray source. The procedure consists of injecting a
contrast medium into the patient’s bloodstream, taking a series of images of the same anatomical
region as h(x, y), and subtracting this mask from the series of incoming images after injection of
the contrast medium. The net effect of subtracting the mask from each sample in the incoming
stream of TV images is that the areas that are different between f(x, y) and h(x, y) appear in the

DIGITAL IMAGE PROCESSING Page 54


output image as enhanced detail.
Image Averaging:
Consider a noisy image g(x, y) formed by the addition of noise h(x, y) to an
original image f(x, y); that is,
g(x, y) = f(x, y) + h(x, y)
where the assumption is that at every pair of coordinates (x, y) the noise is uncorrelated and has
zero average value. The objective of the following procedure is to reduce the noise content by
adding a set of noisy images, {gi(x, y)}.
If the noise satisfies the constraints just stated, it can be shown that if an image is
formed by averaging K different noisy images,

An important application of image averaging is in the field of astronomy, where imaging


with very low light levels is routine, causing sensor noise frequently to render single images
C

virtually useless for analysis.


W

Multiplication and Division:


SS

We consider division of two images simply as multiplication of one image by the


reciprocal of the other. Aside from the obvious operation of multiplying an image by a constant
to increase its average gray level, image multiplication finds use in enhancement primarily as a
masking operation that is more general than the logical masks discussed in the previous
paragraph. In other words, multiplication of one image by another can be used to implement
gray-level, rather than binary, masks.
5. BASICS OF SPATIAL FILTERING:
Some neighborhood operations work with the values of the image pixels in the
neighborhood and the corresponding values of a sub image that has the same dimensions as the
neighborhood. The sub image is called a filter, mask, kernel, template, or window, with the first
three terms being the most prevalent terminology. The values in a filter sub image are referred to
as coefficients, rather than pixels.

DIGITAL IMAGE PROCESSING Page 55


The mechanics of spatial filtering are illustrated in Fig 8.The process consists simply of
moving 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. For linear spatial, the response is
given by a sum of products of the filter coefficients and the corresponding image pixels in the
area spanned by the filter mask.

C
SW
S
Figure 8 The mechanics of spatial filtering. The magnified drawing shows a 3*3 mask and
the image section directly under it; the image section is shown displaced out from under the
mask for ease of readability.
For the 3*3 mask shown in Fig. 3.32, the result (or response), R, of linear filtering with the
filter mask at a point (x, y) in the image is

DIGITAL IMAGE PROCESSING Page 56


which we see is the sum of products of the mask coefficients with the corresponding pixels
directly under the mask. Note in particular that the coefficient w(0, 0) coincides with image
value f(x, y), indicating that the mask is centered at (x, y) when the computation of the sum of
products takes place. For a mask of size m*n, we assume that m=2a+1 and n=2b+1,where a and
b are nonnegative integers. All this says is that our focus in the following discussion will be on
masks of odd sizes, with the smallest meaningful size being 3*3 (we exclude from our discussion
the trivial case of a 1*1 mask).
In general, linear filtering of an image f of size M*Nwith a filter mask of size m*n is
given by the expression:

where, from the previous paragraph, a=(m-1)/2 and b=(n-1)/2. To generate a complete filtered
image this equation must be applied for x=0, 1, 2, p , M-1 and y=0, 1, 2, p , N-1.
When interest lies on the response, R, of an m*n mask at any point (x, y), and not on the
mechanics of implementing mask convolution, it is common practice to simplify the notation by
using the following expression:
C
W
SS

6. SMOOTHING SPATIAL FILTER:


Smoothing filters are 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, and bridging of small gaps in lines or curves. Noise reduction can be accomplished by
blurring with a linear filter and also by nonlinear filtering.
Smoothing Linear Filters:
The output (response) of a smoothing, linear spatial filter is simply the average of the
pixels contained in the neighborhood of the filter mask. These filters sometimes are called
averaging filters.
The idea behind smoothing filters is straightforward. By replacing the value of every

DIGITAL IMAGE PROCESSING Page 57


pixel in an image by the average of the gray levels in the neighborhood defined by the filter
mask, this process results in an image with reduced “sharp” transitions in gray levels. Because
random noise typically consists of sharp transitions in gray levels, the most obvious application
of smoothing is noise reduction. However, edges (which almost always are desirable features of
an image) also are characterized by sharp transitions in gray levels, so averaging filters have the
undesirable side effect that they blur edges.
A major use of averaging filters is in the reduction of “irrelevant” detail in an image. By
“irrelevant” we mean pixel regions that are small with respect to the size of the filter mask. The
Figure shows two 3*3 smoothing filters. Use of the first filter yields the standard average of the
pixels under the mask.

C
SW
This is the average of the gray levels of the pixels in the 3*3 neighborhood defined by the
mask. Note that, instead of being 1_9, the coefficients of the filter are all 1’s. An m*n mask
S
would have a normalizing constant equal to 1_mn. A spatial averaging filter in which all
coefficients are equal is sometimes called a box filter.

Figure 9 Two 3*3 smoothing (averaging) filter masks. The constant multiplier in front of
each mask is equal to the sum of the values of its coefficients, as is required to compute an
average.
The second mask shown in Fig. 9 is a little more interesting. This mask yields a so-called
weighted average, terminology used to indicate that pixels are multiplied by different
coefficients, thus giving more importance (weight) to some pixels at the expense of others. In the

DIGITAL IMAGE PROCESSING Page 58


mask shown in Fig. 9(b) the pixel at the center of the mask is multiplied by a higher value than
any other, thus giving this pixel more importance in the calculation of the average. The other
pixels are inversely weighted as a function of their distance from the center of the mask.
The general implementation for filtering an M*N image with a weighted averaging filter
of size m*n (m and n odd) is given by the expression

For x=0, 1, 2, p , M-1 and y=0, 1, 2, p , N-1.


Order-Statistics Filters:
Order-statistics filters are nonlinear spatial filters whose response is based on ordering
(ranking) the pixels contained in the image area encompassed by the filter, and then replacing the
value of the center pixel with the value determined by the ranking result. The best-known
example in this category is the median filter, which, as its name implies, replaces the value of a
pixel by the median of the gray levels in the neighborhood of that pixel (the original value of the
C
pixel is included in the computation of the median).
W
Median filters are quite popular because, for certain types of random noise, they provide
SS

excellent noise-reduction capabilities, with considerably less blurring than linear smoothing
filters of similar size. Median filters are particularly effective in the presence of impulse noise,
also called salt-and-pepper noise because of its appearance as white and black dots superimposed
on an image.
The median, j, of a set of values is such that half the values in the set are less than or equal
to j, and half are greater than or equal to j. In order to perform median filtering at a point in an
image, we first sort the values of the pixel in question and its neighbors, determine their median,
and assign this value to that pixel. For example, in a 3*3 neighborhood the median is the 5th
largest value, in a 5*5 neighborhood the 13th largest value, and so on. When several values in a
neighborhood are the same, all equal values are grouped. For example, suppose that a 3*3
neighborhood has values (10, 20, 20, 20, 15, 20, 20, 25, 100). These values are sorted as (10, 15,
20, 20, 20, 20, 20, 25, 100), which results in a median of 20. Thus, the principal function of

DIGITAL IMAGE PROCESSING Page 59


median filters is to force points with distinct gray levels to be more like their neighbors. In fact,
isolated clusters of pixels that are light or dark with respect to their neighbors, and whose area is
less than n2/2 (one-half the filter area), are eliminated by an n*n median filter. In this case
“eliminated” means forced to the median intensity of the neighbors. Larger clusters are affected
considerably less. Although the median filter is by far the most useful order-statistics filter in
image processing, it is by no means the only one.
The median represents the 50th percentile of a ranked set of numbers, but the reader
will recall from basic statistics that ranking lends itself to many other possibilities. For example,
using the 100th percentile results in the so-called max filter, which is useful in finding the
brightest points in an image.The response of a 3*3 max filter is given by R=max (zk|k=1, 2,p ,
9).The 0th percentile filter is the min filter, used for the opposite purpose.

7. SHARPENING SPATIAL FILTERS:


C
The principal objective of sharpening is to highlight fine detail in an image or to enhance

S SW
detail that has been blurred, either in error or as a natural effect of a particular method of image
acquisition. Image sharpening vary and include applications ranging from electronic printing
and medical imaging to industrial inspection and autonomous guidance in military systems.
Sharpening filters that are based on first- and second-order derivatives.
The derivatives of a digital function are defined in terms of differences. There are various
ways to define these differences. However, we require that any definition we use for a first
derivative (1) must be zero in flat segments (areas of constant gray-level values); (2) must be
nonzero at the onset of a gray- level step or ramp; and (3) must be nonzero along ramps.
Similarly, any definition of a second derivative (1) must be zero in flat areas; (2) must be
nonzero at the onset and end of a gray-level step or ramp; and (3) must be zero along ramps of
constant slope.
A basic definition of the first-order derivative of a one-dimensional function f(x) is the
difference

DIGITAL IMAGE PROCESSING Page 60


Similarly, we define a second-order derivative as the difference

It is easily verified that these two definitions satisfy the conditions stated previously
regarding derivatives of the first and second order.
Figure 10 Simplified profile (the points are joined by dashed lines to simplify
interpretation).

C
S SW

Figure 10 shows a simplification of the profile, with just enough numbers to make it
possible for us to analyze how the first- and second-order derivatives behave as they encounter a
noise point, a line, and then the edge of an object. In our simplified diagram the transition in the
ramp spans four pixels, the noise point is a single pixel, the line is three pixels thick, and the
transition in the gray-level step takes place between adjacent pixels. The number of gray levels
was simplified to only eight levels.
Let us consider the properties of the first and second derivatives as we traverse the profile
from left to right.
1. The first-order derivative is nonzero along the entire ramp,
2. The second-order derivative is nonzero only at the onset and end of the ramp.
We conclude that first-order derivatives produce “thick” edges and second-order
derivatives, much finer ones.
3. We encounter the isolated noise point. Here, the response at and around the point is
much stronger for the second- than for the first-order derivative.
DIGITAL IMAGE PROCESSING Page 61
4. A second-order derivative is much more aggressive than a first-order derivative in
enhancing sharp changes. Thus, we can expect a second-order derivative to enhance
fine detail (including noise) much more than a first-order derivative.
5. The thin line is a fine detail, and we see essentially the same difference between the
two derivatives. If the maximum gray level of the line had been the same as the
isolated point, the response of the second derivative would have been stronger for the
latter.
6. Finally, in this case, the response of the two derivatives is the same at the gray-level
step. We also note that the second derivative has a transition from positive back to
negative.
Comparison B/N first- and second-order derivatives response
1. First-order derivatives generally produce thicker edges in an image.
2. Second-order derivatives have a stronger response to fine detail, such as thin lines and
isolated points.
C
3. First order derivatives generally have a stronger response to a gray-level step

SW
4. Second-order derivatives produce a double response at step changes in gray level.
Use of Second Derivatives for Enhancement–The Laplacian
S
The approach basically consists of defining a discrete formulation of the second-order
derivative and then constructing a filter mask based on that formulation. We are interested in
isotropic filters, whose response is independent of the direction of the discontinuities in the
image to which the filter is applied. In other words, isotropic filters are rotation invariant, in the
sense that rotating the image and then applying the filter gives the same result as applying the
filter to the image first and then rotating the result.
It can be shown that the simplest isotropic derivative operator is the Laplacian, which,
for a function (image) f(x, y) of two variables, is defined as

Because derivatives of any order are linear operations, the Laplacian is a linear operator.
The definition of the digital second derivative given in that section is one of the most used.
Taking Into account that we now have two variables, we use the following notation for the
partial second-order derivative in the x-direction

DIGITAL IMAGE PROCESSING Page 62


C
Figure 11Filter mask used to implement the digital Laplacian, as defined in Eq. (4). (b) Mask

S
(d) Two other implementations of the Laplacian.SW
used to implement an extension of this equation that includes the diagonal neighbors. (c) and

Because the Laplacian is a derivative operator, its use highlights gray-level discontinuities
in an image and deemphasizes regions with slowly varying gray levels.This will tend to
produce images that have grayish edge lines and other discontinuities, all superimposed on a
dark, featureless background. Background features can be “recovered” while still preserving the
sharpening effect of the Laplacian operation simply by adding the original and Laplacian
images.
As noted in the previous paragraph, it is important to keep in mind which definition of the

DIGITAL IMAGE PROCESSING Page 63


Laplacian is used. If the definition used has a negative center coefficient, then we subtract,
rather than add, the Laplacian image to obtain a sharpened result. Thus, the basic way in which
we use the Laplacian for image enhancement is as follows:

8.COMBINING SPATIAL ENHANCEMENT METHODS:

Frequently, a given enhancement task will require application of several complementary


enhancement techniques in order to achieve an acceptable result. In this section we illustrate by
means of an example how to combine several of the approaches developed in this chapter to
address a difficult enhancement task.
The image sown in Fig. 3.43(a) is a nuclear whole body bone scan, used to detect diseases
such as bone infection and tumors. Our objective is to enhance this image by sharpening it and
by bringing out more of the skeletal detail. The narrow dynamic range of the gray levels and high
C
W

noise content make this image difficult to enhance. The strategy we will follow is to utilize the
SS

Laplacian to highlight fine detail, and the gradient to enhance prominent edges.
Figure 3.43(b) shows the Laplacian of the original image, obtained using the mask in Fig.
3.39(d). This image was scaled (for display only) using the same technique as in Fig. 3.40.We
can obtain a sharpened image at this point simply by adding Figs. 3.43(a) and (b), which are an
implementation of the second line in Eq. (3.7-5) (we used a mask with a positive center
coefficient). Just by looking at the noise level in (b), we would expect a rather noisy sharpened
image if we added Figs. 3.43(a) and (b), a fact that is confirmed by the result shown in Fig.
3.43(c).
One way that comes immediately to mind to reduce the noise is to use a median filter.
However, median filtering is a nonlinear process capable of removing image features. This is
unacceptable in medical image processing.
Figure 3.43(d) shows the Sobel gradient of the original image, computed using Eq. (3.7-14).

DIGITAL IMAGE PROCESSING Page 64


Components Gx and Gy were obtained using the masks in Figs. 3.44(d) and (e), respectively. As
expected from our discussion in Section
3.7.1, edges are much more dominant in this image than in the Laplacian image. The
smoothed gradient image shown in Fig. 3.43(e) was obtained by using an averaging filter of
size 5*5.The two gradient images were scaled for display in the same manner as the two
Laplacian images. Because the smallest possible value of a gradient image is 0, the background
is black in the scaled gradient images, rather than gray as in the scaled Laplacian.
The fact that Figs. 3.43(d) and (e) are much brighter than Fig. 3.43(b) is again evidence
that the gradient of an image with significant edge content has values that are higher in general
than in a Laplacian image. The product of the Laplacian and smoothed-gradient image is shown
in Fig. 3.43(f).
Note the dominance of the strong edges and the relative lack of visible noise, which is the
key objective behind masking the Laplacian with a

C
SW
S

smoothed gradient
image.Adding the product image to the original resulted in the sharpened image shown in Fig.
3.43(g).

DIGITAL IMAGE PROCESSING Page 65


C
W
SS

DIGITAL IMAGE PROCESSING Page 66


UNIT – II

QUESTION BANK

1 MARKS

1. A pixel p at coordinates (x, y) has neighbors whose coordinates are given by:
(x+1, y), (x-1, y), (x, y+1), (x, y-1)
This set of pixels is called ____________
a) 4-neighbors of p
b) Diagonal neighbors
c) 8-neighbors
d) None of the mentioned
Answer: a
Explanation: The given set of neighbor pixel are 1 unit distance to right, left, up and below
respectively from pixel p(x, y). So, are called 4-neighbors of p.

2. A pixel p at coordinates (x, y) has neighbors whose coordinates are given by:
(x+1, y+1), (x+1, y-1), (x-1, y+1), (x-1, y-1)
This set of pixels is called ____________
a) 4-neighbors of p
C
W

b) Diagonal neighbors
SS

c) 8-neighbors
d) None of the mentioned

Answer: b
Explanation: The given set of neighbor pixel are 1 unit distance to right-up diagonal, right-down
diagonal, left-up diagonal and left-down diagonal respectively from pixel p(x, y). So, are called
Diagonal neighbors of p.

3. Two pixels p and q having gray values from V, the set of gray-level values used to define
adjacency, are m-adjacent if:

DIGITAL IMAGE PROCESSING Page 67


a) q is in N4(p)
b) q is in ND(p) and the set N4(p) ∩ N4(q) has no pixels whose values are from V
c) Any of the mentioned
d) None of the mentioned
Answer: c
Explanation: Mixed adjacency is a modified form of 8-adjacency.
The above conditioned Two pixels p and q are m-adjacent if:
q is in N4(p), or
q is in ND(p) and the set N4(p) ∩ N4(q) has no pixels whose values are from V.

4. Let S, a subset of pixels in an image, is said to be a connected set if:


a) If for any pixel p in S, the set of pixels that are connected to it in Sis only one
b) If it only has one connected component
c) If S is a region
d) All of the mentioned
Answer: d

C
Explanation: For a subset of pixels in an image S
For any pixel p in S, the set of pixels is called a connected component of S if connected to p in S.

S, is a region of the image if S is a connected set. S SW


The set S is called a connected set if it only has one connected component.

5. The domain that refers to image plane itself and the domain that refers to Fourier transform of
an image is/are :
a) Spatial domain in both
b) Frequency domain in both
c) Spatial domain and Frequency domain respectively
d) Frequency domain and Spatial domain respectively
Answer: c
Explanation: Spatial domain itself refers to the image plane, and approaches in this category are
based on direct manipulation of pixels in an image.

DIGITAL IMAGE PROCESSING Page 68


Techniques based on Frequency domain processing are based on modifying the Fourier
transform of an image.

6. What is the technique for a gray-level transformation function called, if the transformation
would be to produce an image of higher contrast than the original by darkening the levels below
some gray-level m and brightening the levels above m in the original image.
a) Contouring
b) Contrast stretching
c) Mask processing
d) Point processing
Answer: b
Explanation: For a gray-level transformation function “s=T(r)”, where r and s are the gray-level
of f(x, y) (input image) and g(x, y) (output image) respectively at any point (x, y).
Then the technique, contrast stretching compresses the value of r below m by transformation
function into a narrow range of s, towards black and brightens the value of r above m.

7. For pixels p(x, y), q(s, t), and z(v, w), D is a distance function or metric if:
a) D(p, q) ≥ 0
b) D(p, q) = D(q, p)
C
SW
c) D(p, z) ≤ D(p, q) + D(q, z)
d) All of the mentioned
Answer: d S
Explanation: For pixels p(x, y), q(s, t), and z(v, w), D is a distance function or metric if:
(i) D(p, q) ≥ 0, (D(p, q) = 0 if p=q),
(ii) D(p, q) = D(q, p), and
(iii) D(p, z) ≤ D(p, q) + D(q, z).

8. Sensor strip mounted in a ring configuration is used in


a. microscopy
b. medical
c. industry

DIGITAL IMAGE PROCESSING Page 69


d. radar
Answer b

9. 1024 x 1024 image has resolution of

a. 1048576
b. 1148576
c. 1248576
d. 1348576
Answer a
10. The lens is made up of concentric layers of
a. strong cells
b. inner cells
c. fibrous cells
d. outer cells
Answer c
11. Digital images are displayed as a discrete set of
C
W

a. values
b. numbers
SS

c. frequencies
d. intensities
Answer d
12. Each element of the matrix is called
a. dots
b. coordinate
c. pixels
d. value
Answer c
13. DPI stands for
a. dots per image
b. dots per inches

DIGITAL IMAGE PROCESSING Page 70


c. dots per intensity
d. diameter per inches
Answer b
14. MRI in imaging stands for
a. magnetic resonance imaging
b. magnetic resistance imaging
c. magnetic resonance intensity
d. major resonance imaging
Answer a
15. Using gray-level transformation, the basic function linearity deals with which of the
following transformation?
a. log and inverse-log transformations
b. negative and identity transformations
C
SW
c. nth and nth root transformations
Answer b

5 MARKS
S
1. Explain the background of Image Enhancement.

2. Explain Histogram Processing.

3. Explain Smoothing Spatial Filters.

4. Explain Sharpening Spatial Filters.

10 MARKS

1. Explain some basic Gray level Transformation in Image Enhancement.

2. Explain Enhancement using Arithmetic/Logical Opearations.

3. Explain the basics of Spatial Filtering.

4. Explain the Combining Spatial Enhancement Methods.

DIGITAL IMAGE PROCESSING Page 71


UNIT - III

Image Restoration

1. A model of the Image Degradation / Restoration Process:

Image restoration is the process of recovering an image that has been degraded by some
knowledge of degradation function H and the additive noise term . Thus in restoration,
degradation is modelled and its inverse process is applied to recover the original image.

Fig: Image Restoration and Image Degradation Model C


Objective of image restoration:
S W
S
The objective of image restoration is to obtain an estimate of the original image .

Here, by some knowledge of H and , we find the appropriate restoration filters, so

that output image is as close as original image as possible since it is


practically not possible (or very difficult) to completely (or exactly) restore the original image.

Terminology:

● = degraded image

● = input or original image

● = recovered or restored image

DIGITAL IMAGE PROCESSING Page 72


● = additive noise term

In spatial domain:

where, represents convolution

In frequency domain:

After taking fourier transform of the above equation:

C
W
SS

If the restoration filter applied is , then

(for restoration)

as restoration filter is the reverse of degration function and neglecting


C
SW
the noise term. Here, is linear and position invariant.

2, Noise Models:
S

DIGITAL IMAGE PROCESSING Page 73


The principal source of noise in digital images arises during image acquisition and
transmission. The performance of imaging sensors is affected by a variety of environmental and
mechanical factors of the instrument, resulting in the addition of undesirable noise in the image.
Images are also corrupted during the transmission process due to non-ideal channel characteristics.

Generally, a mathematical model of image degradation and its restoration is used for
processing. The figure below shows the presence of a degradation function h(x,y) and an external
noise n(x,y) component coming into the original image signal f(x,y) thereby producing a final
degraded image g(x,y). This part composes the degradation model. Mathematically we can write
the following :

Where * indicates convolution in the spatial domain.


The goal of the restoration function or the restoration filter is to obtain a close replica F(x,y) of the
original image.

C
SW
S
The external noise is probabilistic in nature and there are several noise models used frequently in
the field of digital image processing. We have several probability density functions of the noise.

Noise Models
Gaussian Noise:
Because of its mathematical simplicity, the Gaussian noise model is often used in practice and

C
even in situations where they are marginally applicable at best. Here, m is the mean and σ2 is the

W
variance.

S S
Gaussian noise arises in an image due to factors such as electronic circuit noise and sensor noise
due to poor illumination or high temperature.

DIGITAL IMAGE PROCESSING Page 74


Rayleigh Noise

Here mean m and variance σ2 are the following:

C
Rayleigh noise is usually used to characterize noise phenomena in range imaging.

Erlang (or gamma) Noise


SSW
Here ! indicates factorial. The mean and variance are given below.

Gamma noise density finds application in laser imaging.

Exponential Noise

Here a > 0. The mean and variance of this noise pdf are:

C
SW
This density function is a special case of b = 1.
S
Exponential noise is also commonly present in cases of laser imaging.

Uniform Noise

DIGITAL IMAGE PROCESSING Page 75


The mean and variance are given below.

Uniform noise is not practically present but is often used in numerical simulations to analyze
systems.
Impulse Noise

If b > a, intensity b will appear as a light dot in the image. Conversely, level a will appear like a
black dot in the image. Hence, this presence of white and black dots in the image resembles to salt-
and-pepper granules, hence also called salt-and-pepper noise. When either Pa or Pb is zero, it is
called unipolar noise. The origin of impulse noise is quick transients such as faulty switching in
cameras or other such cases.

3, Restoration is the process of noise only:

When the only degradation present in an image is noise,


C

g(x,y)=f(x,y)+η(x,y) or
W

G(u,v)= F(u,v)+ N(u,v)


SS

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:

DIGITAL IMAGE PROCESSING Page 76


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

using the pixels in the region defined by Sxy.


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’n This will resulted in a smoothing effect in the image.
(b)Geometric Mean filter:
An image restored using a geometric mean filter is given by the expression

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
C
S SW
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

DIGITAL IMAGE PROCESSING Page 77


The harmonic mean filter works well for salt noise but fails for pepper noise. It does well with
Gaussian noise also.

(e) 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
C

Max and Min filter:


W

Using the l00th percentile of ranked set of numbers is called the max filter and is given by
SS

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.
4. Periodic Noise Reduction by Frequency Domain Filtering:

1. Band reject Filters:


It removes a band of frequencies about the origin of the Fourier transformer.

Ideal bandreject filter

An ideal band reject filter is given by the expression

DIGITAL IMAGE PROCESSING Page 78


D(u,v)- the distance from the origin of the centered frequency rectangle.
W is the width of the band
Do- the radial center of the frequency rectangle
Butterworth bandreject filter

Gaussian bandreject filter


These filters are mostly used when the location of noise component in the frequency
domain is known. Sinusoidal noise can be easily removed by using these kinds of filters because
it shows two impulses that are mirror images of each other about the origin. Of the frequency
transform.
Band pass Filter:
C
W

(Fig3.4.1: Perspectives plot of ideal, Butterworth , Gaussian and Notch Filter


SS

Source: D,E. Dudgeon and RM. Mersereau, ̳Multidimensional Digital Signal Processing‘,
Prentice Hall Professional Technical Reference, 1990Page- 312)
The function of a band pass filter is opposite to that of a band reject filter It allows a
specific frequency band of the image to be passed and blocks the rest of frequencies. The transfer
function of a band pass filter can be obtained from a corresponding band reject filter with transfer
function Hbr(u,v) by using the equation

An ideal band reject filter is given by the expression


DIGITAL IMAGE PROCESSING Page 79
D(u,v)- the distance from the origin of the centered frequency rectangle. W- the width of
the band Do- the radial center of the frequency rectangle.
Butterworth Band Reject Filter:

A notch filter rejects (or passes) frequencies in predefined neighborhoods about a center
frequency. Due to the symmetry of the Fourier transform notch filters must appear in symmetric
pairs about the origin. The transfer function of an ideal notch reject filter of radius D0 with centers
a (u0, v0) and by symmetry at (-u0, v0) is

C
SW
S
Ideal, Butterworth, Gaussian notch filters

5. Inverse Filtering:

DIGITAL IMAGE PROCESSING Page 80


Inverse filtering is a technique used in signal processing and image processing to recover
an original signal or image from a degraded or distorted version of it. It's based on the idea of
reversing the effects of a known filter or degradation process. Here are some details about
inverse filtering and its applications:
1. Basic Concept: Inverse filtering involves the use of a mathematical operation to reverse the
effects of a previously applied filter. It is particularly useful when you have prior knowledge of
the filter that was applied to a signal or image.
2. Applications:
a. Image Restoration: Inverse filtering is commonly used in image processing to restore images

C
that have been degraded by blurring, for example, due to a defocused camera or motion blur. By

W
applying the inverse of the blurring filter, one can attempt to recover the original sharp image.
S
S
b. Signal Deconvolution: In the realm of signal processing, inverse filtering is used to
deconvolve signals. This can help recover the original signal from a distorted or noisy version.
For example, in communication systems, it can be used to mitigate channel-induced distortion.
c. Astronomy: In astronomy, inverse filtering is used to enhance the quality of astronomical
images by compensating for atmospheric distortions, telescope imperfections, or other forms of
degradation.
d. Medical Imaging: Inverse filtering can be applied in medical imaging to improve the quality
of MRI or CT scan images by correcting for motion artifacts or other sources of degradation.
e. Audio Processing: In audio processing, inverse filtering can be used to reduce the impact of
room reverberation or to remove the effects of a known acoustic filter, improving speech or
audio quality.
f. Seismic Imaging: In the field of geophysics, inverse filtering is applied to seismic data to
correct for the effects of the subsurface, enabling a clearer interpretation of subsurface structures.
3. Challenges:

DIGITAL IMAGE PROCESSING Page 81


Inverse filtering is a powerful technique, but it comes with some challenges:
a. Ill-Posed Problem: Inverse filtering can be ill-posed, meaning it may not have a unique or
stable solution. Noise in the data or inaccuracies in the assumed filter can lead to unstable results.
b. Noise Sensitivity: Inverse filtering is sensitive to noise in the observed data. Even a small
amount of noise can lead to significant artifacts in the reconstructed signal or image.
c. A Priori Knowledge: It often requires prior knowledge of the degradation process, including
the characteristics of the filter or noise. In many real-world scenarios, this information may not
be readily available.
4. Regularization Techniques: To address the challenges of ill-posed problems and noise
sensitivity, regularization techniques, such as Tikhonov regularization or Wiener filtering, are
often used in conjunction with inverse filtering.
In summary, inverse filtering is a valuable tool for recovering signals and images that have
undergone known degradations. Its applications range from image restoration to signal
deconvolution, but it requires careful consideration of the specific problem, noise levels, and

available prior knowledge to achieve effective results .

6. Minimum Mean Square Error (MMSE):


Often filters are designed to minimize the mean squared error between a desired image

C
and the available noisy or distorted image. When the filter is linear, minimum mean squared

SW
error (MMSE) filters may be designed using closed form matrix expressions. Simplicity of

S
design is an important advantage of optimal linear filters. Suppose we are given a noisy or
distorted image x and we want to estimate the image y by applying a linear filter to x. The
estimate ˆys at lattice location s can then be written as
yˆs = zsθ
where zs = [xs, xs+r1 , . . . , xs+rp−1 ] is a row vector of pixels from a window surrounding xs,
and θ is a column vector of filter coefficients. In MMSE filtering, the goal is to find the vector θ
that will minimize the expected mean square prediction error
MSE = E[|ys − yˆs| 2 ]
θ ∗ = arg min θ E[|ys − zsθ| 2 ] .
The solution for θ that minimizes the MSE can be shown to be

DIGITAL IMAGE PROCESSING Page 82


where Rzz is a covariance matrix and ryz is a cross correlation vector

In practice, the values of Rzz and rzy may not be known, so that they must be estimated from
examples of the image pairs X and Y . The coefficients for the filter may then be estimated in a
training procedure known as least squares estimation. Least squares estimation determines that
values of the filter coefficients which actually minimize the total squared error for a specific set
of training images. To do this, let Y = [y1, y2, . . . , yN ] T be a column vector of pixels from
the desired image. For reasons that will be discussed later, this vector Y may not contain all the
pixels in y. For each ys there is an associated set of pixels zs = [xs, xs+r1 , . . . , xs+rp−1 ] in a
C
window surrounding xs. We can then express the column vector of prediction errors as

S W
S

is an N × p matrix where each row zs contains p pixels from a window surrounding the
corrupted pixel xs. The total squared error is then given by

DIGITAL IMAGE PROCESSING Page 83


In practice, (3) and (4) may be too difficult to compute when all the pixels in Y are used as
training samples. To reduce computational complexity, we can select a subset of locations in
the image, and only train on pairs (zs, ys) for those selected values of s. We can express this
idea formally by defining the function π(i) to be the locations of the M selected pixels for 0 ≤ i
≤ M − 1. The vector Y = [yπ(1), yπ(2), . . . , yπ(M) ] T is then a column vector of pixels in y at
the selected locations. The corresponding matri

is then formed by the associated windows in x centered about the locations xπ(i) . Notice that
the original images x and y are left at their original resolution, but that the pair of (zs, ys) are
sparsely sampled.
1. Down load the zip file images.zip from the lab home page. This file contains an image,
img14g.tif, a blurred version img14bl.tif, and two noisy versions, img14gn.tif and img14sp.tif.
2. Use Matlab to compute estimates of the covariance matrix Rˆ zz and the cross correlation
rˆzy for a 7×7 prediction window. Use the original img14g.tif for Y and use img14bl.tif for X.
Only sample the pairs (zs, ys) at (1/400)th of the pixel locations in the image. You can do this
by taking a sample at every 20th column and every 20th row. The Matlab reshape command
may be useful in this exercise.
C

3. Using your estimates Rˆ zz and ˆrzy, compute the corresponding filter coefficients θ ∗ .
W

4. Apply the optimal filter to the image img14bl.tif. Print or export the filtere
SS

d image for your report. 5. Repeat this procedure using img14gn.tif for X. Then repeat the
procedure using img14sp.tif for X

6. GEOMETRIC TRANSFORMATIONS:

• Geometric transforms permit the elimination of geometric distortion that occurs when an
image is captured.
DIGITAL IMAGE PROCESSING Page 84
• An example is an attempt to match remotely sensed images of the same area taken after
one year, when the more recent image was probably not taken from precisely the same
position.
• To inspect changes over the year, it is necessary first to execute a geometric transformation,
and then subtract one image from the other.

• A geometric transform is a vector function T that maps the pixel (x,y) to a new position
(x',y').

• The transformation equations are either known in advance or can be determined from
known original and transformed images.
• Several pixels in both images with known correspondence are used to derive the unknown
C

transformation.
W

• A geometric transform consists of two basic steps ...


SS

1. Determining the pixel co-ordinate transformation


➢ Mapping of the co-ordinates of the input image pixel to the point in the output
image.
➢ The output point co-ordinates should be computed as continuous values (real
numbers) as the position does not necessarily match the digital grid after the
transform.
2. Finding the point in the digital raster which matches the transformed point and
determining its brightness.
• Brightness is usually computed as an interpolation of the brightnesses of several points in
the neighborhood.
DIGITAL IMAGE PROCESSING Page 85
Pixel co-ordinate transformations:
• General case of finding the co-ordinates of a point in the output image after a geometric
transform.
o usually approximated by a polynomial equation

• This transform is linear with respect to the coefficients ark, brk


• If pairs of corresponding points (x,y), (x',y') in both images are known, it is possible to
determine ark, brk by solving a set of linear equations.
• More points than coefficients are usually used to get robustness.
• If the geometric transform does not change rapidly depending on position in the image,
low order approximating polynomials, m=2 or m=3, are used, needing at least 6 or 10 pairs
of corresponding points.
• The corresponding points should be distributed in the image in a way that can express the
geometric transformation - usually they are spread uniformly.
• The higher the degree of the approximating polynomial, the more sensitive to the
distribution of the pairs of corresponding points the geometric transform.
• C
In practice, the geometric transform is often approximated by the bilinear transformation

SW
S
➢ 4 pairs of corresponding points are sufficient to find transformation coefficients

• Even simpler is the affine transformation for which three pairs of corresponding points
are sufficient to find the coefficients

DIGITAL IMAGE PROCESSING Page 86


• The affine transformation includes typical geometric transformations such as
❖ rotation,
❖ translation,
❖ scaling
❖ Skewing.
• A geometric transform applied to the whole image may change the co-ordinate system, and
a Jacobean J provides information about how the co-ordinate system changes.

• If the transformation is singular (has no inverse) then J=0. If the area of the image is
invariant under the transformation then J=1.
• The Jacobean for the general bilinear transform (4.11)

• The Jacobean for the affine transformation (4.12)

• Important geometric transformations:


• Rotation - by the angle phi about the origin C
SSW
• Change of scale - a in the x axis and b in the y axis

DIGITAL IMAGE PROCESSING Page 87


• Skewing by the angle phi

• Complex geometric transformations (disortion)


✓ approximation by partitioning an image into smaller rectangular subimages;
✓ for each subimage, a simple geometric transformation, such as the affine, is
estimated using pairs of corresponding pixels.
✓ geometric transformation (distortion) is then performed separately in each
subimage.
• Typical geometric distortions which have to be overcome in remote sensing:
o distortion of the optical systems
o nonlinearities in row by row scanning
o nonconstant sampling period.
Brightness interpolation:
C
W
• Assume that the planar transformation has been accomplished, and new point co-ordinates
SS

(x',y') were obtained.


• The position of the point does not in general fit the discrete raster of the output image.
• Values on the integer grid are needed.
• Each pixel value in the output image raster can be obtained by brightness interpolation
of some neighboring non integer samples.
• The brightness interpolation problem is usually expressed in a dual way (by determining
the brightness of the original point in the input image that corresponds to the point in the
output image lying on the discrete raster).
• Computing the brightness value of the pixel (x',y') in the output image where x' and y' lie
on the discrete raster

DIGITAL IMAGE PROCESSING Page 88


• In general the real co-ordinates after inverse transformation (dashed lines in Figures) do
not fit the input image discrete raster (solid lines), and so brightness is not known.
• To get the brightness value of the point (x,y) the input image is resampled.

• f_{n}(x,y) ... result of interpolation


• h_{n} is the interpolation kernel
✓ Usually, a small neighborhood is used, outside which h_{n} is zero.
Nearest neighbor interpolation:
• assigns to the point (x,y) the brightness value of the nearest point g in the discrete raster

• The right side of Figure shows how the new brightness is assigned.
• C
Dashed lines show how the inverse planar transformation maps the raster of the output

S W
image into the input image - full lines show the raster of the input image.

• The position error of the nearest neighborhood interpolation is at most half a pixel.
• This error is perceptible on objects with straight line boundaries that may appear step-like
after the transformation.
Linear interpolation:
DIGITAL IMAGE PROCESSING Page 89
• Explores four points neighboring the point (x,y), and assumes that the brightness function
is linear in this neighborhood.

• Linear interpolation is given by the equation

• C
Linear interpolation can cause a small decrease in resolution and blurring due to its
averaging nature.
S W
• S
The problem of step like straight boundaries with the nearest neighborhood interpolation
is reduced.

Bicubic Interpolation:
• Improves the model of the brightness function by approximating it locally by a bicubic
polynomial surface; sixteen neighboring points are used for interpolation.
• Interpolation kernel (`Mexican hat') is given by

DIGITAL IMAGE PROCESSING Page 90


• Bicubic interpolation does not suffer from the step-like boundary problem of nearest
neighborhood interpolation, and copes with linear interpolation blurring as well.
• Bicubic interpolation is often used in raster displays that enable zooming with respect to
an arbitrary point -- if the nearest neighborhood method were used, areas of the same
brightness would increase.
• Bicubic interpolation preserves fine details in the image very well.

C
S SW

DIGITAL IMAGE PROCESSING Page 91


QUESTION BANK
UNIT - III

1 MARKS

C
SSW

DIGITAL IMAGE PROCESSING Page 92


C
SW
S

11. Image_____ is better in Sobel than in prewitt


a) sharpening
b) blurri
c) smoothing
d) contrast
Answer: c

DIGITAL IMAGE PROCESSING Page 93


12. ______will result with max response when a line passed through the middle row of the mask
with a constant background
a. Horizon mask
b. Horizontal mask
c. vertical mask
d. none of above
Answer:b

13. An ___a place where there is a rapid change in the brightness (or other property) of an image
a) point
b) edge
c) line
d) None of the above
Answer:b

14. First derivatives in image segmentation produces:


a) Thick edges
b)Thin edges
c) Fine edges
d) Rough edges
Answer: a

15. Prewitt Edge Detector


C
a) places emphasis on the pixels that are closer to the centre of the mask.
b) does not place any emphasis on the pixels at all

S SW
c) does not place any emphasis on the pixels that are closer to the centre of the mask.
d) detects vertical and horizontal edges of an image
Answer: c & d

5 MARKS
1. Explain about Restoration Process.
2. Explain about Noise Models.
3. Explain about Spatial Filtering.
4. Explain about Invariant Degradation

10 MARKS.
1. Explain about Periodic Noise reduction by Frequency Domain Filtering.
2. Explain about Minimum Mean Square Filtering.
3. Explain about Constrained Least Square Filtering.
4. Explain about Geometric Transformation.

DIGITAL IMAGE PROCESSING Page 94


UNIT – IV
Image Data Compression

• Large amounts of data are used to represent an image.


• Technology permits ever-increasing image resolution (spatially and in gray levels),
increasing numbers of spectral bands, and there is a consequent need to limit the resulting
data volume.
• Example from the remote sensing domain - Landsat D satellite broadcasts 85 x 10^6 bits
of data every second and a typical image from one pass consists of 6100 x 6100 pixels in
7 spectral bands - 260 megabytes of image data.
• Japanese Advanced Earth Observing Satellite (ADEOS) has spatial resolution of 8 meters
for the polychromatic band and 16 meters for the multispectral bands has the transmitted
data rate of 120 Mbps.
• The amount of storage media needed is enormous.
• One possible approach to decreasing the necessary amount of storage is to work with
compressed image data.
• Segmentation techniques have the side effect of image compression.
• However, image reconstruction to the original, uncompressed image is not possible.
• If compression is the main goal of the algorithm, an image is represented using a lower
number of bits per pixel, without losing the ability to reconstruct the image.
C
W

• It is necessary to find statistical properties of the image to design an appropriate


SS

compression transformation of the image; the more correlated the image data are, the more
data items can be removed.

DIGITAL IMAGE PROCESSING Page 95


• Data compression methods can be divided into two principal groups:
• Information preserving compression permit error-free data reconstruction (lossless
compression).
• Compression methods with loss of information do not preserve the information
completely (lossy compression).
• In image processing, a faithful reconstruction is often not necessary in practice and then

C
the requirements are weaker, but the image data compression must not cause significant

SW
changes in an image.

S
Data compression success is usually measured in the reconstructed image by the mean
squared error (MSE), signal to noise ratio etc. although these global error measures do not
always reflect subjective image quality.
• Image data compression design - 2 parts.
• 1) Image data properties determination
o gray level histogram
o image entropy
o various correlation functions
o etc.
• 2) Appropriate compression technique design.

DIGITAL IMAGE PROCESSING Page 96


• Data compression methods with loss of information are typical in image processing.

Image data properties

• Entropy - measure of image information content


• If an image has G gray levels, and the probability of gray level k is P(k), then entropy H_e,
not considering correlation of gray levels, is defined as

• Information redundancy r is defined as

• where b is the smallest number of bits with which the image quantization levels can be
represented.
• A good estimate of entropy is usually not available.
• C
Image data entropy can however be estimated from a gray level histogram.

SW
Let h(k) be the frequency of gray level k in an image f, 0 <= k <= 2^b -1, and let the image
size be M x N.
S
• The probability of occurrence of gray level k can be estimated as

• and the entropy can be estimated as

DIGITAL IMAGE PROCESSING Page 97


• The information redundancy estimate is r = b- H_e. The definition of
the compression ratio K is then

• These formulae give theoretical limits of possible image compression.

• Example
o the entropy of satellite remote sensing data may be between 4 and 5, considering 8
bits per pixel
o the information redundancy is between 3 and 4 bits
o these data can be represented by an average data volume of 4 to 5 bits per pixel
with no loss of information, and the compression ratio would be between 1.6 and
2.

C
Discrete image transforms in image data compression

S W


S
Basic idea: image data representation by coefficients of discrete image transforms
The transform coefficients are ordered according to their importance
o the least important (low contribution) coefficients are omitted.
• To remove correlated image data, the Karhunen-Loeve transform is the most important.
• This transform builds a set of non-correlated variables with decreasing variance.

DIGITAL IMAGE PROCESSING Page 98


• The variance of a variable is a measure of its information content; therefore, a compression
strategy is based on considering only transform variables with high variance, thus
representing an image by only the first k coefficients of the transform.
• The Karhunen-Loeve transform is computationally expensive.
• Other discrete image transforms discussed in the previous chapter are computationally less
demanding.
• Cosine, Fourier, Hadamard, Walsh, or binary transforms are all suitable for image data
compression.
• If an image is compressed using discrete transforms, it is usually divided into subimages
of 8 x 8 or 16 x 16 pixels to speed up calculations, and then each subimage is transformed
and processed separately.
• The same is true for image reconstruction, with each subimage being reconstructed and
placed into the appropriate image position.
C
W
SS

DIGITAL IMAGE PROCESSING Page 99


C
SSW

DIGITAL IMAGE PROCESSING Page 100


C
SSW
DIGITAL IMAGE PROCESSING Page 101
Predictive compression methods

• Predictive compressions use image information redundancy (correlation of data) to


construct an estimate ~f(i,j) of the gray level value of an image element (i,j) from values
of gray levels in the neighborhood of (i,j).
• In image parts where data are not correlated, the estimate ~f will not match the original
value.
• The differences between estimates and reality, which may be expected to be relatively
small in absolute terms, are coded and transmitted together with prediction model
parameters -- the whole set now represents compressed image data.
• The gray value at the location (i,j) is reconstructed from a computed estimate ~f(i,j) and
the stored difference d(i,j)

• Differential Pulse Code Modulation (DPCM)

C
SSW

• Linear predictor of the third order is sufficient for estimation in a wide variety of images.
• The estimate ~f can be computed as

DIGITAL IMAGE PROCESSING Page 102


• where a_1,a_2,a_3 are image prediction model parameters.
• These parameters are set to minimize the mean quadratic estimation error e,

• and the solution, assuming f is a stationary random process with a zero mean, using a
predictor of the third order, is

• where R(m,n) is the autocorrelation function of the random process f.

C
S SW

DIGITAL IMAGE PROCESSING Page 103


C
SSW

DIGITAL IMAGE PROCESSING Page 104


Vector quantization
o Quantization: a process of representing a large – possibly infinite – set of values
with a much smaller set.
o Vector quantization (VQ) is a lossy data compression method
o In the earlier days, the design of a vector quantizer (VQ) is considered to be a
challenging problem due to the need for multi-dimensional integration
o In 1980, Linde, Buzo, and Gray (LBG) proposed a VQ design algorithm based on
a training sequence
o The use of a training sequence bypasses the need for multi-dimensional integration
o To project a continuous input space on a discrete output space, while minimizing
the loss of information

o To define zones in the space, the set of points contained in each zone being projected on a
representative vector (centroid) C
S SW
Example: 2-dimensional spaces

DIGITAL IMAGE PROCESSING Page 105


C
S SW

o Map k-dimensional vectors in the vector space R k into a finite set of vector

DIGITAL IMAGE PROCESSING Page 106


o Image and speech signal compression

C
Hierarchical and progressive compression techniques


S SW
A substantial reduction in bit volume can be obtained by merely representing a source as a
pyramid.
• Approaches exist for which the entire pyramid requires data volume equal to that of the
full resolution image..
• Even more significant reduction can be achieved for images with large areas of the same
gray level if a quadtree coding scheme is applied.

DIGITAL IMAGE PROCESSING Page 107


• Nevertheless, there may be an even more important aspect connected with this compression
approach - the feasibility of progressive image transmission and the idea of smart
compression.
• Progressive image transmission - transmitting all image data may not be necessary under
some circumstances - e.g., searching an image database looking for a particular image.
• This approach is also commonly used to decrease the waiting time needed for the image to
start appearing after transmission and is used by World Wide Web image transmissions.
• In progressive transmission, the images are represented in a pyramid structure, the higher
pyramid levels (lower resolution) being transmitted first.
• The concept of smart compression is based on the sensing properties of human visual
sensors.
C

W
The spatial resolution of the human eye decreases significantly with increasing distance
S

from the optical axis.
S
Therefore, the human eye can only see in high resolution in a very small area close to the
point where the eye is focused.
• Similarly as with image displays, where it does not make sense to display or even transmit
an image in higher resolution than that of the display device, it is not necessary to display
an image in full resolution in image areas where the user's eyes are not focused.
• The main difficulty remains in determining the areas of interest in the image on which the
user will focus.

DIGITAL IMAGE PROCESSING Page 108


• When considering a smart progressive image transmission, the image should be
transmitted in higher resolution in areas of interest first - this improves a subjective rating
of transmission speed as sensed by a human user.
• The areas of interest may be obtained in a feedback control manner from tracking the user's
eyes (assuming the communication channel is fast enough).
• This smart image transmission and compression may be extremely useful if applied to
dynamic image generators in driving or flight simulators, or to high definition television.

Comparison of compression methods

• Transform-based methods better preserve subjective image quality, and are less sensitive
to statistical image property changes both inside a single image and between images.
• Prediction methods, on the other hand, can achieve larger compression ratios in a much
less expensive way, tend to be much faster than transform-based or vector quantization
compression schemes, and can easily be realized in hardware.
• If compressed images are transmitted, an important property is insensitivity to transmission
channel noise. Transform-based techniques are significantly less sensitive to the channel
noise - if a transform coefficient is corrupted during transmission, the resulting image
distortion is homogeneously spread through the image or image part and is not too
disturbing.
• Erroneous transmission of a difference value in prediction compressions causes not only

C
an error in a particular pixel, it influences values in the neighborhood because the predictor

SW
involved has a considerable visual effect in a reconstructed image.

S
Pyramid based techniques have a natural compression ability and show a potential for
further improvement of compression ratios. They are suitable for dynamic image
compression and for progressive and smart transmission approaches.

Coding

DIGITAL IMAGE PROCESSING Page 109


• Well known algorithms designed with serial data in mind are widely used in the
compression of ordinary computer files to reduce disk consumption.
• Very well known is Huffman encoding which can provide optimal compression and error-
free decompression.
• The main idea of Huffman coding is to represent data by codes of variable length, with
more frequent data being represented by shorter codes.
• Many modifications of the original algorithm exist, with recent adaptive Huffman coding
algorithms requiring only one pass over the data.
• More recently, the Lempel-Ziv (or Lempel-Ziv-Welch, LZW) algorithm of dictionary-
based coding has found wide favor as a standard compression algorithm.
• In this approach, data are represented by pointers referring to a dictionary of symbols.
• These, and a number of similar techniques, are in widespread use for de-facto standard
image representations which are popular for Internet and World Wide Web image
exchange.
o GIF format (Graphics Interchange Format) is probably the most popular currently
in use.
▪ GIF is a creation of Compuserve Inc., and is designed for the encoding of

C
RGB images (and the appropriate palette with pixel depths between 1 and
8 bits.
S W


S
Blocks of data are encoded using the LZW algorithm.
GIF has two versions - 87a and 89a, the latter supporting the storing of text
and graphics in the same file.
o TIFF (Tagged Image File Format) was first defined by the Aldus Corporation in
1986, and has gone through a number of versions to incorporate RGB color,
compressed color (LZW), other color formats and ultimately (in Version 6), JPEG
compression (below) -- these versions all have backward compatibility.

JPEG and MPEG image compression

• There is an increasing effort to achieve standardization in image compression.

DIGITAL IMAGE PROCESSING Page 110


• The Joint Photographic Experts Group (JPEG) has developed an international standard for
general purpose, color, still-image compression.
• MPEG standard (Motion Picture Experts Group) was developed for full-motion video
image sequences with applications to digital video distribution and high definition
television (HDTV) in mind.

JPEG - still image compression

• JPEG is widely used in many application areas.


• Four compression modes are furnished
1. Sequential DCT-based compression
2. Progressive DCT-based compression
3. Sequential lossless predictive compression
4. Hierarchical lossy or lossless compression
• While the lossy compression modes were designed to achieve compression ratios around
15 with very good or excellent image quality, the quality deteriorates for higher
compression ratios.
• A compression ratio between 2 and 3 is typically achieved in the lossless mode.
• Sequential JPEG Compression consists of a forward DCT transform, a quantizer, and
entropy encoder while decompression starts with entropy decoding followed by


dequantizing and inverse DCT.
C
W
In the compression stage, the unsigned image values from the interval [0,(2^b)-1] are first

• S S
shifted to cover the interval [-2^(b-1),2^(b-1)-1].
The image is then divided into 8x8 blocks and each block is independently transformed
into the frequency domain using the DCT-II transform.
• Many of the 64 DCT coefficients have zero or near-zero values in typical 8x8 blocks which
forms the basis for compression.

• The 64 coefficients are quantized using a quantization table Q(u,v) of integers from 0 to
255 that is specified by the application to reduce the storage/transmission requirements of
coefficients that contribute little or nothing to the image content.

DIGITAL IMAGE PROCESSING Page 111


• The following formula is used for quantization

• After quantization, the dc-coefficient F(0,0) is followed by the 63 ac-coefficients that are
ordered in a 2D matrix in a zig-zag fashion according to their increasing frequency.
• The dc-coefficients are then encoded using predictive coding, the rationale being that
average gray levels of adjacent 8x8 blocks (dc-coefficients) tend to be similar.
• The last step of the sequential JPEG compression algorithm is entropy encoding.
o Two approaches are specified by the JPEG standard.
o The baseline system uses simple Huffman coding while the extended system uses
arithmetic coding and is suitable for a wider range of applications.
• Sequential JPEG decompression uses all the steps described above in the reverse order.
After entropy decoding (Huffman or arithmetic), the symbols are converted into DCT
coefficients and dequantized

C
• S SW
where again, the Q(u,v) are quantization coefficients from the quantization table that is
transmitted together with the image data.
• Finally, the inverse DCT transform is performed and the image gray values are shifted back
to the interval [0,(2^b)-1].

DIGITAL IMAGE PROCESSING Page 112


UNIT – IV

QUESTION BANK
1 MARKS:

1. Median filters belong to which category of filter?


a. Frequency Domain Filter
b. Order Static Filter
c. Linear Spatial Filter
d. Sharpening Filter
Hide Answer Workspace

Answer: b) Order Static Filter

Explanation: The median filter belongs to the order static filter, which substitutes the pixel value
by the median of grey level that exists in the neighborhood of the pixel.

2. Which of the following is the correct representation of log transformation?


a. s=clog10(1+r)
b. s=clog10(1/r)
c. s=clog10(1-r)
d. s=clog10(1*r)
C

Hide Answer Workspace


W

Answer: b) s=clog10(1+r)
SS

Explanation: In general, log transformation can be formulized as; s=clog10(1+r), where c is


constant and r ≥ 0.

3. Which of the following the general representation of power transformation?


a. c = sry
b. s = rcy
c. s = cry
d. s = rc
Hide Answer Workspace

DIGITAL IMAGE PROCESSING Page 113


Answer: c) s = cry

Explanation: The power-law transformation can be mathematically derived as; s = cry, where c
and g represent the positive constants. However, we can write the same equation in another way,
such as s=c. (r + ε) γ, which represents an offset.

4. Which of the following requires to specify the information at the time of input?
a. Power transformation
b. Log transformation
c. Linear transformation
d. Piece-wise transformation
Hide Answer Workspace

Answer: d) Piece-wise transformation

Explanation: Piece-wise transformation plays a vital role while formulating some other
transformations. Its only disadvantage is that it requires a considerable number of inputs.

5. A second order derivative operator can be defined as __________.


a. Laplacian
b. Gaussian
c. Histogram
d. None of the above
Hide Answer Workspace

Answer: a) Laplacian
C
SW
Explanation: Laplacian is the second-order derivative operator.

a. Gaussian Transform
S
6.Which of the following is used to resolve the dark features in the image?

b. Laplacian Transform
c. Power-law Transformation
d. Histogram Specification
Hide Answer Workspace

Answer: c) Power-law Transform

DIGITAL IMAGE PROCESSING Page 114


Explanation: The dark features can be easily resolved by histogram specification. However, to
get the desired result, power-law transformation is highly suggested over histogram specification.

7.What is the smallest possible value of the gradient image?


a. 1
b. 0
c. e
d. -e
Hide Answer Workspace

Answer: b) 0

Explanation: The smallest possible value of the gradient image is 0.

8.Which of the following filter possess lower frequency?


a. High pass filter
b. Bandpass filter
c. Low pass filter
d. None of the above
Hide Answer Workspace

Answer: c) Low pass filter

Explanation: A low pass filter passes a low frequency.

9.What is the name of the process that moves a filter mask over the image, followed by calculating

C
the sum of products?
a. Correlation
b. Convolution
c. Linear spatial filtering
S SW
d. Non-linear spatial filtering
Hide Answer Workspace

Answer: a) Correlation

Explanation: Correlation can be defined as the process of moving a filter, which is often denoted
as a kernel over the image to compute the sum of products at each distinct location.

DIGITAL IMAGE PROCESSING Page 115


10.Which of the following fact is true for an image?
a. An image is the subtraction of the illumination component from the reflectance component.
b. An image is the multiplication of the illumination and reflectance component.
c. An image is the addition of illumination and reflectance component
d. An image is the subtraction of the reflectance component from the illumination component
Hide Answer Workspace

Answer: b) An image is the multiplication of illumination and reflectance component

Explanation: An image can be expressed as the multiplication of illumination and reflectance


components.

11.Which of the following operations is used in homographic filtering for converting the input
image to discrete Fourier transformed function?
a. Exponential Function
b. Logarithmic Function
c. Negative Function
d. None of the above
Hide Answer Workspace

Answer: b) Logarithmic Function


C
SW
12.What is the name of the class that accepts an image's separation of luminesce and reflectance
component?
a. Homomorphic system
S
b. Base class system
c. Base separation system
d. All of the above
Hide Answer Workspace

Answer: a) Homomorphic system

Explanation: A homomorphic system is the only class of a system that helps achieve the
separation of luminesce and reflectance components of an image.

DIGITAL IMAGE PROCESSING Page 116


13. Which of the following image component abruptly diverges at a certain junction of distinct
objects?
a. Reflectance component
b. Illumination component
c. Both (a) and (b)
d. None of the above
Hide Answer Workspace

Answer: b) Reflectance component

14.Given an intensity level [0, L-1] with "r" and "s" positive values, how will the negative of an
image obtain?
a. s=L-1-r
b. s = L - 1 + r
c. s = L + 1 - r
d. s = L + 1 + r
Hide Answer Workspace
C
SW
Answer: a) s = L - 1 - r

S
15. In general, the log transformation can be represented by _________
a. s = c.log (1 - r)
b. s = c - log (1 - r)
c. s = c.log (1 + r)
d. s = c + log (1 + r)
Hide Answer Workspace

Answer: c) s = c.log (1 + r)

DIGITAL IMAGE PROCESSING Page 117


5 MARKS:

1. Explain the image data properties in detail (April 2012).


2. Explain the predictive compression methods in detail.
3. Explain the comparison of compression methods in detail (April 2012).

10 MARKS:
1. Explain the image data compression in detail.
2. Explain the discrete image transforms in image data compression in detail (April 2012).
3. Explain the hierarchical and progressive compression techniques in detail.
4. Explain the JPEG and MPEG image compression in detail (April 2012).

C
SW
S

DIGITAL IMAGE PROCESSING Page 118


UNIT – V
SEGMENTATION:
• One of the most important steps leading to the analysis of processed image data. its main
goal is to divide an image into parts that have a strong correlation with objects or areas of
the real world contained in the image
• Complete segmentation - set of disjoint regions uniquely corresponding with objects in the
input image. Cooperation with higher processing levels which use specific knowledge of
the problem domain is necessary.
• Partial segmentation - regions do not correspond directly with image objects. Image is
divided into separate regions that are homogeneous with respect to a chosen property such
as brightness, color, reflectivity, texture, etc.
• In a complex scene, a set of possibly overlapping homogeneous regions may result. The
partially segmented image must then be subjected to further processing, and the final image
segmentation may be found with the help of higher level information.
• Simple segmentation problems:
➢ Contrasted objects on a uniform background
➢ Simple assembly tasks, blood cells, printed characters, etc.
• Totally correct and complete segmentation of complex scenes usually cannot be achieved
in this processing phase.
• A reasonable aim is to use partial segmentation as an input to higher level processing.
• Segmentation problems:
➢ image data ambiguity
➢ information noise
• Segmentation methods:
➢ global approaches, e.g. using histogram of image features
➢ edge-based segmentations
➢ region-based segmentations
• Characteristics used in edge detection or region growing
➢ brightness
➢ texture
➢ velocity field
C
• Edge-based and region-bases segmentation approaches solve a dual problem ... border x

SW
region.
• Because of the different natures of the various edge- and region-based algorithms, they

S
may be expected to give somewhat different results and consequently different
information.
• The segmentation results of these two approaches can therefore be combined in a single
description structure, e.g., a relational graph.
THRESHOLDING:
Gray level thresholding is the simplest segmentation process. Many objects or image
regions are characterized by constant reflectivity or light absorption of their surface.
Thresholding is computationally inexpensive and fast. Thresholding can easily be done in
real time using specialized hardware. Complete segmentation can result from thresholding in
simple scenes.

DIGITAL IMAGE PROCESSING Page 119


• Thresholding

1. Thresholding algorithm:
Basic thershlding

➢ Search all the pixels f(i,j) of the image f. An image element g(i,j) of the segmented
image is an object pixel if f(i,j) >= T, and is a background pixel otherwise.

• C
Correct threshold selection is crucial for successful threshold segmentation.

SW
• Threshold selection can be interactive or can be the result of some threshold detection
method.

S
Single global threshold ... successful only under very unusual circumstances
➢ Gray level variations are likely - due to non-uniform lighting, non-uniform input
device parameters or a number of other factors.

• Variable thresholding (also adaptive thresholding), in which the threshold value varies
over the image as a function of local image characteristics, can produce the solution in
these cases.
➢ image f is divided into subimages fc
➢ a threshold is determined independently in each subimage
➢ If a threshold cannot be determined in some subimage, it can be interpolated
from thresholds determined in neighboring subimages.
➢ Each subimage is then processed with respect to its local threshold.

2. Thresholding modifications:
➢ Band-thresholding:
• segment an image into regions of pixels with gray levels from a set D and into
background otherwise

• Can also serve as border detection.


➢ Multi thresholding:
• Resulting image is no longer binary.

DIGITAL IMAGE PROCESSING Page 120


➢ Semi thresholding:
Aims to mask out the image background leaving gray level information present in the
objects

• Thresholding can also be applied to


➢ gradient
➢ local texture
➢ any other image decomposition criterion
3. Threshold detection methods:
• If some property of an image after segmentation is known a priori, the task of threshold
selection is simplified, since the threshold is chosen to ensure this property is satisfied.
• A printed text sheet may be an example if we know that characters of the text cover 1/p of
the sheet area.
a. P-tile-thresholding:
➢ Choose a threshold T (based on the image histogram) such that 1/p of the
C
image area has gray values less than T and the rest has gray values larger than
W
T.
SS

➢ In text segmentation, prior information about the ratio between the sheet area
and character area can be used.
➢ If such a priori information is not available - another property, for example
the average width of lines in drawings, etc. can be used - the threshold can
be determined to provide the required line width in the segmented image.
b. More complex methods of threshold detection:
❖ Based on histogram shape analysis.
❖ Bimodal histogram - if objects have approximately the same gray level
that differs from the gray level of the background.

DIGITAL IMAGE PROCESSING Page 121


• Threshold-based segmentation ... minimum segmentation error requirements
➢ It makes intuitive sense to determine the threshold as the gray level that
has a minimum histogram value between the two mentioned maxima
➢ Multimodal histogram - more thresholds may be determined at minima
between any two maxima.
c. Bimodality of histograms:
➢ To decide if a histogram is bimodal or multimodal may not be so simple in
reality.
C
➢ It is often impossible to interpret the significance of local histogram maxima.

SW
• Bimodal histogram threshold detection algorithms

a minimum between them S


➢ Mode method - find the highest local maxima first and detect the threshold as

❖ to avoid detection of two local maxima belonging to the same global


maximum, a minimum distance in gray levels between these maxima is
usually required
❖ Techniques to smooth histograms are applied.
• Histogram bimodality itself does not guarantee correct threshold segmentation.
4. Optimal thresholding:
Based on approximation of the histogram of an image using a weighted sum of two or more
probability densities with normal distribution. The threshold is set as the closest gray level
corresponding to the minimum probability between the maxima of two or more normal
distributions, which results in minimum error segmentation

DIGITAL IMAGE PROCESSING Page 122


C
W
• Problems - estimating normal distribution parameters together with the uncertainty that the
SS
distribution may be considered normal.

5. Multi-spectral thresholding:
Multispectral or color images. One segmentation approach determines thresholds
independently in each spectral band and combines them into a single segmented image.

DIGITAL IMAGE PROCESSING Page 123


6. Hierarchical Thresholding:

EDGE-BASED SEGMENTATION:
o Edge-based segmentation represents a large group of methods based on information
about edges in the image.
o Edge-based segmentations rely on edges found in an image by edge detecting operators
-- these edges mark image locations of discontinuities in gray level, color, texture, etc.
o Image resulting from edge detection cannot be used as a segmentation result.
C

Supplementary processing steps must follow to combine edges into edge chains that
W

correspond better with borders in the image.


o The final aim is to reach at least a partial segmentation.
SS

o The most common problems of edge-based segmentation are


➢ an edge presence in locations where there is no border, and
➢ No edge presence where a real border exists.
A. EDGE IMAGE THRESHOLDING:
•Almost no zero-value pixels are present in an edge image, but small edge values
correspond to non-significant gray level changes resulting from quantization
noise, small lighting irregularities, etc.
•Selection of an appropriate global threshold is often difficult and sometimes
impossible; p-tile thresholding can be applied to define a threshold
•Alternatively, non-maximal suppression and hysteresis thresholding can be used as
was introduced in the Canny edge detector.

DIGITAL IMAGE PROCESSING Page 124


B. EDGE RELAXATION:
• Borders resulting from the previous method are strongly affected by image noise,
often with important parts missing. Considering edge properties in the context of
their mutual neighbors can increase the quality of the resulting image.
• All the image properties, including those of further edge existence, are iteratively
evaluated with more precision until the edge context is totally clear - based on the
strength of edges in a specified local neighborhood, the confidence of each edge
is either increased or decreased.
• A weak edge positioned between two strong edges provides an example of context;
it is highly probable that this inter-positioned weak edge should be a part of a
resulting boundary. If, on the other hand, an edge (even a strong one) is positioned
by itself with no supporting context, it is probably not a part of any border.

C
SW

S
Edge context is considered at both ends of an edge, giving the minimal edge
neighborhood.
• The central edge e has a vertex at each of its ends and three possible border
continuations can be found from both of these vertices.
• Vertex type -- number of edges emanating from the vertex, not counting the edge
e.
• The type of edge e can then be represented using a number pair i-j describing
edge patterns at each vertex, where i and j are the vertex types of the edge e.

DIGITAL IMAGE PROCESSING Page 125



C
SW
Edge relaxation is an iterative method, with edge confidences converging either
to zero (edge termination) or one (the edge forms a border).

S
The confidence of each edge e in the first iteration can be defined as a normalized
magnitude of the crack edge.
➢ with normalization based on either the global maximum of crack edges in
the whole image, or on a local maximum in some large neighborhood of the
edge

• The main steps of the above Algorithm are evaluation of vertex types followed by
evaluation of edge types, and the manner in which the edge confidences are
modified.
• A vertex is considered to be of type i if

DIGITAL IMAGE PROCESSING Page 126


• where a,b,c are the normalized values of the other incident crack edges
• m=max (a,b,c,q) ... the introduction of the quantity q ensures that type(0) is non-
zero for small values of a.
• For example, choosing q=0.1, a vertex (a,b,c)=(0.5, 0.05, 0.05) is a type 1 vertex,
while a vertex (0.3, 0.2, 0.2) is a type 3 vertex.
• Similar results can be obtained by simply counting the number of edges emanating
from the vertex above a threshold value.
• Edge type is found as a simple concatenation of vertex types, and edge confidences
are modified as follows:

• C
Edge relaxation, as described above, rapidly improves the initial edge labeling in

SW
the first few iterations.
• Unfortunately, it often slowly drifts giving worse results than expected after


larger numbers of iterations.
S
The reason for this strange behavior is in searching for the global maximum of
the edge consistency criterion over all the image, which may not give locally
optimal results.
• A solution is found in setting edge confidences to zero under a certain threshold,
and to one over another threshold which increases the influence of original image
data.
• Therefore, one additional step must be added to the edge confidence computation


Where T_1 and T_2 are parameters controlling the edge relaxation convergence
speed and resulting border accuracy.
• This method makes multiple labeling possible; the existence of two edges at
different directions in one pixel may occur in corners, crosses, etc.
• The relaxation method can easily be implemented in parallel.
C. BORDER TRACING:
• If a region border is not known but regions have been defined in the image, borders
can be uniquely detected.
• First, let us assume that the image with regions is either binary or that regions have
been labeled.
• An inner region border is a subset of the region

DIGITAL IMAGE PROCESSING Page 127


• An outer border is not a subset of the region.
• The following algorithm covers inner boundary tracing in both 4-connectivity and
8-connectivity.

C
W
SS

DIGITAL IMAGE PROCESSING Page 128


• The above Algorithm works fo

C
W
SS

r all regions
larger than one pixel.
• Looking for the border of a single-pixel region is a trivial problem.
• This algorithm is able to find region borders but does not find borders of region
holes.
• To search for hole borders as well, the border must be traced starting in each
region or hole border element if this element has never been a member of any
border previously traced.
• Note that if objects are of unit width, more conditions must be added.
• If the goal is to detect an outer region border, the given algorithm may still
be used based on 4-connectivity.
• Note that some border elements may be repeated in the outer border up to three
times.

DIGITAL IMAGE PROCESSING Page 129


• The inner border is always part of a region but the outer border never is.
• Therefore, if two regions are adjacent, they never have a common border,
which causes difficulties in higher processing levels with region description,
region merging, etc.
• The inter-pixel boundary extracted, for instance, from crack edges is common
to adjacent borders; nevertheless, its position cannot be specified in pixel co-
ordinates.
• Boundary properties better than those of outer borders may be found in
extended borders.
➢ Single common border between adjacent regions.
➢ May be specified using standard pixel co-ordinates.
❖ The boundary shape is exactly equal to the inter-pixel shape
but is shifted one half-pixel down and one half-pixel right.

C
W
SS

• The extended boundary is defined using 8-neighborhoods


• e.g.P_4(P) denotes the pixel immediately to the left of pixel P
• Four kinds of inner boundary pixels of a region R are defined; if Q denotes
pixels outside the region R, then
LEFT pixel if P_4(P) in Q
RIGHT pixel if P_0(P) in Q
UPPER pixel if P_2(P) in Q
LOWER pixel if P_6(P) in Q
• Let LEFT(R), RIGHT(R), UPPER(R), LOWER(R) represent the
corresponding subsets of R.
• The extended boundary EB is defined as a set of points P,P_0,P_6,P_7
satisfying the following conditions:

DIGITAL IMAGE PROCESSING Page 130


• The extended boundary can easily be constructed from the outer boundary.
• Using

C
S SW

an
intuitive definition of RIGHT, LEFT, UPPER, and LOWER outer boundary
points, the extended boundary may be obtained by shifting all the UPPER outer
boundary points one pixel down and right, shifting all the LEFT outer
boundary points one pixel to the right, and shifting all the RIGHT outer
boundary points one pixel down. The LOWER outer boundary point positions
remain unchanged.

• A more sophisticated approach is based on detecting common boundary


segments between adjacent regions and vertex points in boundary segment
connections.
• The detection process is based on a look-up table, which defines all 12 possible
situations of the local configuration of 2 x 2 pixel windows, depending on the

DIGITAL IMAGE PROCESSING Page 131


previous detected direction of boundary, and on the status of window pixels
which can be inside or outside a region.

• Note that there is no hole-border tracing included in the algorithm.


• The holes are considered separate regions and therefore the borders
between the region and its hole are traced as a border of the hole.
C
W
SS

• The look-up table approach makes the tracing more efficient than
conventional methods and makes parallel implementation possible.
• In addition to extended boundary tracing, it provides a description of each
boundary segment in chain code form together with information about
vertices.
• This method is very suitable for representing borders in higher level
segmentation approaches including methods that integrate edge-based and
region-based segmentation results.

DIGITAL IMAGE PROCESSING Page 132


• Moreover, in the conventional approaches, each border between two regions
must be traced twice. The algorithm can trace each boundary segment only
once storing the information about what has already been done in double-
linked lists.
• A more difficult situation is encountered if the borders are traced in grey
level images where regions have not yet been defined.
• The border is represented by a simple path of high-gradient pixels in the
image.
• Border tracing should be started in a pixel with a high probability of being a
border element, and then border construction is based on the idea of adding
the next elements which are in the most probable direction.
• To find the following border elements, edge gradient magnitudes and
directions are usually computed in pixels of probable border continuation.
REGION-BASED SEGMENTATION:
• Edge-based segmentation: borders between regions
• Region-based segmentation: direct construction of regions
• It is easy to construct regions from their borders and it is easy to detect borders of existing
regions. Segmentations resulting from edge-based methods and region growing methods
C
are not usually exactly the same. Combination of results may often be a good idea.
W
• Region growing techniques are generally better in noisy images where edges are extremely
difficult to detect.
SS

• Homogeneity of regions is used as the main segmentation criterion in region growing.


• The criteria for homogeneity:
➢ gray level
➢ color, texture
➢ shape
➢ model

• Regions have already been defined


• Further assumptions:

• Resulting regions of the segmented image must be both homogeneous and maximal.
A. REGION MERGING:

DIGITAL IMAGE PROCESSING Page 133


• Specific methods differ in the definition of the starting segmentation and in the criterion
for merging.
• The result of region merging usually depends on the order in which regions are merged.
• The simplest methods begin merging by starting the segmentation using regions of 2x2,
4x4 or 8x8 pixels.
• Region descriptions are then based on their statistical gray level properties.
• A region description is compared with the description of an adjacent region; if they match,
they are merged into a larger region and a new region description is computed. Otherwise
regions are marked as non-matching.
• Merging of adjacent regions continues between all neighbors, including newly formed
ones. If a region cannot be merged with any of its neighbors, it is marked `final' and the
merging process stops when all image regions are so marked.

C
• S SW
The data structure called supergrid carries all the necessary information for region
merging in 4-adjacency using crack edges.
➢ Merging heuristics:
❖ Two adjacent regions are merged if a significant part of their common boundary
consists of weak edges
❖ Two adjacent regions are also merged if a significant part of their common
boundary consists of weak edges, but in this case not considering the total length
of the region borders.
• Of the two given heuristics, the first is more general and the second cannot be used alone
because it does not consider the influence of different region sizes.
• Edge significance can be evaluated according to the formula

Where v_ij=1 indicates a significant edge, v_ij=0 a weak edge, T_1 is a preset threshold,
and s_ij is the crack edge value [s_ij = |f(x_i) - f(x_j)|].

DIGITAL IMAGE PROCESSING Page 134


C

• The supergrid data structure allows precise work with edges and borders but a big
W

disadvantage of this data structure is that it is not suitable for the representation of regions.
• A good data structure to use can be a planar region adjacency graph.
SS

B. REGION SPLITTING
• Region splitting is the opposite of region merging.
• It begins with the whole image represented as a single region which does not usually
satisfy the condition of homogeneity.
• The existing image regions are sequentially split to satisfy all the above given
conditions of homogeneity.
• Region splitting does not result in the same segmentation even if the same homogeneity
criteria are used.

DIGITAL IMAGE PROCESSING Page 135


• Region splitting methods generally use similar criteria of homogeneity as region
merging methods, and only differ in the direction of their application.
C. SPLITTING AND MERGING
• A combination of splitting and merging may result in a method with the advantages of
both approaches.
• Split-and-merge approaches work using pyramid image representations; regions are
square-shaped and correspond to elements of the appropriate pyramid level.

C

SW
If any region in any pyramid level is not homogeneous (excluding the lowest level), it

• S
is split into four subregions -- these are elements of higher resolution at the level below.
If four regions exist at any pyramid level with approximately the same value of
homogeneity measure, they are merged into a single region in an upper pyramid level.
• The segmentation process can be understood as the construction of a segmentation
quadtree where each leaf node represents a homogeneous region.
• Splitting and merging corresponds to removing or building parts of the segmentation
quadtree.
• Split-and-merge methods usually store the adjacency information in region adjacency
graphs (or similar data structures).
• Using segmentation trees, in which regions do not have to be contiguous, is both
implementationally and computationally easier.
• An unpleasant drawback of segmentation quadtrees is the square region shape
assumption
➢ merging of regions which are not part of the same branch of the segmentation
tree
• Because both split-and-merge processing options are available, the starting
segmentation does not have to satisfy any of the homogeneity conditions.

DIGITAL IMAGE PROCESSING Page 136


C
W
SS

• A pyramid data structure with overlapping regions is an interesting modification of this


method.
• Each region has four potential parent elements in the upper pyramid level and sixteen
possible child elements in the lower pyramid level.
• Segmentation tree generation begins in the lowest pyramid level. Properties of each
region are compared with properties of each of its potential parents and the
segmentation branch is linked to the most similar of them.
• After construction of the tree is complete, all the homogeneity values of all the elements
in the pyramid data structure are recomputed to be based on child-region properties
only.
• This recomputed pyramid data structure is used to generate a new segmentation tree,
beginning again at the lowest level.

DIGITAL IMAGE PROCESSING Page 137


• The pyramid updating process and new segmentation tree generation is repeated until
no significant segmentation changes can be detected between steps.
• The highest level of the segmentation tree must correspond to the expected number of
image regions and the pyramid height defines the maximum number of segmentation
branches.
• If the number of regions in an image is less than 2^n, some regions can be represented
by more than one element in the highest pyramid level.
• Considerably lower memory requirements can be found in a single-pass split-and-
merge segmentation.
• A local splitting pattern is detected in each 2x2 pixel image block and regions are
merged in overlapping blocks of the same size.

C
W
SS

DIGITAL IMAGE PROCESSING Page 138


C
W

• The image blocks overlap during the image search.


• Except for locations at the image borders, three of the four pixels have been assigned a
SS

label in previous search locations, but these labels do not necessarily match the splitting
pattern found in the processed block.
• If a mismatch is detected in step 3 of the algorithm, it is necessary to resolve
possibilities of merging regions that were considered separate so far - to assign the
same label to two regions previously labeled differently.
• Two regions R_1 and R_2 are merged into a region R_3 if

• Where m_1 and m_2 are the mean gray level values in regions R_1 and R_2, and T is
some appropriate threshold.
• If region merging is not allowed, regions keep their previous labels.
• If larger blocks are used, more complex image properties can be included in the
homogeneity criteria (even if these larger blocks are divided into 2x2 sub-blocks to
determine the splitting pattern).
DIGITAL IMAGE PROCESSING Page 139
D. WATERSHED SEGMENTATION:
• The concepts of watersheds and catchment basins are well known in topography.
• Watershed lines divide individual catchment basins.
• The North American Continental Divide is a textbook example of a watershed line with
catchment basins formed by the Atlantic and Pacific Oceans.
• Image data may be interpreted as a topographic surface where the gradient image gray-
levels represent altitudes.
• Region edges correspond to high watersheds and low-gradient region interiors
correspond to catchment basins.
• Catchment basins of the topographic surface are homogeneous in the sense that all
pixels belonging to the same catchment basin are connected with the basin's region of
minimum altitude (gray-level) by a simple path of pixels that have monotonically
decreasing altitude (gray-level) along the path.
• Such catchment basins then represent the regions of the segmented image.


• C
Concept of watersheds and catchment basins is quite straightforward.
Early watershed methods resulted in either slow or inaccurate execution.

SW
• Most of the existing algorithms start with extraction of potential watershed line pixels
using a local 3 x 3 operation, which are then connected into geomorphological networks
S
in subsequent steps. Due to the local character of the first step, these approaches are
often inaccurate.
• A watershed transformation was also introduced in the context of mathematical
morphology - computationally demanding and therefore time consuming.
• Two basic approaches to watershed image segmentation.
➢ The first one starts with finding a downstream path from each pixel of the
image to a local minimum of image surface altitude.
➢ A catchment basin is then defined as the set of pixels for which their respective
downstream paths all end up in the same altitude minimum.
➢ While the downstream paths are easy to determine for continuous altitude
surfaces by calculating the local gradients, no rules exist to define the
downstream paths uniquely for digital surfaces.
➢ The second approach is essentially dual to the first one; instead of identifying
the downstream paths, the catchment basins fill from the bottom.
➢ Imagine that there is a hole in each local minimum, and that the topographic
surface is immersed in water - water starts filling all catchment basins, minima

DIGITAL IMAGE PROCESSING Page 140


of which are under the water level. If two catchment basins would merge as a
result of further immersion, a dam is built all the way to the highest surface
altitude and the dam represents the watershed line.
➢ An efficient algorithm is based on sorting the pixels in increasing order of their
gray values, followed by a flooding step consisting of a fast breadth-first
scanning of all pixels in the order of their gray-levels.
➢ During the sorting step, a brightness histogram is computed. Simultaneously,
a list of pointers to pixels of gray-level h is created and associated with each
histogram gray-level to enable direct access to all pixels of any gray-level.
➢ Information about the image pixel sorting is used extensively in the flooding
step.
➢ Suppose the flooding has been completed up to a level (gray-level, altitude) k.
Then every pixel having gray-level less than or equal to k has already been
assigned a unique catchment basin label.
➢ Next, pixels having gray-level k+1 must be processed; all such pixels can be
found in the list that was prepared in the sorting step - consequently, all these
pixels can be accessed directly.
➢ A pixel having gray-level k+1 may belong to a catchment basin labeled l ("el")
if at least one of its neighbors already carries this label.
➢ Pixels that represent potential catchment basin members are put in a first-in
first-out queue and await further processing.
➢ Geodesic influence zones are computed for all hitherto determined catchment
basins.
➢ A geodesic influence zone of a catchment basin l_i is the locus of non-labeled
image pixels of gray-level k+1 that are contiguous with the catchment basin
l_i (contiguous within the region of pixels of gray-level k+1) for which their
distance to l_i is smaller than their distance to any other catchment basin l_j.

C
S SW
• All pixels with gray-level k+1 that belong to the influence zone of a catchment basin
labeled l are also labeled with the label l, thus causing the catchment basin to grow.
• The pixels from the queue are processed sequentially, and all pixels from the queue
that cannot be assigned an existing label represent newly discovered catchment basins
and are marked with new and unique labels.
• Example of watershed segmentation.

DIGITAL IMAGE PROCESSING Page 141


• Raw watershed segmentation produces a severely oversegmented image with hundreds
or thousands of catchment basins.
• To overcome this problem, region markers and other approaches have been suggested
to generate good segmentation.

C
S SW

• While this method would work well in the continuous space with the watershed
lines accurately dividing the adjacent catchment basins, the watersheds in images
with large plateaus may be quite thick in discrete spaces:

E. REGION GROWING POST-PROCESSING:


• Region growing often results in under growing or overgrowing as a result of non-
optimal parameter setting.
• A variety of post-processors has been developed.

DIGITAL IMAGE PROCESSING Page 142


• Some of them combine segmentation information obtained from region growing and
edge-based segmentation.
• Simpler post-processors are based on general heuristics and decrease the number of
small regions in the segmented image that cannot be merged with any adjacent region
according to the originally applied homogeneity criteria.

•This algorithm will execute much faster if all regions smaller than a preselected size
are merged with their neighbors without having to order them by size.
MATCHING:
• Matching is another basic approach to segmentation that can be used to locate known
objects in an image, to search for specific patterns, etc.
• The best match is based on some criterion of optimality which depends on object properties
and object relations.
C
S SW

• Matched patterns can be very small, or they can represent whole objects of interest.
• While matching is often based on directly comparing gray-level properties of image
subregions, it can be equally well performed using image-derived features or higher-level
image descriptors.
• In such cases, the matching may become invariant to image transforms.
• Criteria of optimality can compute anything from simple correlations up to complex
approaches of graph matching.
A. MATCHING CRITERIA:

DIGITAL IMAGE PROCESSING Page 143


• Exact copy of the pattern of interest cannot be expected in the processed image - some
part of the pattern is usually corrupted in real images by noise, geometric distortion,
occlusion, etc.
• Search for locations of maximum match is appropriate.

• Matching criteria can be defined in many ways; in particular, correlation between a


pattern and the searched image data is a general matching criterion.
• Let f be an image to process, h be a pattern to search for, and V be the set of all image
pixels in h.
• Possible matching optimality criteria describing a match between f and h located at a
position (u,v):
C
S W
S
• The "1" added to each denomiator to prevents dividing by zero for a perfect match.
• The cost is evaluated at each (u,v) pixel location in the image being processed.
• Possible implementation decissions include whether the pattern is only computed
entirely within the image or partial pattern positions when the pattern crosses image
borders.
• A simple example of the C_3 optimality criterion values is given:

• If a fast, effective Fourier transform algorithm is available, the convolution theorem


can be used to evaluate matching.

DIGITAL IMAGE PROCESSING Page 144


• The correlation between a pattern h and image f can be determined by first taking the
product of the Fourier transform F of the image f and the complex conjugate of the
Fourier transform H^# of the pattern h and then applying the inverse transform.
• To compute the product of Fourier transforms, F and H^# must be of the same size; if
a pattern size is smaller, zero-valued lines and columns can be added to inflate it to the
appropriate size.
• Sometimes, it may be better to add non-zero numbers, for example, the average gray
level of processed images can serve the purpose well.
B. CONTROL STRATEGIES OF MATCHING:
• Match-based segmentation localizes all image positions at which close copies of the
searched pattern are located.
• These copies must match the pattern in size and rotation, and the geometric distortion
must be small.
• To adapt match-based methods to detect patterns that are rotated, enlarged, and/or
reduced, it would be necessary to consider patterns of all possible sizes and rotations.
• Another option is to use just one pattern and match an image with all possible geometric
transforms of this pattern, and this may work well if some information about the
probable geometric distortion is available.
• Note that there is no difference in principle between these approaches.
• Matching can be used even if an infinite number of transformations are allowed. Let us
suppose a pattern consists of parts, these parts being connected by rubber links.
• Even if a complete match of the whole pattern within an image may be impossible,
good matches can often be found between pattern parts and image parts.
• Good matching locations may not be found in the correct relative positions, and to
achieve a better match, the rubber connections between pattern parts must be either
pushed or pulled.
• Match-based segmentation is time consuming even in the simplest cases with no
geometric transformations, but the process can be made faster if a good operation
sequence is found.
• The sequence of match tests must be data driven.
➢ Fast testing of image locations with a high probability of match may be the first

C
step, and then it is not necessary to test all possible pattern locations.

SW
➢ Another speed improvement can be realized if a mismatch can be detected
before all the corresponding pixels have been tested.

S
➢ The correlation changes slowly around the best matching location ... matching
can be tested at lower resolution first, looking for an exact match in the
neighborhood of good low-resolution matches only.
• The mismatch must be detected as soon as possible since mismatches are found much more
often than matches.
• Considering the matching formulae given above, testing in a specified position must stop
when the value in the denominator (measure of mismatch) exceeds some preset threshold.
• This implies that it is better to begin the correlation test in pixels with a high probability of
mismatch in order to get a steep growth in the mismatch criterion.
• This criterion growth will be faster than that produced by an arbitrary pixel order
computation.

DIGITAL IMAGE PROCESSING Page 145


Mean Shift
• Numerous nonparametric clustering methods can be classified into two large classes:
hierarchical clustering and density estimation. Hierarchical clustering techniques either
aggregate or divide the data based on some proximity measure. They tend to be
computationally expensive and not straightforward. Differently the density estimation is
regarded as the empirical probability density function (p.d.f) of the represented parameter.
• The mean shift can be classified into density estimation. The mean shift adequately analyse
feature space to cluster them and can provide reliable solutions for many vision tasks. Then
we describe the mean shift procedure in the following:
• The Mean Shift Procedure:
• Given n data points xi, i=1,… , n in the d-dimensional space Rd and set one bandwidth
parameter h > 0. The mean shift is
2
||𝐱−𝐱 𝑖||
∑𝑛
𝑖=1 𝐱 i 𝑘( )
h
𝐦ℎ,𝐾 (𝐱) = 2 −𝐱, (3.1)
||𝐱−𝐱 𝑖 ||
∑𝑛
𝑖=1 𝑘( )

where kernel k(p) is


1 x≤1
𝑘(p) = { (3.2)
0 x > 1,
• when mh,k(x) is smaller than a threshold, that means convergence then we can stop
calculate mean shift. But if mh,k(x) is bigger than threshold, we should set mh,k(x)’s first
term be the new mean and repeat computing mh,k(x) until convergence.
• Mean shift algorithm:
• Decide what features you want mean shift to consider and you should let every features be
a vector. Then we could construct d dimensions matrix. For example,
1 2 3 4 5 6 
3 5 4 1 7 9 
 
 4 5 1 2 6 7 
dataPts= (3.3)
• Randomly select a column to be an initial mean. For example,
4 C
SW
1 
 


 2 
(3.4) S
Construct a matrix, which is the repeat of an initial mean and use this matrix to minus
“dataPts”. Then calculate the square of every components of the new matrix and
individually sum every column to get a vector “SqDistToAll”. For example,
4 4 4 4 4 4  9 4 1 0 1 4 
    
 1 1 1 1 1 1  − dataPts  . ^ 2  4 16 9 0 36 64 
2 2 2 2 2 2   4 9 1 0 16 25
• SqDistToAll=     =

17 29 11 0 53 93
Sum every column (3.5)

DIGITAL IMAGE PROCESSING Page 146


• Find out the positions, which their value are smaller than (bandwidth)2 from
“SqDistToAll”. Store these positions in “inInds” and label these positions in
“beenVisitedFlag”.
• Recompute the new mean among the value of “inInds”.
• Repeat step3 ~ step5 until the mean is convergence. The convergence means the distance
between previous mean and present mean is smaller than the threshold that we decide.
Distance represents their mean square or the sum of their difference’s square.
• After convergence, we can cluster those labeled positions in the same cluster. But before
clustering, we have to examine whether the distance between the new found mean and
those old means is too close. If it happens, we should merge those labeled positions into
the old mean’s cluster.
• Afterward eliminate those clustered data from “dataPts” and repeat step2 ~ step7 until all
of “dataPts” are clustered. Then the mean shift’s clustering is finished.

• Simulations of K-means algorithm, Region growing algorithm, and Mean shift algorithm
in image segmentation

C
S W
S

Fig. K-means clustering/time with MATLAB code (gray level image):18


clusterings/1.36 seconds.

DIGITAL IMAGE PROCESSING Page 147


Active contour models - snakes
• The development of active contour models results from the work of Kass, Witkin, and
Terzopoulos.
• Active contour models may be used in image segmentation and understanding, and are also
suitable for analysis of dynamic image data or 3D image data.
• The active contour model, or snake, is defined as an energy minimizing spline - the snake's
energy depends on its shape and location within the image.Local minima of this energy
then correspond to desired image properties.
• Snakes may be understood as a special case of a more general technique of matching a
deformable model to an image by means of energy minimization.
• Snakes do not solve the entire problem of finding contours in images, but rather, they
depend on other mechanisms like interaction with a user, interaction with some higher level
image understanding process, or information from image data adjacent in time or space.

C
• This interaction must specify an approximate shape and starting position for the snake
somewhere near the desired contour.

SW
• A priori information is then used to push the snake toward an appropriate solution.

• The energy functional which is minimized is a weighted combination of internal and


external forces.
• The internal forces emanate from the shape of the snake, while the external forces come
from the image and/or from higher level image understanding processes.
• The snake is parametrically defined as v(s)=(x(s),y(s)) where x(s),y(s) are x,y co-ordinates
along the contour and s is from [0,1].
• The energy functional to be minimized is

• The internal spline energy can be written

DIGITAL IMAGE PROCESSING Page 148


• where alpha(s),beta(s) specify the elasticity and stiffness of the snake.
• Note that setting beta(sk)=0 at a point sk allows the snake to become second-order
discontinuous at that point, and develop a corner.
• The second term of the energy integral is derived from the image data over which the snake
lies.
• As an example, a weighted combination of three different functionals is presented which
attracts the snake to lines, edges, and terminations

C
• The line-based functional may be very simple

W


SS
where f(x,y) denotes image gray levels at image location (x,y).
The sign of wline specifies whether the snake is attracted to light or dark lines.
• The edge-based functional attracts the snake to contours with large image gradients - that
is, to locations of strong edges:

• Line terminations and corners may influence the snake using a weighted energy functional
Eterm

• The snake behavior may be controlled by adjusting the weights wline, wedge, wterm.

DIGITAL IMAGE PROCESSING Page 149


• The third term of the energy integral comes from external constraints imposed either by a
user or some other higher level process which may force the snake toward or away from
particular features.
• If the snake is near to some desirable feature, the energy minimization will pull the snake
the rest of the way.
• However, if the snake settles in a local energy minimum that a higher level process
determines as incorrect, an area of energy peak may be made at this location to force the
snake away to a different local minimum.
• A contour is defined to lie in the position in which the snake reaches a local energy
minimum.
• Originally, a resolution minimization method was proposed; partial derivatives in s and t
were estimated by the finite differences method.
• Later, a dynamic programming approach was proposed which allows `hard' constraints to
be added to the snake.
C
SW
• Further, a requirement that the internal snake energy must be a continuous function may
thus be eliminated and some snake configurations may be prohibited (that is, have infinite

• S
energy) allowing more a priori knowledge to be incorporated.
Difficulties with the numerical instability of the original method were overcome by Berger
by incorporating an idea of snake growing.
• A single primary snake may begin which later divides itself into pieces.
• The pieces of very low energy are allowed to grow in directions of their tangents while
higher energy pieces are eliminated.
• After each growing step, the energy of each snake piece is minimized (the ends are pulled
to the true contour and the snake growing process is repeated.
• Further, the snake growing method may overcome the initialization problem.
• The primary snake may fall into an unlikely local minimum but parts of the snake may still
lie on salient features.
• The very low energy parts (the probable pieces) of the primary snake are used to initialize
the snake growing in later steps.
• This iterative snake growing always converges and the numerical solution is therefore
stable - the robustness of the method is paid for by an increase in the processing cost of the
algorithm.

DIGITAL IMAGE PROCESSING Page 150


• C
A different approach to the energy integral minimization that is based on a Galerkin

SW
solution of the finite element method and has the advantage of greater numerical stability



and better efficiency.
S
This approach is especially useful in the case of closed or nearly closed contours.
An additional pressure force is added to the contour interior by considering the curve as
a balloon which is inflated.
• This allows the snake to overcome isolated energy valleys resulting from spurious edge
points giving better results.

DIGITAL IMAGE PROCESSING Page 151


C
S SW

• Deformable models based on active contours were generalized to three dimensions by


Terzopoulos and 3D balloons were introduced by Cohen.

Fuzzy Connectivity (FC)

o FC segmentation is a methodology for finding M objects in a digital image based on user-


C

specified seed points and user-specified functions, called (fuzzy) affinities, which map each
W

pair of image points to a value in the real interval [0, 1].


o FC has been used with considerable success in medical (and other) images.
SS

o Fuzzy algorithms take into consideration various uncertainties such as noise, uneven
illumination/brightness/contrast differences, etc.
o Example: If two regions have about same gray-scale and if they are relatively close to each
other in space, then they likely to belong to the same object.
o Effectiveness of the FC algorithm is dependent on the choice of the affinity function, and
the general setup can be divided into three components (for any voxels p and q): Adjacency
Homogeneity Object Feature
o All voxels are assessed via defined affinity functions for labelling.
o Affinity: local relation between every two image elements u and v
– If u and v are apart, affinity should be small (or zero)
– If u and v are close, affinity should be large

DIGITAL IMAGE PROCESSING Page 152


o Fuzzy Adjacency: A local fuzzy relation α to indicate how near two voxels a and b are

spatially.
o Its strength α (a, b):

o D1 is a distance (known) g is a function mapping between [0,1]


C
o Homogeneity and Object Feature
W
SS

o A local fuzzy relation κ to indicate how voxels a and b hang together locally
in scene
S =(C, f).
o Fuzzy Affinity (k)local hanging-togetherness between two spels (i.e., space
elements)

DIGITAL IMAGE PROCESSING Page 153


o
o Fuzzy connectedness is a global fuzzy relation Κ among voxels. Its strength Κ (c, d) for
any c, d is defined as: (1) Every path π between c and d has a strength which is the smallest
affinity along π. (2) Κ (c, d) is the strength of the strongest path.

C
S W
S

FC Algorithm
1. Define properties of fuzzy adjacency α and fuzzy affinity κ
2. Determine the affinity values for all pairs of fuzzy adjacent voxels
3. Determine the segmentation seed element c
4. Determine all possible paths between the seed c and all other voxels di in the image domain
considering the fuzzy adjacency relation
5. For each path, determine its strength using minimum affinity along the path
6. For each voxel di , determine its fuzzy connectedness to the seed point c as the maximum
strength of all possible paths < c, …, di > and form connectedness map.

DIGITAL IMAGE PROCESSING Page 154


7. Threshold connected map to obtain object containing c

SHAPE REPRESENTATION AND DESCRIPTION:


• Defining the shape of an object can prove to be very difficult. Shape is usually represented
verbally or in figures.
• There is no generally accepted methodology of shape description. Further, it is not known
what in shape is important.
• Current approaches have both positive and negative attributes; computer graphics or
mathematics use effective shape representations which are unusable in shape recognition
and vice versa.
• In spite of this, it is possible to find features common to most shape description approaches.
• Common shape description methods can be characterized from different points of view
➢ Input representation form: Object description can be based on boundaries or on
more complex knowledge of whole regions
➢ Object reconstruction ability: That is, whether an object's shape can or cannot be
reconstructed from the description.
➢ Incomplete shape recognition ability: That is, to what extent an object's shape can

C
be recognized from the description if objects are occluded and only partial shape

SW
information is available.
➢ Local/global description character: Global descriptors can only be used if complete

S
object data are available for analysis. Local descriptors describe local object
properties using partial information about the objects. Thus, local descriptors can
be used for description of occluded objects.
➢ Mathematical and heuristic techniques: A typical mathematical technique is shape
description based on the Fourier transform. A representative heuristic method may
be elongatedness.
➢ A robustness of description to translation, rotation, and scale transformations:
Shape description properties in different resolutions.
• Sensitivity to scale is even more serious if a shape description is derived, because shape
may change substantially with image resolution.

DIGITAL IMAGE PROCESSING Page 155


• Therefore, shape has been studied in multiple resolutions which again causes difficulties
with matching corresponding shape representations from different resolutions.
• Moreover, the conventional shape descriptions change discontinuously.
• A scale-space approach aims to obtain continuous shape descriptions if the resolution
changes continuously.

C
W
SS

DIGITAL IMAGE PROCESSING Page 156


• In many tasks, it is important to represent classes of shapes properly, e.g. shape classes of
apples, oranges, pears, bananas, etc.
• The shape classes should represent the generic shapes of the objects belonging to the same
classes well. Obviously, shape classes should emphasize shape differences among classes
while the influence of shape variations within classes should not be reflected in the class
C

description.
W

• Despite the fact that we are dealing with two-dimensional shape and its description, our
SS

world is three-dimensional and the same objects, if seen from different angles (or changing
position/orientation in space), may form very different 2D projections.
• The ideal case would be to have a universal shape descriptor capable of overcoming these
changes -- to design projection-invariant descriptors.
• Consider an object with planar faces and imagine how many very different 2D shapes may
result from a given face if the position and 3D orientation of this simple object changes
with respect to an observer. In some special cases, like circles which transform to ellipses,
or planar polygons, projectively invariant features (invariants} can be found.
• Object occlusion is another hard problem in shape recognition. However, the situation is
easier here (if pure occlusion is considered, not combined with orientation variations
yielding changes in 2D projections as discussed above), since visible parts of objects may
be used for description.

DIGITAL IMAGE PROCESSING Page 157


• Here, the shape descriptor choice must be based on its ability to describe local object
properties -- if the descriptor only gives a global object description, such a description is
useless if only a part of an object is visible.
A. REGION IDENTIFICATION:
• Region identification is necessary for region description. One of the many methods
for region identification is to label each region (or each boundary) with a unique
(integer) number; such identification is called labeling or coloring, also connected
component labeling. Goal of segmentation was to achieve complete segmentation,
now, the regions must be labeled.

C
W
SS

• Label collision is a very common occurrence -- examples of image shapes experiencing


this are U-shaped objects, mirrored E objects, etc.
• The equivalence table is a list of all label pairs present in an image; all equivalent labels
are replaced by a unique label in the second step.
• The algorithm is basically the same in 4-connectivity and 8-connectivity, the only
difference being in the neighborhood mask shape.

DIGITAL IMAGE PROCESSING Page 158


C
SW
C
W

S
SS

DIGITAL IMAGE PROCESSING Page 159


C
S SW

CONTOUR-BASED SHAPE REPRESENTATION AND DESCRIPTION:


• Region borders must be expressed in some mathematical form.

A. CHAIN CODES:
• Chain codes describe an object by a sequence of unit-size line segments with a given
orientation.

DIGITAL IMAGE PROCESSING Page 160


• The first element of such a sequence must bear information about its position to permit
the region to be reconstructed.

• If the chain code is used for matching it must be independent of the choice of the first
border pixel in the sequence. One possibility for normalizing the chain code is to find
the pixel in the border sequence which results in the minimum integer number if the
description chain is interpreted as a base four number -- that pixel is then used as the
starting pixel.
➢ A mod 4 or mod 8 differences are called a chain code derivative.
B. SIMPLE GEOMETRIC BORDER REPRESENTATION:
• The following descriptors are mostly based on geometric properties of described regions.
Because of the discrete character of digital images, all of them are sensitive to image
resolution.
✓ Boundary length
C
✓ Curvature
W
SS

• Bending energy

DIGITAL IMAGE PROCESSING Page 161


• Signature

C
SW
S
• Chord
• Chord is a line joining any two points of the region boundary is a chord.
• Let b(x,y)=1 represent the contour points, and b(x,y)=0 represent all other points.

• Rotation-independent radial distribution:

• The angular distribution h_a(theta) is independent of scale, while rotation causes a


proportional offset

DIGITAL IMAGE PROCESSING Page 162


REGION-BASED SHAPE REPRESENTATION AND DESCRIPTION:
• A large group of shape description techniques is represented by heuristic approaches which
yield acceptable results in description of simple shapes.
• Heuristic region descriptors:
✓ area,
✓ rectangularity,
✓ elongatedness,
✓ direction,
✓ compactness,
• These descriptors cannot be used for region reconstruction and do not work for more
complex shapes.

C
• Procedures based on region decomposition into smaller and simpler subregions must be
applied to describe more complicated regions, then subregions can be described separately

SW
using heuristic approaches.
A. SIMPLE SCALAR REGION DESCRIPTORS:
S
• Area is given by the number of pixels of which the region consists.
• The real area of each pixel may be taken into consideration to get the real size of a
region.
• If an image is represented as a rectangular raster, simple counting of region pixels will
provide its area.
• If the image is represented by a quadtree, then:

DIGITAL IMAGE PROCESSING Page 163


• The region can also be represented by n polygon vertices

the sign of the sum represents the polygon orientation.


• If the region is represented by the (anti-clockwise) Freeman chain code the following
algorithm provides the area
C
W
SS

Euler's number:

DIGITAL IMAGE PROCESSING Page 164


• (Sometimes called Genus or the Euler-Poincare characteristic) describes a simple
topologically invariant property of the object.
✓ S is the number of contiguous parts of an object and N is the number of
holes in the object (an object can consist of more than one region).

Projections:
• Horizontal and vertical region projections

Eccentricity:
• The simplest is the ratio of major and minor axes of an object.
Elongatedness:
• A ratio between the length and width of the region bounding rectangle.
C
W

• This criterion cannot succeed in curved regions, for which the evaluation of elongatedness
SS

must be based on maximum region thickness.


• Elongatedness can be evaluated as a ratio of the region area and the square of its thickness.
• The maximum region thickness (holes must be filled if present) can be determined as the
number d of erosion steps that may be applied before the region totally disappears.

Rectangularity:

DIGITAL IMAGE PROCESSING Page 165


• Let F_k be the ratio of region area and the area of a bounding rectangle, the rectangle
having the direction k. The rectangle direction is turned in discrete steps as before, and
rectangularity measured as a maximum of this ratio F_k

Direction:
• Direction is a property which makes sense in elongated regions only.
• If the region is elongated, direction is the direction of the longer side of a minimum
bounding rectangle.
• If the shape moments are known, the direction \theta can be computed as

• Elongatedness and rectangularity are independent of linear transformations -- translation,


rotation, and scaling.
• Direction is independent on all linear transformations which do not include rotation.
• Mutual direction of two rotating objects is rotation invariant.

Compactness:
• Compactness is independent of linear transformations


• C
The most compact region in a Euclidean space is a circle.
Compactness assumes values in the interval [1,infty) in digital images if the boundary is

SW
defined as an inner boundary, while using the outer boundary, compactness assumes values
in the interval [16,infty).

S
Independence from linear transformations is gained only if an outer boundary
representation is used.

Moments:
• Region moment representations interpret a normalized gray level image function as a
probability density of a 2D random variable.
• Properties of this random variable can be described using statistical characteristics -
moments.

DIGITAL IMAGE PROCESSING Page 166


• Assuming that non-zero pixel values represent regions, moments can be used for binary or
gray level region description.
• A moment of order (p+q) is dependent on scaling, translation, rotation, and even on gray
level transformations and is given by

• In digitized images we evaluate sums

• where x,y,i,j are the region point co-ordinates (pixel co-ordinates in digitized images).
• Translation invariance can be achieved if we use the central moments

• or in digitized images

• C
where x_c, y_c are the co-ordinates of the region's centroid

S SW
• In the binary case, m_00 represents the region area.
✓ Scale invariant features can also be found in scaled central moments

and normalized unscaled central moments

• Rotation invariance can be achieved if the co-ordinate system is chosen such that mu_11 =
0.
• A less general form of invariance is given by seven rotation, translation, and scale invariant
moment characteristics

DIGITAL IMAGE PROCESSING Page 167


• While the seven moment characteristics presented above were shown to be useful, they are
only invariant to translation, rotation, and scaling.
• A complete set of four affine moment invariants derived from second- and third-order
moments is


C
All moment characteristics are dependent on the linear gray level transformations of

SW
regions; to describe region shape properties, we work with binary image data (f(i,j)=1 in
region pixels) and dependence on the linear gray level transform disappears.


by its boundary. S
Moment characteristics can be used in shape description even if the region is represented

A closed boundary is characterized by an ordered sequence z(i) that represents the


Euclidean distance between the centroid and all N boundary pixels of the digitized shape.
• No extra processing is required for shapes having spiral or concave contours.
• Translation, rotation, and scale invariant one-dimensional normalized contour sequence
moments can be estimated as

DIGITAL IMAGE PROCESSING Page 168


• The r-th normalized contour sequence moment and normalized central contour sequence
moment are defined as

• Less noise-sensitive results can be obtained from the following shape descriptors

C
S SW

DIGITAL IMAGE PROCESSING Page 169


UNIT – V

QUESTION BANK
1 MARKS

1. Sobel is better than prewitt in image

a. sharpening

b. blurring

c. smoothing

d. contrast

View Answer Report Discuss Too Difficult!

Answer: (c).smoothing

2. For line detection we assume that lines are

a. thin

b. thick

c. sharp
C

d. blur
W

View Answer Report Discuss Too Difficult!


SS

Answer: (a).thin

3. Example of similarity approach in image segmentation is

a. edge based segmentation

b. boundary based segmentation

c. region based segmentation

d. Both a and b

DIGITAL IMAGE PROCESSING Page 170


View Answer Report Discuss Too Difficult!

Answer: (c).region based segmentation

4. The preferred direction of mask is weighted with the

a. low value coefficients

b. high value coefficients

c. mid value coefficients

d. double value coefficients

View Answer Report Discuss Too Difficult!

Answer: (b).high value coefficients

5. Pixels where intensity changes abruptly are called

a. area pixels

b. line pixels

c. point pixels

d. edge pixels

View Answer Report Discuss Too Difficult!


C
W

Answer: (d).edge pixels


SS

6. Points exceeding the threshold in output image are marked as

a. 0

b. 1

c. 11

d. x

View Answer Report Discuss Too Difficult!

DIGITAL IMAGE PROCESSING Page 171


Answer: (b).1

7. Example of discontinuity approach in image segmentation is

a. edge based segmentation

b. boundary based segmentation

c. region based segmentation

d. Both a and b

View Answer Report Discuss Too Difficult!

Answer: (d).Both a and b

8. Image segmentation is also based on

a. morphology

b. set theory

c. extraction

d. recognition

View Answer Report Discuss Too Difficult!


C

Answer: (a).morphology
W

9. Vertical lines are angles at


SS

a. 0

b. 30

c. 45

d. 90

View Answer Report Discuss Too Difficult!

Answer: (d).90

DIGITAL IMAGE PROCESSING Page 172


10. If R is the entire region of the image then union of all segmented parts should be equal to

a. R

b. R'

c. Ri

d. Rn

View Answer Report Discuss Too Difficult!

Answer: (a).R

11. Mask's response to zero means

a. sum to zero

b. subtraction to zero

c. division to zero

d. multiplication to zero

View Answer Report Discuss Too Difficult!

Answer: (a).sum to zero

12. For point detection we use

a. first derivative
C
SW
b. second derivative

c.

d.
third derivative

Both a and b
S
View Answer Report Discuss Too Difficult!

Answer: (b).second derivative

13. Textured inner region of the object produces

a. good boundary extraction

b. excellent boundary extraction

DIGITAL IMAGE PROCESSING Page 173


c. good boundary deletion

d. excellent boundary deletion

View Answer Report Discuss Too Difficult!

Answer: (a).good boundary extraction

14. If the standard deviation of the pixels is positive, then sub image is labeled as

a. black

b. green

c. white

d. red

View Answer Report Discuss Too Difficult!

Answer: (c).white

15. Thresholding gives the

a. large image

b. gray scale image


C
SW
c. color image

d. binary image
S
View Answer Report Discuss Too Difficult!

Answer: (d).binary image

5 MARKS:
1. Explain the segmentation in detail.
2. Explain the thresholding modifications in detail.
3. Explain the multi-spectral thresholding in detail.
4. Explain the hierarchical thresholding in detail.
5. Explain the edge relaxation in detail.
6. Explain the border tracing in detail (April 2012).
7. Explain the region merging in detail.
8. Explain the water shade segmentation in detail.
9. Explain the matching in detail (April 2012).

DIGITAL IMAGE PROCESSING Page 174


10. Explain the region identification in detail.
11. Explain the chain codes in detail.
12. Explain the simple scalar region descriptors in detail.
13. Explain the region decomposition in detail.
10 MARKS:
1. Explain the thresholding in detail.
2. Explain the threshold detection methods in detail (April 2012).
3. Explain the edge-based segmentation in detail.
4. Explain the region-based segmentation in detail.
5. Explain the splitting and merging in detail.
6. Explain the shape representation and description in detail.
7. Explain the contour-based shape representation and description in detail (April 2012).
8. Explain the region-based shape representation and description in detail.
9. Explain the graph representation based on region skeleton in detail.
10. Explain the simple geometric border representation in detail.

C
11. Explain the region neighborhood graphs in detail.
12. Explain the convex hull in detail.

SW
S

DIGITAL IMAGE PROCESSING Page 175

You might also like