Lecture Objectdecriptors
Lecture Objectdecriptors
Object Descriptors
Azadeh Fakhrzadeh
Centre for Image Analysis
Swedish University of Agricultural Sciences
Uppsala University
2
Reading instructions
• PhD student
• Research topic:
study of morphological
changes in the testicular
tissue
• [email protected] http://www.udel.edu/biology
4
Image analysis
So far
Today
and next
lecture
6
Boundary representation
Chain Coding
Considerations
Polygonal Approximations
Boundary representation
Polygonal Approximations
• Minimum Perimeter Polygons (MPPs)
• Cover the boundary with cells of a chosen size and
force a rubber band like structure to fit inside the cells
Polygonal Approximations
12
• Merging techniques
1. Walk around the boundary and fit a least-square-error line to
the points until an error threshold is exceeded
2. Start a new line, go to 1
3. When start point is reached the intersections of adjacent lines
are the vertices of the polygon
13
Polygonal Approximations
• Splitting techniques
1. Start with an initial guess, e.g., based on majority axes
2. Calculate the orthogonal distance from lines to all points
3. If maximum distance > threshold, create new vertex there
4. Repeat until no points exceed criterion
14
Signatures
Boundary representation
15
Signatures
Boundary representation
• A 1D representation of a boundary
• Could be implemented in different ways
• Distance from centre point to border as a function of angle
• Angle between the tangent in each point and a reference line
(slope density function)
• Independent of translation, but not rotation & scaling.
Possible solutions:
• Select unique starting point (e.g. based on major axis)
• Normalize amplitude of signature (divide by variance)
16
Boundary segments
Boundary representation
• When a boundary contains major concavities that carry
shape information it can be worthwhile to decompose it
into segments
Boundary segments
• Can be a bit noise sensitive
• Smooth prior to Convex Hull calculation
• Calculate Convex Hull on polygonal approximation
18
Skeletons
Shape representation
Skeletons
• Example:
20
Descriptors
• Length (perimeter)
• Diameter = = major axis
• Minor axis (perpendicular to major axis)
• Basic rectangle = major × minor
• Eccentricity = major / minor
• Curvature= rate of change of slope
Fourier descriptors
22
Boundary descriptors
Fourier descriptors
Fourier descriptors
Fourier descriptors
Fourier descriptors
Boundary descriptors
• Useful for describing the shape of boundary segments
(or other curves)
• Suitable for describing the shape of convex deficiencies
• The histogram of the function (segment curve) can also
be used for calculating moments
• 2nd moment gives spread around mean (variance)
• 3rd moment gives symmetry around mean (skewness)
28
Statistical Moments
Topological descriptors
Regional descriptors
• Topology = The study of the properties of
a figure that are unaffected by any
deformation
• Topological descriptors
• Number of holes in a region, H
• Number of connected components, C
• Euler number, E = C – H
A B
31
Topological descriptors
Regional descriptors
IR image Thresholded
image
Largest Skeleton
connected
component
32
Texture
Regional descriptors
Texture
Co-occurrence matrix
Regional descriptors
Co-occurrence Matrix
38
• Uniformity
• Entropy (randomness)
39
Co-occurrence Matrix
• Example 1
• Maximum probability = 1/3
• Uniformity ≈ 0.264
• Entropy ≈ undefined
40
Co-occurrence Matrix
• Example 2
• Maximum probability = 1/3
• Uniformity ≈ 0.167
• Entropy ≈ 2.918
41
Co-occurrence Matrix
Spectral Texture
Regional descriptors
Spectral Analysis
Regional descriptors
44
Spectral Analysis
S(r) S(θ)
45
Moment Invariants
Regional descriptors
for p, q = 0,1,2,…
where
46
Moment Invariants
• If f(x,y) is a digital image, the central moments become
Moment Invariants
Matlab code
m = [0 0];
Sigma = [3 2;2 2]; R = chol(Sigma);
z = repmat(m,1000,1) + randn(1000,2)*R;
c=cov(z);
figure,scatter(z(:,1),z(:,2),'.');
c=cov(z);
[E,D]=eig(c)
figure,scatter(z(:,1),z(:,2),'.');
hold on
quiver(0,0,E(1,1),E(2,1),'r','LineWidth',4);
axis('equal');
hold on
quiver(0,0,E(1,2),E(2,2),'r','LineWidth',4);
axis('equal');
[E,D]=eig(c)
[pc score latent]=princomp(z);
figure,scatter(score(:,1),score(:,2),'.');
axis('equal');
51
= w1 + w2 + w3
http://www.mathworks.co.uk/matlabcentral/fileexchange/
17032-pca-based-face-recognition-system
53
Conclusion
• Boundary representation (chain code, polygonal,
signature, convex hull)
• Shape represent (skeleton)
• Boundary descriptor (Fourier descriptor , statistical
descriptor)
• Regional descriptor (Histogram, Texture )
• PCA