Professional Documents
Culture Documents
Unit 5
Unit 5
PROCESSING
DIGITAL IMAGE
PROCESSING
11.1- Representation
11.2- Boundary Descriptors
11.3- Regional Descriptors
Use of Principal
Regional Components
Descriptors
Representation
Boundary
Relational Descriptors
Descriptors 11.4- Use of Principal Components for Description
for Description 11.5 - Relational Descriptors
11.1 Representation
Representation
Boundary Segments
Skeletons
Chain Codes
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
Boundary Segments
Skeletons
Polygonal Approximations
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
Algorithm:
• SetWC = BC = V0
(a) Vk lies to the positive side of the line through pair (VL, WC);
that is, sgn(VL, WC, Vk) > 0.
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors the next MPP vertex is WC, and we let VL = WC; then we
11.4- Use of Principal
reinitialize the algorithm by setting WC = BC = VL, and continue
Components for Description with the next vertex left
11.5 - Relational Descriptors
(b) Vk lies on the negative side of the line though pair (VL, WC)
or is collinear with it; that is sgn(VL, WC, Vk) 0. At the same
time, VK lies to the positive
side of the line through (VL, BC) or is collinear with it; that is,
sgn(VL,BC, Vk) = 0.
Example
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
11.1-
Representation
11.2- Boundary
Descriptors
11,3- Regional
Descriptors
11.4- Use of
Principal
Components for
Description
11.5 - Relational
Descriptors
Representation
Boundary Segments
Skeletons
Signatures
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
11.1- Representation
• Problem: Signatures generated by this approach are
11.2- Boundary Descriptors invariant to translation, but they do depend on rotation.
11,3- Regional Descriptors
11.4- Use of Principal • Solution for rotation: We can normalize with respect
Components for Description
11.5 - Relational Descriptors
to rotation .
find a way to select the same starting point to generate the
signature, regardless of the shape’s orientation.
11.1- Representation
• Solution for scaling: We can normalize with respect to
11.2- Boundary Descriptors scaling.
11,3- Regional Descriptors
Advantage: simplicity
disadvantage :depends on only two values the minimum
and maximum.
Representation
Boundary Segments
Skeletons
Boundary Segments
11.1- Representation
• Decomposition reduces the boundary’s complexity and
11.2- Boundary Descriptors thus simplifies the description process.
11,3- Regional Descriptors
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
S = dbabcbabdbabcbab
Boundary Segments
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
Boundary Segments
Skeletons
Skeletons
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
11.1- Representation
11.2- Boundary Descriptors • The MAT of a region R with border B:
11,3- Regional Descriptors 1. For each point p in R, find its closest neighbor in B.
11.4- Use of Principal
Components for Description 2. If p has more than one such neighbor, it is said to
11.5 - Relational Descriptors
belong to the skeleton of R.
Example
11.1- Representation
11.2- Boundary Descriptors 0 0 1
11,3- Regional Descriptors 1 p1 0
11.4- Use of Principal 1 0 1
Components for Description
11.5 - Relational Descriptors
N(p1) = 4 and T(p1) = 3
Skeletons
Algorithm:
1.Apply Step 1 to every border pixel in the binary region .
2. if all conditions (a)-(d) are satisfied the point is flagged
for deletion. 3.Delete flagged points (changed to 0).
4.Apply step 2 to the resulting data
Skeletons
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors Some Simple Descriptors
11.4- Use of Principal
Components for Description Shape Numbers
11.5 - Relational Descriptors
Fourier Descriptors
Statistical Moments
Some Simple Descriptors
11.1- Representation
11.2- Boundary Descriptors • There are several simple geometric measures that can
11,3- Regional Descriptors
be useful for describing a boundary.
11.4- Use of Principal • The length of a boundary: the number of pixels
Components for Description
11.5 - Relational Descriptors
along a boundary gives a rough approximation of its
length.
• Curvature: the rate of change of slope
• To measure a curvature accurately at a point in a
digital boundary is difficult
• The difference between the slops of adjacent
boundary segments is used as a descriptor of
curvature at the point of intersection of segments
Boundary Descriptors
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors Some Simple Descriptors
11.4- Use of Principal
Components for Description
11.5 - Relational Descriptors
Shape Numbers
Fourier Descriptors
Statistical Moments
Shape Numbers
First
difference
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors Some Simple Descriptors
11.4- Use of Principal
Components for Description Shape Numbers
11.5 - Relational Descriptors
Fourier Descriptors
Statistical Moments
Fourier Descriptors
Reconstruction formula
K 1
1
s(k )
K
a
k 0
( u ) e 2uk / K
Boundary
points
1 P 1
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors Some Simple Descriptors
11.4- Use of Principal
Components for Description Shape Numbers
11.5 - Relational Descriptors
Fourier Descriptors
Statistical Moments
Statistical Moments
11.1- Representation
11.2- Boundary Descriptors • Moments are statistical measures of data.
11,3- Regional Descriptors
• They come in integer orders.
11.4- Use of Principal • Order 0 is just the number of points in the data.
Components for Description
11.5 - Relational Descriptors • Order 1 is the sum and is used to find the average.
• Order 2 is related to the variance, and order 3 to the
skew of the data.
• Higher orders can also be used, but don’t have
simple meanings.
Statistical Moments
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors Some Simple Descriptors
11.4- Use of Principal
Components for Description Topological Descriptors
11.5 - Relational Descriptors
Texture
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
• Some simple descriptors
• The area of a region: the number of pixels in the
11.4- Use of Principal region
Components for Description
11.5 - Relational Descriptors • The perimeter of a region: the length of its boundary
• The compactness of a region: (perimeter)2/area
• The mean and median of the gray levels
• The minimum and maximum gray-level values
• The number of pixels with values above and below
the mean
Some Simple
Descriptors
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors Some Simple Descriptors
11.4- Use of Principal
Components for Description Topological Descriptors
11.5 - Relational Descriptors
Texture
Topological property 1:
11.1- Representation the number of holes (H)
11.2- Boundary Descriptors
11,3- Regional Descriptors
Topological property 2:
the number of connected
components (C)
Topological Descriptors
Topological property 3:
11.1- Representation Euler number: the number of connected components
11.2- Boundary Descriptors subtract the number of holes
11,3- Regional Descriptors
E=C-H
11.4- Use of Principal
Components for Description
11.5 - Relational Descriptors
E=0 E= -1
Topological Descriptors
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
Topological
property 4:
the largest
connected
component.
Regional Descriptors
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors Some Simple Descriptors
11.4- Use of Principal
Components for Description Topological Descriptors
11.5 - Relational Descriptors
Texture
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
• Texture is usually defined as the smoothness or
roughness of a surface.
11.4- Use of Principal • In computer vision, it is the visual appearance of the
Components for Description uniformity or lack of uniformity of brightness and color.
11.5 - Relational Descriptors
• There are two types of texture: random and regular.
• Random texture cannot be exactly described by
words or equations; it must be described statistically.
The surface of a pile of dirt or rocks of many sizes
would be random.
• Regular texture can be described by words or
equations or repeating pattern primitives. Clothes
are frequently made with regularly repeating
patterns.
• Random texture is analyzed by statistical methods.
• Regular texture is analyzed by structural or spectral
(Fourier) methods.
Texture
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
k 0 i 0
1
• The measure R: R 1
1 2 ( z)
L 1
• The uniformity: U p 2 ( zi )
i 0
L 1
• The average entropy: e p ( zi ) log 2 p ( zi )
i 0
Statistical Approaches
• Structural concepts:
• Suppose that we have a rule of the
form S→aS, which indicates that
the symbol S may be rewritten as
aS.
• If a represents a circle [Fig.
11.23(a)] and the meaning of
“circle to the right” is assigned to a
string of the form aaaa… [Fig.
11.23(b)] .
Spectral Approaches
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors Some Simple Descriptors
11.4- Use of Principal
Components for Description Topological Descriptors
11.5 - Relational Descriptors
Texture
• For a 2-D continuous function f(x,y), the moment of order (p+q) is defined as
m pq x p y q f ( x, y )dxdy for p, q 1,2,3,...
pq ( x x ) p ( y y ) q f ( x, y )dxdy
m10 m01
where x and y
m00 m00
Moments of Two-Dimensional Functions
• If f(x,y) is a digital image, then
pq ( x x ) p ( y y ) q f ( x, y )
• The central moments
x of yorder up to 3 are
00 ( x x ) 0 ( y y ) 0 f ( x, y ) f ( x, y ) m00
x y x y
m10
10 ( x x )1 ( y y ) 0 f ( x, y ) m10 (m00 ) 0
x y m00
m01
01 ( x x ) ( y y ) f ( x, y ) m01
0 1
(m00 ) 0
x y m00
m10m01
11 ( x x ) ( y y ) f ( x, y ) m11
1 1
x y m00
m11 x m01 m11 ym10
Moments of Two-Dimensional Functions
20 ( x x ) 2 ( y y ) 0 f ( x, y ) m20 x m10
x y
02 ( x x ) 0 ( y y ) 2 f ( x, y ) m02 ym01
x y
6 ( 20 02 ) (30 12 ) 2 ( 21 03 ) 2
411 (30 12 )( 21 03 )
2
7 (3 21 03 )(30 12 ) (30 12 ) 3( 21 03 ) 2
(312 30 )( 21 03 ) 3(30 12 ) 2 ( 21 03 ) 2
This set of moments is invariant to translation,
rotation, and scale change
Moments of Two-Dimensional Functions
Moments of Two-Dimensional Functions
Let x [ x1 x2 ... xn ]T
1 K
Mean: m x E{x}
K
x
k 1
k
1 K
Covariance matrix T
C x E{(x m x )( x m x ) }
K
k k x x
x x
k 1
T
m m T
Principal Components for Description
Let y A(x m x )
11.1- Representation
11.2- Boundary Descriptors
Where A is created from eigenvectors of Cx as follows
11,3- Regional Descriptors Row 1 contain the 1st eigenvector with the largest
11.4- Use of Principal eigenvalue.
Components for Description Row 2 contain the 2nd eigenvector with the 2nd largest
11.5 - Relational Descriptors
eigenvalue.
…. 1 0 0 ...
m y E{y} 0 0 ... 0
and Cy 1
C y ACx A T ... ... ... ...
0 ... ... 1
Then elements of y A(x m )
x
are uncorrelated. The
component of y with the largest l is called the principal
component.
Principal Components for Description
11.1- Representation
11.2- Boundary Descriptors Eigenvector and eigenvalue of Matrix C are defined as
11,3- Regional Descriptors
Let C be a matrix of size NxN and e be a vector of size
11.4- Use of Principal Nx1.
Components for Description
11.5 - Relational Descriptors
If
Ce e
Where l is a constant
Component l
1 3210
2 931.4
3 118.5
4 83.88
5 64.00
6 13.40
Original image After Hotelling transform
Principal Components for Description
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors
11.1- Representation
11.2- Boundary Descriptors
11,3- Regional Descriptors