Resmi N.G.
Reference: Digital Image Processing
Rafael C. Gonzalez
Richard E. Woods
Module 1 - Syllabus
Introduction to Image processing:
Fundamental steps in image processing;
Components of image processing system;
Pixels; coordinate conventions;
Imaging Geometry;
Spatial Domain;
Frequency Domain;
Sampling and quantization;
Basic relationship between pixels;
Applications of Image Processing.
CS 463 Digital Image Processing -
06/21/25 Module1 2
Introduction
An image may be defined as a two-
dimensional function, f (x, y), where x and y
are spatial (plane) coordinates, and the
amplitude of f at any pair of coordinates (x, y)
is called the intensity or gray level of the
image at that point.
When x, y, and the intensity values of f are all
finite, discrete quantities, we call the image a
digital image.
CS 463 Digital Image Processing -
06/21/25 Module1 3
The field of digital image processing refers to
processing digital images by means of a
digital computer.
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.
Pixel is the term used most widely to denote
the elements of a digital image.
CS 463 Digital Image Processing -
06/21/25 Module1 4
A digital image
CS 463 Digital Image Processing -
06/21/25 Module1 5
Digital image processing
Processing of a two dimensional image using a computer.
Digital processing of any two dimensional data for storage,
transmission and machine perception.
Image processing image analysis computer vision
CS 463 Digital Image Processing -
06/21/25 Module1 6
Three Types of Processing
Low-Level
Both inputs and outputs are images.
Involves primitive operations such as image
preprocessing to reduce noise, contrast enhancement,
and image sharpening.
Middle-Level
Inputs are images; Outputs are attributes extracted
from images (eg; edges, contours, identity of
individual objects).
Involves image segmentation (partitioning image into
regions or objects), description of those objects to
reduce them to a form suitable for computer
processing, classification or recognition
CS 463 Digital Image Processing - of individual
objects.
06/21/25 Module1 7
High-Level
Working with recognized objects as in image
analysis.
eg; automated analysis of text
I. Acquiring image of area containing the
text.
II. Preprocessing
III. Segmenting individual characters.
IV. Describing characters in a form suitable
for computer processing.
V. Recognizing the individual characters.
CS 463 Digital Image Processing -
06/21/25 Module1 8
Origin of Image Processing
One of the first applications of digital
imaging was in the newspaper industry.
Early 1920’s- Introduction of The Bartlane
Cable Picture Transmission system.
Pictures were sent by submarine cable
between London and New York.
5 distinct levels of grey.
CS 463 Digital Image Processing -
06/21/25 Module1 9
1929: Levels of grey increased to 15.
CS 463 Digital Image Processing -
06/21/25 Module1 10
1964: Pictures of moon transmitted by
Ranger7 were processed using computers to
correct various types of image distortion.
CS 463 Digital Image Processing -
06/21/25 Module1 11
Applications of DIP
Medical applications-to study X-ray images.
CS 463 Digital Image Processing -
06/21/25 Module1 12
Geographic Information Systems-to study
pollution patterns from aerial and satellite
images.
CS 463 Digital Image Processing -
06/21/25 Module1 13
Astronomy
CS 463 Digital Image Processing -
06/21/25 Module1 14
Applications classified based on
their sources of energy
Electro-magnetic spectrum (gamma rays
with highest energy to radio waves with
lowest energy)
CS 463 Digital Image Processing -
06/21/25 Module1 15
Gamma-ray Imaging
Radioactive isotope emits positrons while it
decays.
Gamma rays are given off when a positron hits
an electron.
These are detected and image is created.
CS 463 Digital Image Processing -
06/21/25 Module1 16
X-ray Imaging
X-rays are generated using an X-ray
tube(vacuum tube with a cathode and an
anode).
CS 463 Digital Image Processing -
06/21/25 Module1 17
Imaging in Ultra Violet Band
CS 463 Digital Image Processing -
06/21/25 Module1 18
Imaging in Visible and Infrared Bands
CS 463 Digital Image Processing -
06/21/25 Module1 19
Remote sensing applications
CS 463 Digital Image Processing -
06/21/25 Module1 20
CS 463 Digital Image Processing -
06/21/25 Module1 21
Other areas of application
Microwave band – Radar (explores inaccessible
region’s of earth’s surface)
Radio band – in medicine(Magnetic Resonance
Imaging) and astronomy
Acoustic Imaging (mineral and oil exploration
over land and water)
Synthetic Imaging
Archaeology
Physics
Biology
Defense
Industry
Machine perception
CS 463 Digital Image Processing -
06/21/25 Module1 22
Fundamental Steps in Digital Image
Processing
CS 463 Digital Image Processing -
06/21/25 Module1 23
Image acquisition
Involves preprocessing such as scaling
CS 463 Digital Image Processing -
06/21/25 Module1 24
Image Enhancement
Brings out details that are obscured.
Highlights certain features of interest in an
image.
CS 463 Digital Image Processing -
06/21/25 Module1 25
Image Restoration
Improves appearance of an image
Based on mathematical or probabilistic
models of image degradation.
CS 463 Digital Image Processing -
06/21/25 Module1 26
Colour Image Processing
Colour is used to extract features of interest
in an image.
CS 463 Digital Image Processing -
06/21/25 Module1 27
Wavelets and Multiresolution
Processing
Wavelets are used:
for representing images in various degrees of
resolution
for data compression
pyramidal representation
CS 463 Digital Image Processing -
06/21/25 Module1 28
Compression
Reduces the storage required to save an
image or bandwidth required to transmit it.
CS 463 Digital Image Processing -
06/21/25 Module1 29
Morphological Processing
Tools for extracting image components that
are useful in the representation and
description of shape of image. eg; boundary
extraction.
CS 463 Digital Image Processing -
06/21/25 Module1 30
Segmentation
Partitions image into its constituent parts or
objects.
CS 463 Digital Image Processing -
06/21/25 Module1 31
Feature Extraction
Feature extraction mostly follows the output of a
segmentation stage, which usually is raw pixel
data, constituting either the boundary of a region
or all the points in the region itself.
Feature extraction consists of feature detection
and feature description.
Feature detection refers to finding the features in
an image, region, or boundary.
Feature description assigns quantitative attributes
to the detected features.
CS 463 Digital Image Processing -
06/21/25 Module1 32
Feature processing methods discussed in this
chapter are subdivided into three principal
categories, depending on whether they are
applicable to boundaries, regions, or whole
images.
CS 463 Digital Image Processing -
06/21/25 Module1 33
Image pattern classification
Image pattern classification is the process
that assigns a label (e.g., “vehicle”) to an
object based on its feature descriptors.
“Classical” approaches:
minimum-distance, correlation, and Bayes
classifiers,
More modern approaches:
Deep neural networks especially deep
convolutional neural networks.
CS 463 Digital Image Processing -
06/21/25 Module1 34
Knowledge base
Knowledge about a problem domain is coded
into an image processing system in the form
of a knowledge database
CS 463 Digital Image Processing -
06/21/25 Module1 35
Components of
an Image
Processing
System CS 463 Digital Image Processing -
06/21/25 Module1 36
Image Acquisition
Two elements:
Image sensors
Digitizer
Image sensor – Physical device that is sensitive
to the energy radiated by the object we wish to
image.
Digitizer – Converts sensing device output to
digital form.
CS 463 Digital Image Processing -
06/21/25 Module1 37
Specialized Image Processing
Hardware
High speed front end subsystem.
Two elements:
Digitizer
Arithmetic and Logic Unit (ALU)
ALU performs arithmetic and logical operations
in parallel on entire images.
eg; averaging images for noise reduction.
CS 463 Digital Image Processing -
06/21/25 Module1 38
Computer
The computer in an image processing system
is a general-purpose computer and can range
from a PC to a supercomputer.
CS 463 Digital Image Processing -
06/21/25 Module1 39
Image Processing Software
Consists of specialized modules that perform
specific tasks.
User can write code utilizing these
specialized modules.
CS 463 Digital Image Processing -
06/21/25 Module1 40
Mass Storage
A must for image storage
Image of size 1024 x 1024 pixels in which
intensity of each pixel is an 8-bit quantity
requires 1 MB of storage space.
3 categories:
Short-trem (during processing – computer
memory/frame buffers)
Online storage (for frequent, fast access –
magnetic disks or optical-media storage)
Archival (infrequent access, massive storage –
magnetic tapes, optical disks)
CS 463 Digital Image Processing -
06/21/25 Module1 41
Image Displays
Color flat, screen monitors
Hardcopy devices
For recording images
laser printers, film cameras, heat-sensitive
devices, ink-jet units, and digital units, such
as optical and CD-ROM disks.
CS 463 Digital Image Processing -
06/21/25 Module1 42
Networking and cloud
communication
Because of the large amount of data inherent
in image processing applications, the key
consideration in image transmission is
bandwidth.
CS 463 Digital Image Processing -
06/21/25 Module1 43
Image Representation
Each digital image consists of a finite number
of elements called picture elements or pixels.
Pixel is the smallest element of an image.
Each pixel has a particular location and
value.
In an 8-bit gray scale image, the value of the
pixel is between 0 and 255.
CS 463 Digital Image Processing -
06/21/25 Module1 44
CS 463 Digital Image Processing -
06/21/25 Module1 45
Image sensing and acquisition
CS 463 Digital Image Processing -
06/21/25 Module1 46
Image Sensing and Acquisition
Images are generated by combination of an
illumination source and reflection or absorption
of energy from that source by objects to be
imaged.
Three principal sensor arrangements to
transform illumination energy into digital
images:
Single imaging sensor
Line sensor
Array sensor
CS 463 Digital Image Processing -
06/21/25 Module1 47
CS 463 Digital Image Processing -
06/21/25 Module1 48
A Simple Image Formation Model
Images are denoted using two-dimensional
functions of the form f(x,y).
The value of f is a positive scalar quantity.
When an image is generated from a physical
process, its values are proportional to energy
radiated by a physical source. Hence, f(x,y)
must be nonzero and finite.
0 < f(x,y) < ∞
CS 463 Digital Image Processing -
06/21/25 Module1 49
The function f(x,y) is characterized by two
components:
Illumination component : The amount of source
illumination incident on the scene being
viewed.
It is denoted by i(x,y).
Reflectance component: The amount of
illumination reflected by the objects in the
scene.
It is denoted by r(x,y).
f(x,y) is expressed as a product of these two
components.
f(x,y) = i(x,y)r(x,y)
CS 463 Digital Image Processing -
06/21/25 Module1 50
where 0 < i(x,y) < ∞
and 0 < r(x,y) < 1
(total absorption) (total reflectance)
The nature of i(x,y) is determined by the
illumination source.
The nature of r(x,y) is determined by the
characteristics of the imaged objects.
For images formed by transmission of the
illumination through a medium (as in X-ray
imaging), reflectivity is replaced by
transmissivity.
CS 463 Digital Image Processing -
06/21/25 Module1 51
Definition for a Digital Image
Any two dimensional function that bears
information is considered an image.
An image is defined as a two-dimensional
function f(x,y), where x and y are spatial
coordinates.
Amplitude of ‘f’ at any pair of coordinates
(x,y) is called intensity of image at that point.
When x, y and amplitude values of ‘f’ are all
finite, discrete quantities, the image is called
a digital image.
CS 463 Digital Image Processing -
06/21/25 Module1 52
Image Sampling and Quantization
The output of most sensors is a continuous
voltage waveform whose amplitude and
spatial behaviour are related to the physical
phenomenon being sensed.
This continuous sensed data has to be
converted to digital form.
This involves two processes:
Sampling
Quantization
CS 463 Digital Image Processing -
06/21/25 Module1 53
Basic Concepts
An image may be continuous with respect to the
x- and y-coordinates and also in amplitude.
To convert it to digital form, the function must be
sampled in both coordinates and in amplitude.
Digitizing the coordinate values is called
sampling.
Digitizing the amplitude values is called
quantization.
CS 463 Digital Image Processing -
06/21/25 Module1 54
Generating Digital Image
CS 463 Digital Image Processing -
06/21/25 Module1 55
To sample the plot of amplitude values of the
continuous image along AB, take equally spaced
samples along AB. This set of discrete locations
give the sampled function.
The sample values still span a continuous range
of gray-level values. These values also must be
converted to discrete quantities(quantization) to
obtain a digital image.
The gray level scale can be divided into a
number of discrete levels ranging from black to
white.
CS 463 Digital Image Processing -
06/21/25 Module1 56
In the figure, one of the eight discrete gray
levels is assigned to each sample.
Starting at the top of the image and carrying
out this procedure line by line for the entire
image will produce a two-dimensional digital
image.
CS 463 Digital Image Processing -
06/21/25 Module1 57
The complete MxN image can be represented
using matrix form.
Each element of the matrix array is called an
image element, picture element or pixel.
f (0,0) f (0,1) ... f (0, M 1)
f (1,0) ... ... f (1, M 1)
f ( x , y )
... ... ... ...
f ( N 1,0) f ( N 1,1) ... f ( N 1, M 1)
CS 463 Digital Image Processing -
06/21/25 Module1 58
IMAGE INTERPOLATION
Interpolation is the process of using known
data to estimate values at unknown locations.
Interpolation is used in tasks such as
zooming, shrinking, rotating, and
geometrically correcting digital images.
CS 463 Digital Image Processing -
06/21/25 Module1 59
Nearest neighbor interpolation
It assigns to each new location the intensity
of its nearest neighbor in the original image.
CS 463 Digital Image Processing -
06/21/25 Module1 60
Bilinear interpolation
Four nearest neighbors are used to estimate
the intensity at a given location.
Let (x, y) denote the coordinates of the
location to which an intensity value v(x, y)
need to be assigned.
For bilinear interpolation, the assigned value
is obtained using the equation
v(x, y) = ax + by + cxy + d
where the four coefficients are determined
from the four equations in four unknowns that
can be written using the four nearest
neighbors of
06/21/25
point (x, y).
CS 463 Digital Image Processing -
Module1 61
Bicubic interpolation
Involves the sixteen nearest neighbors of a
point.
The intensity value assigned to point (x, y) is
obtained
using the equation
CS 463 Digital Image Processing -
06/21/25 Module1 62
Basic Relationships Between Pixels
Neighbours of a pixel
4-neighbours
(i-1,j-1) (i-1,j) (i-1,j+1)
diagonal-neighbours
8-neighbours
Adjacency (i,j-1) (i,j) (i,j+1)
4-adjacency
8-adjacency (i+1,j-1) (i+1,j) (i+1,j+1)
m-adjacency
CS 463 Digital Image Processing -
06/21/25 Module1 63
Neighbours of a pixel
A pixel p at (x,y) has 4 horizontal and vertical
neighbours whose coordinates are given by:
(x+1,y) , (x-1,y), (x, y+1) and (x,y-1)
This set of pixels called the 4-neighbours of p
is denoted by N4(p).
Each pixel is of unit distance from p and may
lie outside the digital image for a pixel on the
border of the image.
CS 463 Digital Image Processing -
06/21/25 Module1 64
The 4 diagonal neighbours are given by:
(x+1, y+1), (x+1, y-1), (x-1, y+1) and (x-
1, y-1)
This set of pixels is denoted by ND(p). These
points together with the 4-neighbours are called
the 8-neighbours of p, denoted by N8(p).
CS 463 Digital Image Processing -
06/21/25 Module1 65
Adjacency, Connectivity, Regions and
Boundaries
Connectivity – Two pixels are connected if
they are neighbours and if their gray levels
satisfy a specified criterion of similarity (eg; if
their gray levels are equal).
Adjacency – Let V be the set of gray-level
values used to define adjacency.
In binary image, V={1}, for adjacency of pixels
with value 1.
a) 4-adjacency: Two pixels p and q with values
from V are 4-adjacent if q is in the set N4(p).
CS 463 Digital Image Processing -
06/21/25 Module1 66
b) 8-adjacency: Two pixels p and q with values
from V are 8-adjacent if q is in the set N 8(p).
c) m-adjacency : Two pixels p and q with values
from V 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.
CS 463 Digital Image Processing -
06/21/25 Module1 67
Two image subsets S1 and S2 are adjacent if
some pixel in S1 is adjacent to some pixel in S2.
A digital path or curve from pixel p with
coordinates (x,y) to pixel q with coordinates
(s,t) is a sequence of distinct pixels with
coordinates (x0,y0), (x1,y1), …, (xn,yn) where
(x0,y0) = (x,y), (xn,yn) = (s,t) and pixels (xi,yi) and
(xi-1,yi-1) are adjacent for 1 ≤ i ≤ n. n is the
length of the path.
If (x0,y0) = (xn,yn) ,the path is a closed path.
CS 463 Digital Image Processing -
06/21/25 Module1 68
We call the paths 4-, 8-, or m-paths
depending on the type of adjacency.
CS 463 Digital Image Processing -
06/21/25 Module1 69
Let S be a subset of pixels in an image.
Connectivity: Two pixels p and q are said to be
connected in S if there exists a path between
them consisting entirely of pixels in S.
Connected Component: For any pixel p in S,
the set of pixels that are connected to it in S is
called a connected component of S.
Connected Set: If the set S has only one
connected component, then it is called a
connected set.
CS 463 Digital Image Processing -
06/21/25 Module1 70
Region: Let R be a subset of pixels in an
image. If R is a connected set, it is called a
region of the image.
Boundary: Boundary of a region R is the
set of pixels in the region that have one or
more neighbours that are not in R. It forms
a closed path and is a global concept.
Edge: Edges are formed from pixels with
derivative values that exceed a threshold. It is
based on measure of gray-level discontinuity
at a point and is a local concept.
CS 463 Digital Image Processing -
06/21/25 Module1 71
CS 463 Digital Image Processing -
06/21/25 Module1 72
Distance Measures
For pixels p, q and z with coordinates (x,y),
(s,t) and (v,w) respectively D is a distance
function if :
a) D(p,q) ≥ 0, (D(p,q) = 0 iff p = q)
b) D(p,q) = D(q,p)
c) D(p,z) ≤ D(p,q) + D(q,z)
CS 463 Digital Image Processing -
06/21/25 Module1 73
The Euclidean distance between p and q is defined
as
De(p,q) = [(x-s)2 + (y-t)2]1/2
D4 distance (or city-block distance) between p and
q is defined as
D4(p,q) = |x-s|+|y-t|
Pixels with D4 = 1 are 4-neighbours of (x,y).
D8 distance (or chessboard distance) between p
and q is defined as
D8(p,q) = max(|x-s|,|y-t|)
Pixels with D8 = 1 are 8-neighbours of (x,y).
CS 463 Digital Image Processing -
06/21/25 Module1 74
D4 and D8 distances between p and q are
independent of any paths that might exist
between the points because the distances
involve only the coordinates of the points.
CS 463 Digital Image Processing -
06/21/25 Module1 75
Euclidean distance D4 distance D8 distance
(2-norm) (city-block distance) (chessboard distance)
2 2 5 2 52 2 4 3 2 3 4 2 2 2 2 2
5 2 1 2 5 3 2 1 2 3 2 1 1 1 2
2 1 0 1 2 2 1 0 1 2 2 1 0 1 2
5 2 1 2 5 3 2 1 2 3 2 1 1 1 2
2 2 5 2 52 2 4 3 2 3 4 2 2 2 2 2
CS 463 Digital Image Processing -
06/21/25 Module1 76
Dm distance between p and q is defined as
the shortest m-path between the two points.
a) V= {1}
Dm = 2
pp2p4
CS 463 Digital Image Processing -
06/21/25 Module1 77
b) V= {1}
Dm = 3
pp1p2p4
CS 463 Digital Image Processing -
06/21/25 Module1 78
c) V= {1}
Dm = 3
pp2p3p4
CS 463 Digital Image Processing -
06/21/25 Module1 79
d) V= {1}
Dm = 4
pp1p2p3p4
CS 463 Digital Image Processing -
06/21/25 Module1 80
Topics for self study
Moire patterns and aliasing
Imaging geometry (Elements of visual
perception – structure of human eye, image
formation in the eye, brightness adaptation
and discrimination)
Basic transformations – translation, scaling,
rotation
CS 463 Digital Image Processing -
06/21/25 Module1 81
Aliasing
CS 463 Digital Image Processing -
06/21/25 Module1 82
CS 463 Digital Image Processing -
06/21/25 Module1 83
Moire Patterns
CS 463 Digital Image Processing -
06/21/25 Module1 84
Structure of human eye
CS 463 Digital Image Processing -
06/21/25 Module1 85
CS 463 Digital Image Processing -
06/21/25 Module1 86
CS 463 Digital Image Processing -
06/21/25 Module1 87
CS 463 Digital Image Processing -
06/21/25 Module1 88
Thank You
CS 463 Digital Image Processing -
06/21/25 Module1 89