ECE533 Final Project 1/19 Robust and efficient 2D Skeleton Shape Representation using Shock Graphs Chung, In Young Lee, Kang Eui 1. Introduction An important approach to representing the structural shape of a plane region is to reduce it to a graph. This reduction may be accomplished by obtaining the ‘skeleton’ of the region via a thinning (or skeletonizing) algorithm. There have been lots of algorithms on obtaining skeleton. However, there are some drawbacks in the performance and time complexities of these algorithms [1]. There has recently been significant interest in using representations based on abstractions of Blum’s skeleton into a graph for qualitative shape matching. The application of these techniques to large databases of shapes hinges on the availability of numerical algorithms for computing the medial axis. Unfortunately, this computation can be extremely subtle [2]. Approaches based on Voronoi techniques preserve topology, but heuristic pruning measures are introduced to remove unwanted edges. Methods based on Euclidean distance functions can localize skeletal points accurately, but often at the cost of altering the object’s topology [3]. The new algorithm for computing subpixel skeletons which is robust and accurate, has low computational complexity, and preserves topology has been proposed by P. Dimitrov, C. Phillips and K. Siddiqi. The key idea is to measure the net outward flux of a vector field per unit area, and to detect locations where a conservation of energy principle is violated. This is done in conjunction with a thinning process applied in a rectangular lattice. However, there are, also, some disadvantages in this algorithm [2]. In this project, we attempt to modify and advance this algorithm and define a new one using Shock Graphs. In this report, we implement the new method proposed by P. Dimitrov, C. Phillips and K. Siddiqi and compare its result with that of Blum’s method
19
Embed
ECE533 Project Report - CAE Usershomepages.cae.wisc.edu/~ece533/project/f05/chungleerpt.pdf · The essential idea of the new algorithm for skeletonizing is to combine a divergence
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
ECE533 Final Project 1/19
Robust and efficient 2D Skeleton Shape Representation
using Shock Graphs
Chung, In Young Lee, Kang Eui
1. Introduction
An important approach to representing the structural shape of a plane region is to reduce it to a graph. This reduction may be accomplished by obtaining the ‘skeleton’ of the
region via a thinning (or skeletonizing) algorithm. There have been lots of algorithms on obtaining skeleton. However, there are some drawbacks in the performance and time complexities of these algorithms [1].
There has recently been significant interest in using representations based on
abstractions of Blum’s skeleton into a graph for qualitative shape matching. The application of these techniques to large databases of shapes hinges on the availability of numerical algorithms for computing the medial axis. Unfortunately, this computation can be extremely subtle [2].
Approaches based on Voronoi techniques preserve topology, but heuristic pruning
measures are introduced to remove unwanted edges. Methods based on Euclidean distance functions can localize skeletal points accurately, but often at the cost of altering the object’s topology [3].
The new algorithm for computing subpixel skeletons which is robust and accurate, has
low computational complexity, and preserves topology has been proposed by P. Dimitrov, C. Phillips and K. Siddiqi. The key idea is to measure the net outward flux of a vector field per unit area, and to detect locations where a conservation of energy principle is violated. This is done in conjunction with a thinning process applied in a rectangular lattice. However, there are, also,
some disadvantages in this algorithm [2]. In this project, we attempt to modify and advance this algorithm and define a new one using Shock Graphs. In this report, we implement the new method proposed by P. Dimitrov, C. Phillips and K. Siddiqi and compare its result with that of Blum’s method
ECE533 Final Project 2/19
2. Approach and Work Performed
A. Blum’s method
In recent years there has been significant interest in using graph-based abstractions of
Blum’s skeleton for qualitative shape recognition [4]. The application of such methods to large image databases hinges on the availability of robust and efficient algorithms for computing the medial axis, or approximations to it. Blum proposed that the skeleton of a region may be defined via the medial axis
transformation (MAT). The MAT of a region R with border B is as follows. For each point P in R, we find its closest neighbor in B. If p has more than one of closest depend on the definition of a distance. The MAT of a region has an intuitive definition based on the so-called “prairie fire
concept.” Consider an image region as a prairie of uniform, dry grass and suppose that a fire is lit along ints border. All fire fronts will advance into the region at the same speed. The MAT of the region is the set of points reached by more than one fire front at the same time [1]. Following figure shows the resulted skeleton image using Blum’s method.
(a) Original image
ECE533 Final Project 3/19
(b) Resulted Skeleton image using Blum’s method
Figure 1. (a) shows the original image and the bottom one (b) shows the resulted image.
B. New method
a. Euclidean Distance Transformation (EDT)
The Euclidean distance between the points p and q with their coordinates ),( ),,( tsyx , respectively, is defined as [1]
21
22 ])()[(),( tysxqpD −+−=
b. Computing Vector Field.
Consider Blum’s grassfire flow
NtC=
∂∂
acting on a 2D closed curve C, such that each point on its boundary is moving with
unit speed in the direction of the inward normal N. This formulation leads to a Hamilton-Jacobi equation on the Euclidean distance function to the initial curve [12]. In physics, such equations are typically solved by looking at the evolution of the phase space of the equivalent Hamiltonian system. Since Hamiltonian systems are
conservative, the locus of skeletal points coincides with locations where a conservation of energy principle is violated. This loss of energy can be used to formulate a natural criterion for detecting singularities of the distance function.
ECE533 Final Project 4/19
More specifically, let D be the Euclidean distance function to the initial curve C0. The
magnitude of its gradient D∇ is identical to 1 in its smooth regime.
With ),(),,( yx DDpyxq == , the Hamiltonian system is given by
),( ),0 ,0( yx DDpHq
qHp −=
∂∂
==∂∂
−=
with an associated Hamiltonian function 21
22 )1( yx DDH +−= [12]. It is
straightforward to show that all Hamiltonian systems are conservative and hence divergence free. Conversely, when trajectories of the system intersect, a conservation of energy principle is violated. This suggests a natural approach for detecting the skeleton: compute the divergence of the gradient vector field q and detect locations
where it is not zero [2].
Figure 2. Computed vector field
ECE533 Final Project 5/19
c. Computing Divergence (Flux)
The divergence is defined as the net outward flux per unit area, as the area about the point shrinks to zero:
a
dlNqqdiv L
a Δ
<≡ ∫
→Δ
),lim)(
0
Here aΔ is the area, L is its bounding contour and N is the outward normal at each point on the contour. Via the divergence theorem
∫ ∫ ><=a L
dlNqdaqdiv ,)(
In other words, the integral of the divergence of the vector field within a finite area gives the net outward flux through the contour which bounds it. Locations where the flux is negative, and hence energy is lost, correspond to sinks or
skeletal points of the interior. Similarly, locations where the flux is positive correspond to sources or skeletal points of the exterior [2].
ECE533 Final Project 6/19
Figure 3. Computed Flux
ECE533 Final Project 7/19
d. Thinning
Some definitions
Removable point; A point can be removed if and only if its 3x3 neighborhood graph, with cycles of length 3 removed, is a tree. A straightforward way of determining
whether or not a graph is a tree is to check that its Euler characteristic EV − (the
number of vertices minus the number of edges) is identical to 1.
Figure 4. Example of a ‘tree’
End point; A point could be an end point of a 1 pixel thick digital curve if, in a 3x3 neighborhood, it has a single neighbor, or it has two neighbors, both of which are 4-adjacent to one another.
Figure 5. Example of an ‘end point’
The thinning process can be made very efficient by observing that a point within the
object which does not have at least one background point as an immediate neighbor cannot be removed, since this would create a hole. Therefore, the only potentially removable points are on the border of the object. Once a border point is removed, only
1
1
1
11
00
0 P
P P
ECE533 Final Project 8/19
its neighbors may become removable. This suggests the implementation of the thinning
process using a heap [2].
Algorithm
Algorithm 1. Thinning algorithm
FOR each border point P
IF (P is removable)
Insert(P,Heap) with Flux(P)
END {For}
WHILE (Heap.size>0)
P=MaxHeapExtract(Heap)
IF (P is removable)
IF P is not an end point || Flux(P)>T
remove(P, Heap)
FOR each neighbor, Q of P
IF (Q is removable)
Insert(Q, Heap)
END {FOR}
ELSE
Mark P as a Skeletal Point
END {WHILE}
ECE533 Final Project 9/19
(a) Original image
(b) Resulted subtle Skeleton image using divergence
(Threshold = -0.3)
(c) Resulted Skeleton image using new algorithm
Figure 6. Original and Resulted Skeleton image
ECE533 Final Project 10/19
3. Results
(a) Resulted Skeleton image using Blum’s method
(b) Resulted Skeleton image using new algorithm
Figure 7. Comparison of the skeleton images using Blum’s and new method
Figure 7 shows the results of the skeleton images. As can be seen in the figure 7 a), some edges are lost and some topology has been changed. Red rectangle which located in the left upper side of the image (a) represents the change in the topology. The right representation of the topology is shown in the image (b). Also, the red box in the right side of the image (b)
shows unfinished edge and this is modified in the new algorithm. However, in the result of the new algorithm, there is also incorrect result and that is unfinished edge which is located in the ear part of the rabbit.
ECE533 Final Project 11/19
4. Discussion
The essential idea of the new algorithm for skeletonizing is to combine a divergence computation on the gradient vector field of the Euclidean distance function with a thinning process that preserves topology. The identification of end points and branch points allows the
result to be interpreted as a graph. The digital skeleton is then shifted to be within arbitrary precision of the “true” skeleton. However, , whereas results of this algorithm are good, there is one problem that should be solved. That is choice of the threshold is not obvious.
5. References [1] Rafael C. Gonzalez, Richard E. Woods, Digital Image Processing, 2E, Prentice Hall. [2] K. Siddiqi, A. Shokoufandeh, S. J. Dickinson, and S. W. Zucker, Shock graphs and shape
matching. International Journal of Computer Vision, 35(1):13–32, 1999. [3] R. L. Ogniewicz. Discrete Voronoi Skeletons. Hartung-Gorre, 1993. [4] T.-L. Liu, D. Geiger, and R. V. Kohn. Representation and self-similarity of shapes. In Sixth
International Conference on Computer Vision, 1998.
[5] P. Dimitrov, C. Phillips and K. Siddiqi , Robust and Efficient Skeletal Graphs, Proc. Computer Vision and Pattern Recognition Conf., Vol. 1, 2000, 417-423.