You are on page 1of 42

Image

Acquisition

Lecture # 3

1/48
Principal Sensor Arrangements
Incoming energy transformed into voltage by the
combination of:
Electrical power
Sensor material (responsive to type of energy)
Output voltage is proportional to intensity
Filter can improve selectivity ( Green etc)

2/48
Principal Sensor Arrangements
Three Principal Sensor arrangement to transform illumination
energy into digital image

Single imaging sensor

Line sensor

Array sensor

3/48
Image Acquisition

4/48
Image Acquisition

Image acquisition through


linear sensor strip

Image acquisition through


circular sensor strip

5/48
Digital Camera Technologies
CCD (Charge Coupled Device)
Capacitive device

CMOS (Complementary metal-oxide semi-conductor)


This technology has taken over the CCD

6/48
Image Acquisition Digital Camera
Transfer Architecture

Frame Transfer
Architecture

Interline Transfer
Architecture

Active Pixel
Architecture

8/48
Digital Camera Technologies (1)
CCD Array
Cameras

Frame Transfer
Architecture

9/48
Digital Camera Technologies (2)
CCD Array
Cameras

Interline Transfer
Architecture

11/48
Digital Camera Technologies (3)
Active pixel architecture

CMOS Array
Cameras
Standard semiconductor
production line
Active pixel architecture
Photo-detector and amplifier
are both fabricated inside each
pixel.

12/48
Basic Relationship b/w pixels

Neighbors of a pixel
Adjacency
Connectivity
Path
Region / boundaries
Distance Measures

14/48
Relationship Between Pixels
Neighbors of a Pixel

0 0 0 1 1 1
1 1 1 1 1 1
0 0 1 0 1 0
1 1 1 1 1 1
1 1 1 0 0 0
1 1 1 1 1 0

15/48
Basic relationships between pixels
Arrangement of pixels: 0 1 1
0 1 0
0 0 1
4 neighbours N4(p): 1
0 1 0
0

Diagonal neighbours ND(p): 0 1


1
0 1

8 neighbours N8 (p) = ND(p) U N4(p) : 0 1 1


0 1 0
0 0 1
16/48
Neighbors of A Pixel
x
A pixel p at coordinate (x, y) has N4(p) : 4-
neighbors of p
y
(x+1, y), (x-1,y),(x,y+1), (x,y-1)

ND(p) : 4-diagonal neighbors of p


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

N8(p) : 8-neighbors of p :
a combination of N4(p) and ND(p)

17/48
Basic relationships between Pixels
Adjacency between pixels:
Two pixels p and q are adjacent if
They are neighbor
Their gray levels satisfy a specified criterion of similarity

V: Set of gray level values used to define the criterion of


similarity
4-adjacency: If gray-level p , q V, and q N4(p)
8-adjacency: If gray-level p , q V, and q N8(p)
m-adjacency (mixed adjacency): (modification of 8-adjancy)

18/48
Adjacency

q
q q q
q p q q p q
q q q q

4 Adjacent Pixels 8 Adjacent Pixels

19/48
Basic relationships between Pixels
PATH
A path from pixel p with coordinates (x, y) to pixel q with
coordinates (s, t) is a sequence of distinct pixels with
coordinates
(x0,y0),(x1,y1),(xn,yn)
where (x0,y0) = (x, y) , (xn, yn) = (s, t) and (xi, yi) is adjacent to
(xi-1,yi-1)
n is the length of the path
we can define 4-,8-, or m-paths depending on type of adjacency
specified.

20/48
Basic relationships between Pixels
PATH. Find Shortest 4 path

21/48
Basic relationships between Pixels
PATH. Find Shortest 8 path

22/48
Adjacency
Mixed Adjacency:
Note: Mixed adjacency can eliminate the multiple path
connections that often occurs in 8-adjacency

Pixel 8-adjacent to the


arrangement center pixel
23/48
M- Adjacency
q

m- Adjacency (mixed Adjacency ): 2 pixels p and q


with values from V are m-adjacent if
q is in the set N4(p) or
q is in the set ND (p) and the set N4(p) N4(q) has no
pixels whose values are from V. (if we get NUL result
from intersection then p and q are m-adjacent and
diagonal (Nd) path will be followed otherwise N4 path)

24/48
Basic relationships between Pixels
PATH. Find Shortest m path

25/48
M- Adjacency
Are b & c m-adjacent

Yes

Are b & e m-adjacent


Yes

Are e & i m-adjacent

26/48
Yes
M- Adjacency

No

27/48
m-connectivitys distance

Distance =2 distance = 3 Distance = 4

Distances (D8) of m-connectivity of the path


between 2 pixels depends on values of pixels along
the path.
e.g., if only connectivity of pixels valued 1 is
allowed. find the m-distance b/w p and p4

28/48
Basic relationships between Pixels
Connectivity between pixels:
An important concept used in establishing boundaries of
objects and components of regions
Let S represent a subset of pixel in an image. Two pixels p
and q are connected if there exit a path between them.

29/48
Basic relationships between pixels
Regions
A set of pixels in an image where all component pixels are connected

Boundary of a region
A set of pixels of a region R that have one of more neighbors that are
not in R

30/48
Boundary

0 0 0 0
0 0 0 0
0 1 1 1
0 1 1 1
0 1 1 1
0 1 1 1
0 0 1 1
0 0 1 1

31/48
Boundary

0 0 0 0
0 0 0 0
0 1 0 0
0 1 1 1
0 1 1 1
0 1 1 1
0 0 1 1
0 0 1 1

32/48
Boundary

0 0 0 0
0 0 0 0
0 1 0 0
0 1 1 0
0 1 1 1
0 1 1 1
0 0 1 1
0 0 1 1

33/48
Basic relationships between pixels
Neighbor -> adjacent -> path -> connected -> region

34/48
Distance Measures
For pixel p, q and z with coordinates (x, y), (s, t) and (u, v)
respectively
D is a distance function or metric

s,t

y-t

x,y
x-s

35/48
Distance Measures
Given coordinates of pixels p, q, and z: (x,y), (s,t), and (u,v)
Euclidean distance between p and q:
De ( p, q) ( x s) 2 ( y t ) 2
The pixels with De distance r from (x,y) define a disk of radius r
centered at (x,y)
City-block distance between p and q:
D4 ( p, q) x s y t
The pixels with D4 distance r from (x,y) form a diamond centered at
(x,y)
the pixels with D4=1 are the 4-neighbors of (x,y)
Chessboard distance between p and q:
D8 ( p, q) max(| x s |, | y t |)
The pixels with D8 distance r from (x,y) form a square centered at (x,y)
The pixels with D8=1 are the 8-neighbors of (x,y)

36/48
Euclidean Distance Between p and q

37/48
City-block distance: D4 distance
D4(p,q) = (|x s| + |y t |)
D4 =1 are 4-neighbors of (x, y)
Draw D4 distance 2
D4 distance 2 from (x,y) form the diamond centered at (x, y)

s,t

y-t

x,y
x-s

38/48
Chessboard distance: D8 Distance
D8 (p, q) = max (|x s|, |y t |)
D8 =1 are 8-neighbors of (x, y)
Draw D8 distance 2 from (x,y)
D8 distance 2 from (x,y) form the square centered at
(x, y)

s,t

y-t

x,y
x-s

39/48
Distance Measures
close all; clear all
bw = zeros(5,5); bw(3,3) = 1 %bw(4,4) = 1
[DEucli] = bwdist(bw)
[DChess] = bwdist(bw,'chessboard')
[DCity] = bwdist(bw,'cityblock')

40/48
Distance.m
D4 and D8 Distances
We can consider both D4 and D8 distances b/w p and q
regardless of whether a connected path exists between them or
not because the definitions of these distances involve only the
coordinates.

41/48
Adjacent
Two image area subsets S1 and S2 are adjacent
if some pixel in S1 is adjacent to some pixel S2.

42/48
Exercise
Consider the two image subsets S1 and S2

For V={1}, determine whether S1 and S2 are


4- adjacent
8- adjacent
m- adjacent

43/48
Exercise
Consider the two image subsets S1 and S2

(a) S1 and S2 are not 4-connected because


q is not in the set N4(p)
(b) S1 and S2 are 8-connected
because q is in the set N8(p)
(c) S1 and S2 are m-connected because
(i) q is in ND (p), and
(ii) the set N4(p) N4(q) is empty.

44/48
Reading Assignment
Chapters 1 and 2 of Digital Image Processing by
Gonzalez.
Chapter 2 of Digital Image Processing using
MATLAB by Gonzalez.

45/48