Dip 1
Dip 1
T.Y.B.Tech
Semester-6
A.Y. 2023-24
PBL 10
Total 30
End Term Exam 40
Total 100
Unit 1
Fundamentals of Image Processing
Unit Topic
Topic Description
Name Name
Steps in Image processing, Human visual system, Image Sensing
And Acquisition, Pixels
Light, Brightness adaption and discrimination Sampling &
quantization
Fundame
ntals of Representing digital images, spatial and grey level resolution,
Image
UNIT-I Processi Image file formats, Basic relationships between pixels
ng
Distance Measures, Performance Measures for Image Quality.
Geometric Transformation
Distance Measures, Performance Measures for Image Quality
Examples / Revision
Teaching Scheme: Lecture : 04 hrs/week
Course Objectives:
Reference Books:
1. Rafael C. Gonzalez and Richard E. Woods, “Digital Image
Processing”, Fourth Edition, -Pearson Education.
2. S Sridhar, “Digital Image Processing”, Oxford University
Press.
3. Pratt William K. "Digital Image Processing", John Wiley
& sons, Fourth Edition,Wiley
Syllabus Mapping with Book
T1:Rafael C. Gonzalez and Richard E. Woods, “Digital Image Processing”, Third
Edition, - Pearson Education
Additional:S Sridhar, “Digital Image Processing”, Oxford University Press
3 Sampling & quantization, Representing digital images, T1- Chapter No. 2(52-65
spatial and gray level resolution(1 hr)
5 Basic relationships between pixels, Distance Measures(1 hr) T1- Chapter No. 2(68-72)
6 Basic operations on images image addition, subtraction, T1- Chapter No. 2(72-95)
logical operations, scaling translation, rotation.(1 hr)
7 Color fundamentals and models RGB, HIS, YIQ(1/2 hr) T1- Chapter No. 6(394-413)
8
Introduction and Digital Image Fundamentals
-New reproduction
processes based
on photographic
techniques.
-Increased number
of tones in reproduced Early 15 tone digital image
images
History of DIP
1960s: Improvements in
computing technology and the
onset of the space race led to a
surge of work in digital image
processing
1964: Computers used to
improve the quality of images of A picture of the moon
taken by the Ranger 7
the moon taken by the Ranger 7 probe minutes before
probe ,Such techniques were used landing
Take slice from MRI scan of canine heart, and find boundaries between
types of tissue
Image with gray levels representing tissue
density
Use a suitable filter to highlight edges
2. The iris diaphragm controls amount of light that enters the eye.
3. Light receptors in the retina
- About 6-7 millions cones for bright light vision called
photopic
- Density of cones is about 150,000 elements/mm2.
- Cones involve in color vision.
- Cones are concentrated in fovea about 1.5x1.5 mm2.
- About 75-150 millions rods for dim light vision called scotopic
- Rods are sensitive to low level of light and are not involved
color vision.
4. Blind spot is the region of emergence of the optic nerve from the
eye.
Distribution of Rods and Cones in the Retina
Position
Mach Band Effect
Intensities of
surrounding points
effect perceived
brightness at each
point.
B A
Intensit
y
Position
In area A, brightness perceived is darker while in area B is
brighter. This phenomenon is called Mach Band Effect.
Image Formation
A digital image is a representation of a
two-dimensional image as a finite set of digital values,
called picture elements or pixels
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Object
Problem Domain
Recognition
Color Image Image
Processing Compression
Key Stages in Digital Image Processing:
Image Acquisition
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Representati
Image
on &
Acquisition
Description
Object
Problem Domain
Recognition
Color Image Image
Processing Compression
Image Acquisition
Key Stages in Digital Image Processing:
Image Enhancement
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Representatio
Image
n&
Acquisition
Description
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Representatio
Image
n&
Acquisition
Description
Object
Problem Domain
Recognition
Color Image Image
Processing Compression
Image Restoration
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representatio
Problem Domain n&
Description
Color Image Image
Processing Compression
Morphological Processing
Key Stages in Digital Image Processing:
Segmentation
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Representatio
Image
n&
Acquisition
Description
Object
Problem Domain
Recognition
Color Image Image
Processing Compression
Segmentation
Key Stages in Digital Image Processing:
Representation & Description
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain
Recognition
Color Image Image
Processing Compression
Representation & Description
Key Stages in Digital Image Processing:
Object Recognition
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Representation
Image
&
Acquisition Description
Object
Problem Domain
Recognition
Color Image Image
Processing Compression
Object Recognition
Key Stages in Digital Image Processing:
Image Compression
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Representation
Image
&
Acquisition Description
Object
Problem Domain
Recognition
Color Image Image
Processing Compression
Image Compression
Key Stages in Digital Image Processing:
Colour Image Processing
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Representation
Image
&
Acquisition Description
Object
Problem Domain
Recognition
Color Image Image
Processing Compression
Colour Image Processing
Fundamentals of Digital Images
Fundamentals of Digital Images
Image Coordinate system
Fundamentals of Digital Images
x
Origin
y
Image “After snow storm”
f(x,y)
⬥ An image: a multidimensional function of spatial coordinates.
⬥ Spatial coordinate: (x, y) for 2D case such as photograph,
(x, y, t) for movies
⬥ The function f may represent intensity (for monochrome images)
or color (for color images) or other associated values.
What is a Digital Image? (cont…)
Pixel values typically represent gray levels,
colors, distance from camera, etc.
Remember digitization implies that a digital
image is an approximation of a real scene
1 pixel
Digital Image Representation
Representation of Digital Image
0 1 2 3 4 5 6 7
0 6 6 7 0 1
7 6 5 0 1 5
7 4 1 1 5 1
6 6 5 1 0 7
4 1 1 2 2 5
Binary Image
1 1 1 1 1 1
1 0 0 0 0 1
1 1 0 0 1 1
1 1 0 0 1 1
0 1 1 1 1 0
Image Types : Binary Image
Binary data
Digital Image Types : Intensity Image
RGB components
Gray Level and Color Images
1. Binary Image 2.Gray Scale Image 3. Color Image
Sampled image
1m
m
2m
m
No detail is lost!
Minimum Nyquist Rate:
Spatial
Period Spatial resolution must be less or
resolution
(sampling rate) equal
half of the minimum period of the
= Sampling locations
image
or sampling frequency must be greater
Effect of Spatial Resolution
128 x 128 32 x 32
64 x 64
Image Quantization
Image quantization:
discretize continuous pixel values into
discrete numbers
Nc-1
Nc-2
Quantization level
1
0
Light intensity
Darkest Brightest
Intensity Level Resolution
Intensity level resolution refers to the number of intensity
levels used to represent the image
The more intensity levels used, the finer the level of
detail discernable in an image
Intensity level resolution is usually given in terms of
the number of bits used to store each intensity level
Number of Bits Number of Intensity Examples
Levels(Gray
Shades)
1 2 0, 1
2 4 00,01,10,11
4 16 0000,0101,…,1111
8 256 00110011,…, 01010101
16 65,536 1010101010101010
Effect of Quantization Levels
64 levels 32 levels
Effect of Quantization Levels (cont.)
16 levels 8 levels
In this image,
it is easy to see
false contour.
4 levels 2 levels
Zooming and shrinking
Resolution :How much is enough
Common image file formats
Neighborhood relation is
used to tell adjacent pixels. It is
(x,y-1) useful for analyzing regions.
• D(p, q) = D(q, p)
D(p, z) ≤Euclidean
• Example: D(p, q) +distance
D(q, z)
Distance (cont.)
2. D4-distance (city-block distance)
D4-distance (city-block distance) is defined as
2 1 2
2 1 0 1 2
2 1 2
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
1 q
2 p
3
3 types of adjacency
❑ 4- adjacency: 2 pixels p and q with values from V are 4- adjacent if q is in
the set N4(p)
❑ 8- adjacency: 2 pixels p and q with values from V are 8- adjacent if q is in
the set N8(p)
❑ m- adjacency: 2 pixels p and q with values from V are m adjacent if
1. q is in N4(p), or
2. q is in ND(p) and the set N4(p) ∩ N4(q) has no pixels whose
values are from V
Connectivity
For p and q from the same class
• 4-connectivity: p and q are 4-connected p, q ∈ V & q ∈N4(p)
N4(p) ∩ N4(q)
this indicates the set of points which are 4 neighbors
of both the points p and q
8-path m-path
p p p
q q q
m-path from p to q
8-path from p to q
solves this ambiguity
results in some ambiguity
Find the shortest 4,8, and m-path between p & q
q
i)v={0,1} 3 1 2 1
ii) v={1,2} Given Image 2 2 0 2
1 2 1 1
1 0 1 1
p
i) v={0,1}
4 Path 8-Path M-Path
3 1 2 1 3 1 2 1 3 1 2 1
2 2 0 2 2 2 0 2 2 2 0 2
1 2 1 1 1 2 1 1 1 2 1 1
1 0 1 1 1 0 1 1 1 0 1 1
i) v={0,1}
4-Path 8-Path
3 1 2 1 3 1 2 1
2 2 0 2 2 2 0 2
1 2 1 1 1 2 1 1
1 0 1 1 1 0 1 1
i) v={0,1}
q
m-Path 3 1 2 1
2 2 0 2
1 2 1 1
p1 0 1 1
ii) v={1,2}
4-Path 8-Path
3 4 1
5
2
6
1 3 1 2 1
22 3
2 0 2 2 2 0 2
1 2 1 1 1 2 1 1
1
1 0 1 1 1 0 1 1
Path Length=4
Path Length=6
ii) v={1,2} 3 1 2 1
m-Path 2 2 0 2
6
3 4 1
5
2 1 1 2 1 1
22 3
2 0 2 1 0 1 1
1 2 1 1
1
1 0 1 1
Ex: Given binary image segment
Answer- 4-Path
0 1 1 1 1
Path Length=7
0 0 1 0 1
0 0 1 0 1
0 1 0 0 1
1 1 1 1 1
Answer- 8-Path
0 1 1 1 1
Path1: = Length=7
Path 2: = Length= 6 Redundant
0 0 1 0 1 Path
Path3: = Length=6
0 0 1 0 1
Path4: = Length=5
0 1 0 0 1
1 1 1 1 1
Shortest Path Length 4: = Length=5
Answer- m-Path
0 1 1 1 1 Path1: = Length=7
0 0 1 0 1 Path 2: = Length=6
1 1 1 1 1
For V={2},determine whether S1 and S2 are
a)4-Connected b)8-Connected c) M-Connected
S1 S2
0 0 0 0 0 0 0 2
0 0 2 0 0 2 0 0
0 0 2 0 2q 2 0 0
0 2 2 2p 0 0 0 0
Answer
a) S1 and S2 are not 4-connected because q is not in the
set of N4(p)
b) S1 and S2 are 8-connected because q is in the set of
N8(p)
c) S1 and S2 are m-connected because
i)q is in the set of ND (p) and
ii) the set N4(p) ∩ N4(q) is empty
Basic operations on images
There are two different types of operations that are widely
used in image processing especially in image morphology.
1.Arithmetic Operations
2.Logical
3.Geometric
Basic operations on images detecting
decrease
to the
mask thethe
Brightening missing
anbrightness
image for
components
obtaining
of region of
the image
image
interest
Addition
Subtraction
Multiplication
Division Detect
Negative
change
To isolateof image
the in
images
interested region from
Arithmetic rest of the image
AND
OR
NOT
XOR
translation
Rotation
Logical
scaling
Geometric
Arithmetic Operations
Arithmetic operations between two pixels a and b
are denoted as follows:
i) Addition: a + b
Image addition is used in image averaging to
reduce noise. This kind of operation was
performed in image enhancement.
ii) Subtracting: a - b
Image subtraction is widely used in medical
imaging.
A very common example is the Digital Subtraction
Angiography (DSA).
Image Subtraction is basically used to get rid of
background information.
Output Image
Image1 Image 2
3 1 2 1 3 1 2 1 6 2 4 2
2 2 0 2 + 2 2 0 2 = 4 4 0 4
1 2 1 1 1 2 1 1 2 4 2 2
1 0 1 1 1 0 1 1 2 0 2 2
3 1 2 1 4 1 0 5 0 0 2 0
2 2 0 2 - 6 6 5 3 = 0 0 0 0
4 2 1 2 3 3 2 1 1 0 0 1
3 0 1 1 2 0 5 1 1 0 0 0
250 240 225 50 20 20 300 260 245 255 255 245
20 10 251 12 40 10 = 32 50 261 32 50 255
+
12 248 250 12 150 60 24 398 310 24 255 255
a b
c d
a b
NOT(a)
a.b
a+b
Arithmetic and Logic Operations
. =
+ =
Image Subtraction
a b
c d