Unit - 2: by S Pramod Kumar Assistant Professor, Dept - of ECE, KIT, Tiptur
Unit - 2: by S Pramod Kumar Assistant Professor, Dept - of ECE, KIT, Tiptur
by
S Pramod Kumar
Assistant Professor,
Dept.of ECE,KIT,
Tiptur
9/7/2016 [email protected] 1
9/7/2016 [email protected] 2
• Sensor arrangements used to transform
illumination energy into digital images
9/7/2016 [email protected] 3
Images © 2002 Gonzalez & Woods
• Microdensitometers
9/7/2016 [email protected] 4
Images © 2002 Gonzalez & Woods
9/7/2016 [email protected] 5
Images © 2002 Gonzalez & Woods
9/7/2016 [email protected] 6
Images © 2002 Gonzalez & Woods
f ( x , y ) i ( x, y ) r ( x , y )
9/7/2016 [email protected] 7
• Sampling: Digitizing the coordinate values (spatial resolution)
• Quantization: Digitizing the amplitude values (intensity levels)
Digitizing the
coordinate
values Digitizing the
amplitude
values
9/7/2016 [email protected] 8
Images © 2002 Gonzalez & Woods
The representation of an M×N numerical
array as
9/7/2016 [email protected] 11
Images © 2002 Gonzalez & Woods
9/7/2016 [email protected] 12
Images © 2002 Gonzalez & Woods
• Gray-level resolution similarly refers to the
smallest discernible change in gray level
false contouring
9/7/2016 [email protected] 13
Images © 2002 Gonzalez & Woods
9/7/2016 [email protected] 14
Images © 2002 Gonzalez & Woods
Effects on image quality produced by varying N and k
simultaneously
9/7/2016 [email protected] 15
Images © 2002 Gonzalez & Woods
• Shannon sampling theorem
– If the function is sampled at a rate equal to or greater
than twice its highest frequency, it is possible to
recover completely the original function from its
sample.
9/7/2016 [email protected] 18
• Pixel replication
• Nearest neighbor interpolation
9/7/2016 [email protected] 19
• Pixel replication
• Nearest neighbor interpolation
• Bilinear interpolation
9/7/2016 [email protected] 20
9/7/2016 [email protected] 21
Images © 2002 Gonzalez & Woods
9/7/2016 [email protected] 22
• Neighbors of a pixel p at coordinates (x,y)
9/7/2016 [email protected] 23
• Neighbors of a pixel p at coordinates (x,y)
9/7/2016 [email protected] 24
• Neighbors of a pixel p at coordinates (x,y)
9/7/2016 [email protected] 25
• Adjacency
Let V be the set of intensity values
9/7/2016 [email protected] 26
• 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
(ii) q is in the set ND(p) and the set N4(p) ∩ N4(q) has no pixels
whose values are from V.
9/7/2016 [email protected] 27
Images © 2002 Gonzalez & Woods
• Path
A digital path 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.
9/7/2016 [email protected] 28
• Path
9/7/2016 [email protected] 29
• Given pixels p, q and z with coordinates (x, y), (s, t),
(u, v) respectively, the distance function D has
following properties:
a. D(p, q) ≥ 0 [D(p, q) = 0, if p = q]
b. D(p, q) = D(q, p)
9/7/2016 [email protected] 30
Distance Measures
The following are the different Distance measures:
a. Euclidean Distance :
De(p, q) = [(x-s)2 + (y-t)2]1/2
9/7/2016 [email protected] 31
• Let H be an operator
• H is said to be a linear operator if, for any two
images f and g and any two scalars a and b,
H(a f + b g) = a H( f ) + b H( g ).
9/7/2016 [email protected] 33
• 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 . Figure (a) shows this
condition; it is not possible to get to q.
• The shortest 8-path is shown in Figure (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.
9/7/2016 [email protected] 34
• 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.
9/7/2016 [email protected] 35
• Let p and q be as shown in Fig. Then,
(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.
9/7/2016 [email protected] 36
• Measure the distance between the p & q pixels
using different distance measurement technique.
The coordinates of p & q are (0,0) & (3,3)
respectively
a. Euclidean Distance :
De(p, q) = [(x-s)2 + (y-t)2]1/2
9/7/2016 [email protected] 37
• Baud rate, as the number of bits transmitted per second. Generally,
transmission is accomplished in packets consisting of a start bit, a byte (8
bits) of information, and a stop bit. Then how many minutes would it take
to transmit a 1024*1024 image with 256 gray levels using a 56K baud
modem?
• The total amount of data (including the start and stop bit) in an 8bit, 1024
* 1024 image, is (1024)2 *[8 + 2] bits. The total time required to transmit
this image over a 56K baud link is (1024)2 * [8 + 2]=56000 = 187.25 sec or
about 3.1 min.
9/7/2016 [email protected] 38
9/7/2016 [email protected] 39
9/7/2016 [email protected] 40
9/7/2016 [email protected] 41
9/7/2016 [email protected] 42
9/7/2016 [email protected] 43
9/7/2016 [email protected] 44
9/7/2016 [email protected] 45
9/7/2016 [email protected] 46
9/7/2016 [email protected] 47
9/7/2016 [email protected] 48
9/7/2016 [email protected] 49
Calculating bilinear interpolation
There are several ways equivalent ways to calculate the
value of P. An easy way to calculate the value of P would be
to first calculate the value of the two blue dots, R2, and R1.
R2 is effectively a weighted average of Q12 and Q22, while
R1 is a weighted average of Q11 and Q21.
R1 = ((x2 – x)/(x2 – x1))*Q11 + ((x – x1)/(x2 – x1))*Q21
R2 = ((x2 – x)/(x2 – x1))*Q12 + ((x – x1)/(x2 – x1))*Q22
After the two R values are calculated, the value of P can
finally be calculated by a weighted average of R1 and R2.
P = ((y2 – y)/(y2 – y1))*R1 + ((y – y1)/(y2 – y1))*R2
The calculation will have to be repeated for the red, green,
blue, and optionally the alpha component of.
9/7/2016 [email protected] 50
9/7/2016 [email protected] 51