Dip Unit 1
Dip Unit 1
Introduction
Introduction
Major uses
Gamma-ray imaging: nuclear medicine and astronomical observations
X-rays: medical diagnostics, industry, and astronomy, etc.
Ultraviolet: lithography, industrial inspection, microscopy, lasers, biological
imaging,and astronomical observations
Visible and infrared bands: light microscopy, astronomy, remote sensing, industry
Microwave band: radar
Radio band: medicine (such as MRI) and astronomy
Light and EM Spectrum
Weeks 1 & 2 28
Fundamental Steps in digital image processing
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Fundamental Steps in digital image processing
Image Acquisition
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Fundamental Steps in digital image processing
Image Enhancement
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Fundamental Steps in digital image processing
Image Restoration
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Fundamental Steps in digital image processing
Morphological Processing
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Fundamental Steps in digital image processing
Segmentation
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Fundamental Steps in digital image processing
Object Recognition
Images taken from Gonzalez & Woods, Digital Image Processing (2002)
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Fundamental Steps in digital image processing
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Fundamental Steps in digital image processing
Image Compression
Image Morphological
Restoration Processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Fundamental Steps in digital image processing
Image
Segmentation
Enhancement
Image Object
Acquisition Recognition
Representation
Problem Domain
& Description
Colour Image Image
Processing Compression
Digital image representation
Pixel
— the elements of a digital image
A Simple Image Formation Model
f ( x , y ) = i ( x , y ) r ( x, y )
• Illumination
Lumen — A unit of light flow or luminous flux
Lumen per square meter (lm/m2) — The metric unit of measure for
illuminance of a surface
– On a clear day, the sun may produce in excess of 90,000 lm/m2 of illumination
on the surface of the Earth
– On a cloudy day, the sun may produce less than 10,000 lm/m2 of illumination
on the surface of the Earth
Weeks 1 & 2 44
Some Typical Ranges of Reflectance
• Reflectance
Digitizing the
coordinate
values
Digitizing the
amplitude
values
Image Sampling and Quantization
Representing Digital Images
Representing Digital Images
The representation of an M×N numerical array
f (0, 0) f (0,1) ... f (0, N − 1)
f (1, 0) f (1,1) ... f (1, N − 1)
f ( x, y ) =
... ... ... ...
f ( M − 1, 0) f ( M − 1,1) ... f ( M − 1, N − 1)
• Spatial resolution
— A measure of the smallest discernible detail in an image
— stated with line pairs per unit distance, dots (pixels) per unit
distance, dots per inch (dpi)
• Intensity resolution
— The smallest discernible change in intensity level
— stated with 8 bits, 12 bits, 16 bits, etc.
Spatial and Intensity Resolution
Weeks 1 & 2 52
Spatial and Intensity Resolution
Weeks 1 & 2 53
Spatial and Intensity Resolution
Weeks 1 & 2 54
Basic Relationships Between Pixels
• Neighborhood
• Adjacency
• Connectivity
• Paths
• Adjacency
Let V be the set of intensity values
• Adjacency
Let V be the set of intensity values
➢ m-adjacency: Two pixels p and q with values from V are m-
adjacent if
(i) q is in the set N4(p) or q is in the set ND(p) AND
(ii) the set N4(p) ∩ N4(q) has no pixels whose values are from V.
➢ In other words, m-adjacency can be defined as:
(i) Two pixels are said to be m-connected if A is a 8-neighbor of B , their gray
level meet the same predetermined criteria AND
(ii) 4 neighbors of A do not intersect with 4 neighbors of B.
Basic Relationships Between Pixels
• Path
➢ A (digital) path (or curve) from pixel p with coordinates (x0, y0) to pixel q with
coordinates (xn, yn) is a sequence of distinct pixels with coordinates
➢ We can define 4-, 8-, and m-paths based on the type of adjacency used.
Examples: Adjacency and Path
V = {1, 2}
0 1 1 0 1 1 0 1 1
0 2 0 0 2 0 0 2 0
0 0 1 0 0 1 0 0 1
Weeks 1 & 2 60
Examples: Adjacency and Path
V = {1, 2}
0 1 1 0 1 1 0 1 1
0 2 0 0 2 0 0 2 0
0 0 1 0 0 1 0 0 1
8-adjacent
Weeks 1 & 2 61
Examples: Adjacency and Path
V = {1, 2}
0 1 1 0 1 1 0 1 1
0 2 0 0 2 0 0 2 0
0 0 1 0 0 1 0 0 1
8-adjacent m-adjacent
Weeks 1 & 2 62
Examples: Adjacency and Path
V = {1, 2}
0 1 1
1,1 1,2 1,3 0 1 1 0 1 1
0 2 0
2,1 2,2 2,3 0 2 0 0 2 0
0 0 1
3,1 3,2 3,3 0 0 1 0 0 1
8-adjacent m-adjacent
The 8-path from (1,3) to (3,3): The m-path from (1,3) to (3,3):
(i) (1,3), (1,2), (2,2), (3,3) (1,3), (1,2), (2,2), (3,3)
(ii) (1,3), (2,2), (3,3)
Weeks 1 & 2 63
Basic Relationships Between Pixels
• Connected in S
Let S represent a subset of pixels in an image. Two pixels p with
coordinates (x0, y0) and q with coordinates (xn, yn) are said to be
connected in S if there exists a path
Weeks 1 & 2 64
Basic Relationships Between Pixels
• For every pixel p in S, the set of pixels in S that are connected to p is called a
connected component of S.
• Two regions, Ri and Rj are said to be adjacent if their union forms a connected
set.
• Regions that are not to be adjacent are said to be disjoint.
Weeks 1 & 2 65
Basic Relationships Between Pixels
➢ The boundary of the region R is the set of pixels in the region that have one
or more neighbors that are not in R.
➢ If R happens to be an entire image, then its boundary is defined as the set of
pixels in the first and last rows and columns of the image.
Weeks 1 & 2 66
Question 1
1 1 1
Region 1
1 0 1
0 1 0
0 0 1 Region 2
1 1 1
1 1 1
Weeks 1 & 2 67
Question 2
• In the following arrangement of pixels, are the two parts (of 1s)
adjacent? (if 4-adjacency is used)
1 1 1
Part 1
1 0 1
0 1 0
0 0 1 Part 2
1 1 1
1 1 1
Weeks 1 & 2 68
• In the following arrangement of pixels, the two regions (of 1s)
are disjoint (if 4-adjacency is used)
1 1 1
Region 1
1 0 1
0 1 0
0 0 1 Region 2
1 1 1
1 1 1
Weeks 1 & 2 69
• In the following arrangement of pixels, the two regions (of 1s)
are disjoint (if 4-adjacency is used)
1 1 1
foreground
1 0 1
0 1 0
0 0 1 background
1 1 1
1 1 1
Weeks 1 & 2 70
Question 3
0 0 0 0 0
0 1 1 0 0
0 1 1 0 0
0 1 1 1 0
0 1 1 1 0
0 0 0 0 0
Weeks 1 & 2 71
Distance Measures
• Given pixels p, q and z with coordinates (x, y), (s, t), (u, v)
respectively, the distance function D has following
properties:
b. D(p, q) = D(q, p)
Weeks 1 & 2 73
Distance Measures
The following are the different Distance measures:
a. Euclidean Distance :
De(p, q) = [(x-s)2 + (y-t)2]1/2
Weeks 1 & 2 74
Question 5
0 0 0 0 0
0 0 1 1 0
0 1 1 0 0
0 1 0 0 0
0 0 0 0 0
0 0 0 0 0
Weeks 1 & 2 75
Question 6
0 0 0 0 0
0 0 1 1 0
0 1 1 0 0
0 1 0 0 0
0 0 0 0 0
0 0 0 0 0
Weeks 1 & 2 76
Question 7
0 0 0 0 0
0 0 1 1 0
0 1 1 0 0
0 1 0 0 0
0 0 0 0 0
0 0 0 0 0
Weeks 1 & 2 77
Question 8
0 0 0 0 0
0 0 1 1 0
0 0 1 0 0
0 1 0 0 0
0 0 0 0 0
0 0 0 0 0
Weeks 1 & 2 78
Introduction to Mathematical Operations in DIP
Matrix
21 21 22 22
a b a b
product
operator
a11b11 + a12b21 a11b12 + a12b22 Matrix product
A*B=
+ a b a b +
21 11 22 21 21 12 22 22
a b a b
Weeks 1 & 2 79
Introduction to Mathematical Operations in DIP
H f ( x, y ) = g ( x, y )
H ai fi ( x, y ) + a j f j ( x, y )
Additivity
= H ai fi ( x, y ) + H a j f j ( x, y )
= ai H fi ( x, y ) + a j H f j ( x, y ) Homogeneity
= ai gi ( x, y ) + a j g j ( x, y )
H is said to be a linear operator;
H is said to be a nonlinear operator if it does not meet the above
qualification.
Weeks 1 & 2 80
Arithmetic Operations
Weeks 1 & 2 81
Statistical Properties
• 1. Histogram
• 2. Histogram Equalization
• 3. Mean [Brightness or Average gray level of
the image]
• 4. Standard Deviation [Contrast (C=1 : High
cont & C=0 : low Cont)]
Image statistics
M −1 N −1
f ( x, y)
y =0 x =0
• MEAN =
N *M
M −1 N −1
( f ( x , y ) − ) 2
• VARIANCE 2 = y =0 x =0
N *M