Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
5 views40 pages

Lecture 2 Fundamentals

Uploaded by

Momin Islam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views40 pages

Lecture 2 Fundamentals

Uploaded by

Momin Islam
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 40

Chapter 2

Digital Image Fundamentals

1
A Simple Image Formation
Model
 we shall denote images by two-dimensional
functions of the form f(x, y).
 The value or amplitude of f at spatial
coordinates (x, y) is a positive scalar quantity
whose physical meaning is determined by
the source of the image.
 When an image is generated from a physical
process, its values are proportional to energy
radiated by a physical source (e.g.,
electromagnetic waves).As a consequence,
f(x, y) must be nonzero and finite; that is
2
A Simple Image Formation Model

 As a consequence, f(x, y) must be nonzero and


finite; that is
0 < f(x, y) <  --------------(1)

 The function f(x, y) may be characterized by two components:


(1) the amount of source illumination incident on the scene being
viewed, and
(2) the amount of illumination reflected by the objects in the scene.
Appropriately, these are called the illumination and reflectance
components and are denoted by i(x, y) and r(x, y), respectively.

3
A Simple Image Formation Model

The two functions combine as a product to form f(x, y):

f(x, y) = i(x, y)  r(x, y) ------------- (2)


where
0 < i(x, y) <  ---------------------- (3)
and 0 < r(x, y) < 1 --------------------- (4)

4
 (4) indicates that reflectance is bounded
by 0 (total absorption) and 1 (total
reflectance).
 The nature of i(x, y) is determined by the
illumination source, and r(x, y) is
determined by the characteristics of the
imaged objects

5
Image Digitization

Two steps :
1. Sampling : Digitizing the coordinates values is
called sampling.
2. Quantization : Digitizing the amplitude values is
called quantization.

6
Image Digitization

Let’s start with a gray scale image.


We will try to digitize this image
along the horizontal line segment
AB

7
Image Digitization

This ia a plot of amplitude


values of the continuous image
along the line segment AB.
Random variations are due to
image noise.
8
Image Digitization

To sample this function,


we take equally spaced
samples along line AB

9
Image Digitization

The values of the samples


still span a continuous
range of intensity values

10
Image Digitization

Intensity scale is divided


into eight discrete
intervals.

11
Image Digitization

12
Representing Digital Images

13
 Assume that an image f(x, y) is sampled so that the
resulting digital image has M rows and N columns.
The values of the coordinates (x, y) now become
discrete quantities.
 For notational clarity and convenience, we shall use
integer values for these discrete coordinates. Thus, the
values of the coordinates at the origin are (x, y)=(0,
0). The next coordinate values along the first row of
the image are represented as (x, y)=(0, 1).
 It is important to keep in mind that the notation (0, 1)
is used to signify the second sample along the first
row. It does not mean that these are the actual values
of physical coordinates when the image was sampled.

14
Representing Digital Images

15
Representing Digital Images

Each element of this matrix


is called pixel or pel

Matrix Representation

16
It is advantageous to use a more traditional
matrix notation to denote a digital image and
its elements:

Clearly, aij=f(x=i, y=j)=f(i, j), so this and above are identical


matrices.

17
Pixel and their Relationships

18
Neighbors of a pixel

 3 types of neighbors

• N4(p): 4-neighbor

• ND(p): diagonal neighbor

• N8(p): 8-neighbor

19
Neighbors of a pixel

• N4(p): 4-neighbor

Defined as the pixels at (x+1, y), (x-1, y), (x, y+1),


(x, y-1)

20
Neighbors of a pixel

• ND(p): diagonal neighbor

Defined as the pixels at (x+1, y+1), (x+1, y-1), (x-


1, y+1), (x-1, y-1)

21
Neighbors of a pixel

• N8(p): 8-neighbor

Defined as the pixels at (x+1, y), (x-1, y), (x, y+1),


(x, y-1),(x+1, y+1), (x+1, y-1), (x-1, y+1), (x-1, y-1)

22
Pixel Adjacency

 Adjacencies depends on both

• Neighborhood

• Pixel gray values

Adjacent pixels must be neighbors and have gray


values from the same set, V

23
Pixel Adjacency

Adjacent pixels must be neighbors and have gray


values from the same set, V

Can not be adjacent Can be adjacent

24
Pixel Adjacency

 3 types of adjacencies

• 4-adjacency

• 8-adjacency

• m-adjacency

25
4-adjacency

Two pixels p, q are 4-adjacent if

• q in N4(p)

• p, q have values from set V

p q
r

26
8-adjacency

Two pixels p, q are 8-adjacent if

• q in N8(p)

• p, q have values from set V

q r
p

27
m-adjacency

Two pixels p, q are m-adjacent if

• p, q have values from set V and

o q in N4(p), or

o q in ND(p) and N4 (p)  N4 (q) has no pixel


with value from V

q q
p p

Not m-adjacent m-adjacent


28
m-adjacency

Mixed adjacency is a modification of 8-adjacency.


It is introduced to eliminate the ambiguities that
often arise when 8-adjacency is used.
For example:

29
m-adjacency

In this example, we can note that to connect between two


pixels (finding a path between two pixels):
 In 8-adjacency way, you can find multiple paths between
two pixels.
 While, in m-adjacency, you can find only one path
between two pixels.
 So, m-adjacency has eliminated the multiple path
connection that has been generated by the 8-adjacency.

30
Distance Measures

For pixels p, q and z with co-ordinates (x, y), (s, t)


and (v, w) respectively, D is a distance function or
metric if

31
Euclidean distance

The Euclidean distance between p(x, y) and q(s, t) is


defined as

For this distance measure, the pixels having a


distance less than or equal to some value r from
(x, y) are the points contained in a disk of radius r
centered at (x, y)
32
D4 distance

The city-block distance or D4 distance between


p(x, y) and q(s, t) is defined as

33
D4 distance

For this distance measure, the pixels having a


distance less than or equal to some value r from (x,
y) form a diamond centered at (x, y.)

34
D8 distance

The chessboard distance or D8 distance between


p(x, y) and q(s, t) is defined as

35
D8 distance

For this distance measure, the pixels having a


distance less than or equal to some value r from
(x, y) form a square centered at (x, y.)

36
Dm distance

Dm distance: depends on adjacency

Shortest m-path between p(x, y) and p4(s, t)

Let,V = {1}
p1 , p3 =0 and p, p2 , p4 =1

Find distance, Dm(p, p4)?


Dm(p, p4) = 2
path : pp2p4
37
Dm distance

Dm distance: depends on adjacency

Shortest m-path between p(x, y) and p4(s, t)

Let,V = {1}
p3 =0 and p, p1, p2 , p4 =1

Find distance, Dm(p, p4)?


Dm(p, p4) = 3
path : pp1p2p4
38
Dm distance

Dm distance: depends on adjacency

Shortest m-path between p(x, y) and p4(s, t)

Let,V = {1}
p, p1, p2, p3, p4 =1

Find distance, Dm(p, p4)?


Dm(p, p4) = 4
path : pp1p2p3p4
39
THANK YOU!!!

You might also like