Unit 1. Digital Image Fundamentals
Unit 1. Digital Image Fundamentals
21CSE251T
1
Topics to be covered
Origin of Digital Image Processing,
Types of Images,
2
Digital Image Processing
3
Digital Image Processing
Digital Image: “When x,y, and amplitude levels of ‘g’ are all
finite and discrete in quantities, the image is said to be a digital
image”
4
Digital Image Processing
Digital Image: “When x, y and amplitude levels of ‘g’ are all finite
and discrete in quantities, the image is said to be a digital image”
5
Origin of Digital Image
Processing
Newspaper Industry : Very first application of digital images was
Newspaper industry where pictures are sent by submarine cables
between two cities”. Time and space complexity is high in this system.
6
Origin of Digital Image
Processing
Bartlane cable picture transmission system: In 1920, invention of
Bartlane cable picture transmission system reduced the time required to
send a picture.
7
Origin of Digital Image
In 1960, introductionProcessing
of powerful digital computers reduced the
storage complexity and enhanced the computational requirement of
digital image.
8
Application of DIP
Office automation.
Industrial automation.
Bio-medical.
Remote sensing.
Scientific application.
Criminology
Meteorology
Information technology
Military application.
9
Application of DIP: Automatic Text
Analysis
Possible steps of DIP will be-
Preprocessing of image
processing
10
Application of DIP: Image
Enhancement
One of the most common uses of DIP techniques: improve quality,
remove noise etc
11
Application of DIP: Artistic Effects
12
Application of DIP: Medicine
Take slice from MRI scan of heart, and find boundaries between types of
tissue.
◦ Image with gray levels representing tissue density
◦ Use a suitable filter to highlight edges
13
Application of DIP: GIS
Geographic Information Systems
◦ Digital image processing techniques are used extensively to manipulate satellite
imagery
◦ Terrain classification
14
Application of DIP: PCB Inspection
15
Application of DIP: Law Enforcement
16
Application of DIP: Human Computer Interface
(HCI)
Try to make human computer interfaces more natural
◦ Face recognition
◦ Gesture recognition
17
Fundamental steps in digital image
processing
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Representation
Acquisition & Description
Object
Problem Domain
Recognition
Colour Image Image
Processing Compression
18
Fundamental steps in digital image
processing
◦ Process of acquiring an image
◦ Converting simple image into
digitized image
Morphologi
Image
cal ◦ Involves some preprocessing like
Restoration
Processing scaling etc also
Image
Segmentati
Enhanceme
on
nt
Representa
Image
tion &
Acquisition
Description
Object
Problem
Recognition
Domain
Colour
Image
Image
Compression
Processing
19
Fundamental steps in digital image
processing
Image Enhancement
◦ Highlighting certain features of interest
in an image suitable for specific
Image Morphological
Restoration Processing application.
◦ It is a subjective process
◦ Because what constitutes a good
Image
Segmentation enhancement result is based on human
Enhancement
subjective preferences.
Representa
Image
tion &
Acquisition
Description
Problem Object
Domain Recognition
Colour
Image
Image
Compressi
Processin
on
g
20
Fundamental steps in digital image
processing
Image Restoration
Morphologi
Image
cal
Restoration
Processing • Deals with improving the appearance
of image
• It is a objective process
Image
Segmentati
Enhancem • Because restoration techniques based
on
ent
on the mathematical or probalistic
models of image degradation.
Represent
Image
ation &
Acquisition
Description
Object
Problem Recognitio
Domain n
Colour Image
Image Compressi
Processing on
21
Fundamental steps in digital image
processing
Image
Morphological Processing
Morphological
Restoratio
Processing
n
Deals with tools for extracting
image components that are
Image useful in image representation
Enhancem Segmentation
ent and description of shape.
Image Representati
Acquisitio on &
n Description
Problem Object
Domain Recognition
Colour Image
Image Compressi
Processing on
22
Fundamental steps in digital image
processing
Morphologi Segmentation
Image
cal
Restoration
Processing
Partitioning an image into its
constituent parts or objects.
Image
Enhanceme Segmentation
nt
If more accurate
segmentation then more
Representa
succeeded recognition is
Image
Acquisition
tion & done.
Description
Problem Object
Domain Recognition
Colour Image
Image Compressio
Processing n
23
Fundamental steps in digital image
processing
Morphologi
Representation and
Image Description
cal
Restoration
Processing
24
Fundamental steps in digital image processing
Image
Morphologic Image Compression
al
Restoration
Processing Reducing storage required
Reducing bandwidth required
for transmission
Image
Segmentati
Enhanceme
on
nt Color Image Processing
Extracting features of interest
Image
Representat in an image
ion &
Acquisition
Description
Problem Object
Domain Recognition
Colour
Image
Image
Compression
Processing
25
Elements of an Image Processing System
Mass Storage
Sensor
Digital Image
Digitizer Computer Processing H/W
& S/W
Display
27
Type of Images
2. Gray scale image: Each pixel is usually stored as a byte ( 8-bits). Pixel values are
ranges from ‘0’ (Black) to ‘255 (28 )’ (White).
28
Type of Images
3. Color image: Color image are based on the fact that a variety of colors
can be generated by mixing 3-primary colors i.e. Red, Green and Blue.
Each single color represent 1 byte. So, size of color image is 24-bit. Color
image can be represented as:
g(x,y) = [ g R(x,y), g G(x,y), g B(x,y) ]
29
Type of Images
30
Type of Images
31
Type of Images
32
Elements of Visual Perception
Structure of the human eye
• Avg diameter : 20mm
38
Image formation Model
39
Image formation Model
40
Image Sampling &
Quantization
Output of most sensors is a continuous voltage waveform whose
amplitude & spatial behavior are related to the physical phenomenon
(e.g. brightness) being sensed.
41
Image Sampling & Quantization
Continued…
42
Image Sampling & Quantization
Continued…
Image Sampling & Quantization
Continued….
By Repeating this process line by line from top of the image can
generate a 2D digital image.
44
Image Sampling & Quantization
Continued….
Sampling: digitizing the 2-dimensional spatial coordinate values.
Quantization: digitizing the amplitude values (brightness level)
45
Image Sampled w.r.t. ‘x’ and ‘y’
Coordinates
N – no. of samples along x axis (i.e. no. of columns in the matrix).
M – no. of samples along y axis (i.e. no. of rows in the matrix).
M = 2m and N = 2n
46
Image Sampled w.r.t. ‘x’ and ‘y’
Coordinates Continued…
Question: What is the number of bits required to store a digitized
image?
Answer:
b=M*N*k
If M = N, then:
b = N2 * k
47
k-bit image
An image having 2k gray levels
b = N2 * k
48
Representing Digital
Images
49
Image Coordinate
System
50
Resolution of an Image
Spatial Resolution:
-- It is the smallest detail in an image.
-- It can be expressed as dots(pixels) per unit distance.
Gray-level Resolution:
-- It is the smallest discernible change in the gray level of an image.
(no. of bits needed to quantize intensity).
51
Fixed Gray-level ; Varying number of samples
52
Checkboard Effect and False
Contouring
Checkerboard Effect :
When the no. of pixels in an image is reduced and keeping the no. of gray
levels in the image constant then fine checkerboard patterns are found at
the edges of the image. This effect is called the checker board effect.
False Contouring:
When the no. of gray-levels in the image is low, the foreground details of
the image merge with the background details of the image, causing ridge
like structures. This degradation phenomenon is known as false
contouring.
54
Basic Relationship between Pixels
Neighbors of a pixel
Regions.
Boundary.
55
Neighbors of Pixel
• There are three kinds of neighbors of a pixel:
O O O O O O
O X O X O X O
O O O O O O
56
Neighbors of Pixel
Continued..
57
Adjacency
• Two pixels that are neighbors and have the same grey-level (or some
other specified similarity criterion) are adjacent.
58
Type of Adjacency
2. 8-adjacency: Two pixels p & q with values from ‘V’ are 8-adjacent if
‘q’ is in the set N8(p).
59
Problem of Adjacency
• Question: Find 8-adjacency & m-adjacency of the pixel in the centre.
Note: V = {1}
60
Problem of Adjacency Continued..
• Solution:
61
Path (Digital Path or Curve)
• From pixel p with coordinates (x0, y0) to pixel q with coordinates (xn, yn)
Where pixels (xi, yi) & (xi-1, yi-1) are adjacent for
1≤i≤n
62
Problem of Adjacency Continued..
• Solution:
Path can be 4-, 8- or m-path, depending upon the type of adjacency specified.
Path between NE & SE pixels 8-path shown in (b) & m-path shown in
(c)
Note: No ambiguity in m-path
63
Region
R – subset of pixels in an image.
1 1 0 0 1 1
1 1 0 1 0 1
1 1 1 0 1 1
64
Boundary
The boundary (aka border or contour) of a region R is the set of
pixels in R that have one or more neighbors that are not in R.
0 0 0 0 0
0 1 1 0 0
Is it a boundary pixel?
0 1 1 0 0
0 1 1 1 0
0 1 1 1 0
0 0 0 0 0
65
Another Definition of
Boundary
The boundary of a region R is the set of pixels that are adjacent to
pixels in the complement of R.
0 0 0 0 0
0 0 1 0 0
0 0 1 0 0
0 0 1 0 0
0 0 1 0 0
0 0 0 0 0
66
Edge vs. Boundary
Edges are formed from pixels with derivative values that exceed a
preset threshold. It is thus a local concept that is based on a
measure of intensity-level discontinuity at a point.
67
Distance Measures between Pixels
68
Distance Measures between Pixels
Continued…
Pixel Coordinate
1. Euclidean distance between p & q:
p (x, y)
D4(p, q) = |x – s| + |y – t|
69
Distance Measure Points
70
Numerical Problems on Adjacency
Question 1: Consider the two image subsets, S1 and S2, shown in the
following figure. For V={1}, determine whether these two subsets are
(a) 4-adjacent,
(b) 8-adjacent, or
(c) m-adjacent.
71
Numerical Problems on Adjacency
Solution 1:
(a) S1 and S2 are not 4-connected because q is not in the set N4(p);
72
Numerical Problems on Adjacency
73
Numerical Problems on Adjacency
Solution 2:
When V = {0,1}, 4-path does not exist between p and q because it is
impossible to get from p to q by traveling along points that are both
4-adjacent and also have values from V . Fig. a shows this condition;
it is not possible to get to q.
The shortest 8-path is shown in Fig. b its length is 4.
The length of the shortest m- path (shown dashed) is 5.
Both of these shortest paths are unique in this case.
74
Numerical Problems on Adjacency
75
Mathematical Tools
used in
Digital Image Processing
1/15/2025 76
Array vs Matrix Operations
17/2/2011 77
Linear vs Nonlinear Operations
78
Is the sum operator, Σ, linear?
17/2/2011 79
Is the max operator, whose function is to
find the maximum value of the pixels in an
image, linear?
17/2/2011 80
Arithmetic Operations
17/2/2011 81
Image
g(x, y) Subtraction
= f(x, y) - h(x,
y) by computing the difference
Obtained
between all pairs of corresponding pixels from
images f & h.
Subtraction enhances
the differences
between the two
images
17/2/2011 82
Mask Mode Radiography
One of the most successful commercial applications of
image subtraction
17/2/2011
Image
Averaging
• A noisy image:
17/2/2011 86
Image Multiplication or division
Shading Correction
An important applications of image division
An imaging sensor produces image g(x, y), where
17/2/2011 89
Set Operations
17/2/2011 90
Logical Operations
Note: Here
White represents
binary 1s
17/2/2011 91
Geometric Spatial
Transformations
Geometric transformation consists of two basic operations-
17/2/2011 93
Translation
• Translate (a,b): (x,y) (x+a,y+b)
17/2/2011 94
(x, y) (x’, y’)
where (x’, y’) = (x+h, y+k)
Then, the relationship between (x, y) and (x', y') can be
put into a matrix form
17/2/2011 95
17/2/2011 96
17/2/2011 97
If a point (x, y) is rotated an angle a
about the coordinate origin to
become a new point (x', y'), the
relationships can be described as
follows:
17/2/2011 98
Translation & Rotation
can be combined
10
17/2/2011 0
Scaling can be applied to all axes, each with a
different scaling factor. For example, if the x-, y-
and z-axis are scaled with scaling factors p, q and
r, respectively, the transformation matrix is:
10
17/2/2011 1
10
17/2/2011 2
How far a direction is pushed is determined
by a shearing factor. On the xy-plane, one
can push in the x-direction, positive or
negative, and keep the y-direction
unchanged. Or, one can push in the
y-direction and keep the x-direction fixed.
The following is a shear transformation in
the x-direction with shearing factor a:
10
17/2/2011 3
Transformations relocate
pixels on an image to new
locations
Intensity interpolation
required
10
17/2/2011 4
Thank You!
10
5