# 03 Image Fundamentals and Mathematics Basics in DIP
# 03 Image Fundamentals and Mathematics Basics in DIP
Lecture # 03
► Neighborhood
► Adjacency
► Connectivity
► Paths
► Adjacency
Let V be the set of intensity values
► Adjacency
Let V be the set of intensity values
(ii)q is in the set ND(p) and the set N4(p) ∩ N4(q) has no pixels whose
values are from V.
► 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
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)
► 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
S
Digital Image Processing Techniques Lecture # 3 22
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.
a.Euclidean Distance :
De(p, q) = [(x-s)2 + (y-t)2]1/2
B
Digital Image Processing Techniques Lecture # 3 34
Introduction to Mathematical Operations in
DIP
► Linear vs. Nonlinear Operation
y)
ai Hto be
H issaid fi (x, y) a j H
a nonlinear f j (x,if it does not meet the
operator
above qualification.
y)
Digital Image Processing Techniques Lecture # 3 35
Arithmetic Operations
1
g (x, y) K g (x, y) i
i1
Ac {(x, y, K z) | (x, y, z)
K A}
2k 1; k is the number of intensity bits used to represent
z
A B {max(a,b) | a A,b B}
z
Digital Image Pr 50
Spatial Operations
Three categories;
Single pixel operations
Neighborhood operations
Geometric spatial transformation
Spatial Operations
► Single-pixel operations
Alter the values of an image’s pixels based on the
intensity.
s T (z)
e.g.,
► Neighborhood
Neighborhood
operations processing generates
a corresponding
pixel at the same
coordinates in an
output (processed
image)
► Neighborhood
operations
► Affine transform
t11
0
x y 1 v w t12 0
1 t 21 t 22
Digital Image Processing Techniques Lecture # 3
1 57
Digital Image Pr 58
Intensity Assignment
► Forward Mapping
Inverse Mapping
Blocks that provide the intensity transition from light to dark is larger than the
corresponding number of blocks in (d), sharper edge.
The identity transformation and translation transformation if the increments are
integer numbers does not require interpolation.
Digital Image Processing Techniques Lecture # 3 63
Image Registration
x c1v c2 w c3vw
c4
Where (v, w) and (x, y) are the coordinates of tie points in the input
c5v
andyreference c6 w c7vw
images.
Digital Im 68
Image Transform
M 1 N 1
Where j= 1
M 1 N 1
T (u, v) f (x, y)e j 2 (ux/ M vy / N )
x0 y 0
M 1 N 1
1
f (x, y) T (u, j 2 (ux/ M vy /
N)
MN
v)e
u 0 v0
p(z k ) 1
k 0
= 2 (z k m) 2 p(zk )
k 0
The variance is a measure of the spread of the values of z
about the mean, so it a useful measure of image contrast.
In general the nth moment of random variable z about the
mean is defined as
31.6 49.2
14.3
Digital Image Processing Techniques Lecture # 3 79