Edge Graph Based Volume Segmentation for 3D

Edge Graph Based Volume Segmentation
for 3D Geometries for Isogeometric Analysis
Bert Jüttler, Mario Kapl, Dang Manh Nguyen and Qing Pan
Institute of Applied Geometry
Johannes Kepler University, Linz, Austria
ITN Workshop
February 4 - 6, 2013, Valencia, Spain
Volume Segmentation
Motivation
Edge graph based volume segmentation algorithm for
3D geometries with sharp features.
◮
◮
Step 1: Construction of the edge graph of the solid
Step 2: Subdivision of the edge graph
◮
◮
◮
Step 2.1: Removing non-convex edges → Part II
Step 2.2: Decomposing the convex subgraphs → Part I
Step 3: Subdivision of the ’real solid’
Volume Segmentation
Outline
Part I - Edge graph segmentation for solids with convex edges
Solid subdivision algorithm
Theoretical background
Cost-based subdivision algorithm
Examples
Part II - Edge graph segmentation for solids with non-convex edges
Conclusion and future work
Volume Segmentation
Outline
Part I - Edge graph segmentation for solids with convex edges
Solid subdivision algorithm
Theoretical background
Cost-based subdivision algorithm
Examples
Part II - Edge graph segmentation for solids with non-convex edges
Conclusion and future work
Volume Segmentation
Motivation - Part I
◮
◮
Input: Edge graph of a 3D solid (i.e. a graph given by faces,
edges, vertices)
Assumption:
◮
◮
◮
All edges are convex
Graph is 3-vertex-connected
A graph is 3-vertex-connected if by deleting any set of fewer
than 3-vertices the graph remains connected.
Volume Segmentation
Motivation - Part I
◮
◮
Input: Edge graph of a 3D solid (i.e. a graph given by faces,
edges, vertices)
Assumption:
◮
◮
◮
All edges are convex
Graph is 3-vertex-connected
Output: Segmentation of the edge graph into a collection of
subgraphs which are topological hexahedra.
Volume Segmentation
Subdivision algorithm
◮
Idea:
◮
◮
◮
Decomposition of the edge graph into two smaller subgraphs
with the help of a cutting loop and a cutting surface.
Repeat this segmentation for each subgraph until each
subgraph is a predefined base-case.
Cutting tools:
◮
Volume Segmentation
Cutting loop: A simple closed loop of existing or auxiliary
edges which are on different faces.
Subdivision algorithm
◮
Idea:
◮
◮
◮
Decomposition of the edge graph into two smaller subgraphs
with the help of a cutting loop and a cutting surface.
Repeat this segmentation for each subgraph until each
subgraph is a predefined base-case.
Cutting tools:
◮
Volume Segmentation
Auxiliary edge: An additional edge connecting two
non-adjacient vertices on the same face.
Subdivision algorithm
◮
Idea:
◮
◮
◮
Decomposition of the edge graph into two smaller subgraphs
with the help of a cutting loop and a cutting surface.
Repeat this segmentation for each subgraph until each
subgraph is a predefined base-case.
Cutting tools:
◮
Volume Segmentation
Cutting surface: A polygonal surface patch whose boundary
curves are the existing or auxiliary edges of the cutting loop. A
newly created surface patch inside the solid.
Base cases (Base solids)
◮
4 types of base cases.
hexahedron
◮
tetrahedron
pyramid
prism
Each base case can be easily represented by a mesh of
topological hexahedra.
Volume Segmentation
Subdivision algorithm - Pseudo code
Algorithm Subdivision of the edge graph
1: procedure Subdivide(graph G)
2:
if G is a base case then
3:
return G
4:
else
5:
find all possible cutting loops
6:
choose a cutting loop
7:
decompose G into subgraphs G1 and G2
8:
return Subdivide(G1 ) and Subdivide(G2 )
9:
end if
10: end procedure
Volume Segmentation
Subdivision algorithm - Questions
◮
Does a cutting loop always exist?
◮
Does the subdivision algorithm terminate?
◮
Which cutting loop should be chosen in each step?
Volume Segmentation
Outline
Part I - Edge graph segmentation for solids with convex edges
Solid subdivision algorithm
Theoretical background
Cost-based subdivision algorithm
Examples
Part II - Edge graph segmentation for solids with non-convex edges
Conclusion and future work
Volume Segmentation
Theoretical background
Assumption
We consider an edge graph which is 3-vertex-connected, has only
convex edges and is not a tetrahedron.
Lemma
We have at least one cutting loop for the edge graph.
Lemma
The edge graph can be segmented without adding new vertices into
two new subgraphs with a decreased number of vertices compared
to the original edge graph. In addition, the number of edges of the
subgraphs will be smaller equal than of the original edge graph.
Volume Segmentation
Theoretical background
Assumption
We consider an edge graph which is 3-vertex-connected and has
only convex edges.
Theorem
The edge graph can be segmented without adding new vertices
into a collection of predefined base solids.
Corollary
The edge graph can be segmented into a mesh of topological
hexahehedra.
Proof Idea: Because of the assumption the edge graph can be
considered as a convex polyhedron.
Volume Segmentation
Outline
Part I - Edge graph segmentation for solids with convex edges
Solid subdivision algorithm
Theoretical background
Cost-based subdivision algorithm
Examples
Part II - Edge graph segmentation for solids with non-convex edges
Conclusion and future work
Volume Segmentation
Subdivision algorithm - Reminder
Algorithm Subdivision of the edge graph
1: procedure Subdivide(graph G)
2:
if G is a base case then
3:
return G
4:
else
5:
find all possible cutting loops
choose a cutting loop
⊲ Which loop?
6:
7:
decompose G into subgraphs G1 and G2
8:
return Subdivide(G1 ) and Subdivide(G2 )
9:
end if
10: end procedure
Volume Segmentation
Selection of the cutting loop
◮
Idea: We compute for each cutting loop a value V depending
on the length n and of the number of auxiliary edges m
V = w(n) − m ∗ p,
where w(n) is the value for a cutting loop of length n and p is
the ’penalty’ for an auxiliary edge.
◮
We choose a/the cutting loop with the highest value V .
◮
Example:
w(3)
50
Volume Segmentation
w(4)
100
w(5)
50
w(6)
80
w(7)
30
p
50
Cost based subdivision algorithm
Algorithm Subdivision of the edge graph
1: procedure Subdivide(graph G)
2:
if G is a base case then
3:
return G
4:
else
5:
find all possible cutting loops
compute for all cutting loops the value V
6:
7:
choose a/the cutting loop with the highest value V
8:
decompose G into subgraphs G1 and G2
9:
return Subdivide(G1 ) and Subdivide(G2 )
10:
end if
11: end procedure
Volume Segmentation
Outline
Part I - Edge graph segmentation for solids with convex edges
Solid subdivision algorithm
Theoretical background
Cost-based subdivision algorithm
Examples
Part II - Edge graph segmentation for solids with non-convex edges
Conclusion and future work
Volume Segmentation
Example 1
initial solid
edge graph
12
5
11
6
9
8
13
convex graph
Volume Segmentation
0
14
1
15
2
7
3
10
4
planar graph
Example 1 (50|100|100|100|100k0)
12
HE
1−1
5
11
6
9
0
PR
1−0
PR
8
1−2
1−4
13
decomposition
6
9
0
14
8
15
5
11
6
Volume Segmentation
12
5
11
6
1
2
15
13
(1-1)
3
4
10
(1-0)
12
7
13
2
7
HE
11
1
14
15
PY
10
(1-2)
15
2
2
3
4
13
10
(1-4)
4
Example 1 (50|100|150|200|250k50)
PR
2−8
PR
2−1
12
5
12
11
6
11
9
0
9
0
PR
2−0
HE
13
4
10
decomposition
12
5
11
6
11
6
1
1
2
10
(2-2)
Volume Segmentation
4
9
0
0
0
3
10
(2-1)
5
7
13
(2-0)
12
15
15
3
7
2−4
1
14
8
2
15
PR
2−2
1
14
8
PR
8
15
2
15
10
(2-4)
4
14
13
10
(2-8)
1
Example 1 (50|100|50|80|30k50)
PR
HE
3−1
12
5
11
6
9
0
3−4
3−0
PR
14
8
HE
2
7
3
13
10
decomposition
8
13
4
(3-0)
12
5
12
5
11
6
11
6
9
0
9
0
14
10
(3-1)
Volume Segmentation
1
15
1
1
8
4
4
13
(3-4)
Example 1
Volume Segmentation
Example 2
initial solid
6
8
4
2
0
12
14
edge graph
Volume Segmentation
9
11
10
13
7
5
3
1
planar graph
15
Example 2 (50|100|100|100|100k0)
TE
1−11
1−5
TE
TE
PR
1−4
PR
2
0
12
TE
14
9
5
1
3
9
12
15
14
12
15
5
11
10
13
7
9
8
11
10
13
7
4
6
8
11
10
1−7
1−0
4
6
8
PY
1−6
1−1
14
13
7
15
5
HE
decomposition
9
8
(1-0)
8
8
12
14
7
5
(1-5)
Volume Segmentation
15
11
13
15
(1-6)
9
11
13
7
(1-4)
8
11
10
11
(1-1)
14
15
7
5
(1-7)
(1-11)
15
Example 2 (50|100|150|200|250k50)
PR
2−8
TE
PR
PR
2−2
2
0
8
15
14
13
12
14
PR
9
6
4
2
0
5
3
1
9
11
10
PR
2−4
2−0
4
6
8
2−10
2−3
7
5
1
3
13
12
7
15
PR
decomposition
4
2
0
9
(2-0)
6
8
4
(2-2)
9
4
2
0
5
3
1
9
4
2
0
9
13
12
13
14
14
7
5
3
(2-3)
Volume Segmentation
1
15
13
13
7
(2-4)
(2-8)
15
1
(2-10)
15
Example 2 (50|100|50|80|30k50)
HE
3−2
HE
3−0
HE
decomposition
6
8
4
2
0
10
7
5
3
(3-0)
Volume Segmentation
8
15
14
13
12
14
9
6
4
2
0
9
11
1
13
12
7
5
3
(3-2)
1
15
Example 2
Volume Segmentation
Outline
Part I - Edge graph segmentation for solids with convex edges
Solid subdivision algorithm
Theoretical background
Cost-based subdivision algorithm
Examples
Part II - Edge graph segmentation for solids with non-convex edges
Conclusion and future work
Volume Segmentation
Motivation - Part II
◮
Why do we consider non-convex edges as a special case?
Volume Segmentation
Motivation - Part II
◮
Why do we consider non-convex edges as a special case?
A spline patch with a non-convex edge is always irregular
Volume Segmentation
Motivation - Part II
◮
Why do we consider non-convex edges as a special case?
A spline patch with a non-convex edge is always irregular
◮
Idea: Segment the solid along non-convex edges until no
non-convex edges exist.
Volume Segmentation
Non-unique solution
Volume Segmentation
Non-unique solution
Volume Segmentation
Non-unique solution
Volume Segmentation
Non-unique solution
Volume Segmentation
Non-unique solution
We define a cost function to select cutting loops


0 if e is a non-convex edge



1 if e is a convex edge
c(e) =

50 if e is an auxiliary edge



+∞ otherwise
Volume Segmentation
Shortest path problem
◮
Given a connected graph G = (V, E, c), where V is the set of
vertices, E is the set of (existing and auxiliary) edges and c is
the cost function.
◮
Assume: The graph is 3-vertex-connected.
◮
Find the shortest path connecting two given vertices v1 and
v2 , i.e.
X
min
ne c(e)
ne ∈{0,1}, e∈E
such that
Volume Segmentation
e∈E
{e ∈ E, ne = 1} forms a path between v1 and v2 .
Avoiding ”irregular” cutting loops
trivial
Volume Segmentation
Avoiding ”irregular” cutting loops
trivial
Volume Segmentation
invalid
Avoiding ”irregular” cutting loops
trivial
Volume Segmentation
invalid
non-planar
Avoiding ”irregular” cutting loops
trivial
invalid
non-planar
Proposition
If a non-trivial cutting loop of a polyhedron contains 2 edges of the
same face, then the convex hull of the vertices of the cutting loop
is not planar.
Volume Segmentation
Avoiding ”irregular” cutting loops
trivial
invalid
non-planar
Proposition
If a non-trivial cutting loop of a polyhedron contains 2 edges of the
same face, then the convex hull of the vertices of the cutting loop
is not planar.
Strategy: Only find cutting loops passing different faces. From
now on, by a cutting loop we mean a loop passing different faces.
Volume Segmentation
Existence of cutting loops
Proposition
Let V1 and V2 be the two sets of vertices of the two faces incident
to an edge {v1 , v2 }. Then there exists a cutting loop passing
{v1 , v2 } iff there is no edge connecting one vertex in V1 \{v1 , v2 }
and another in V2 \{v1 , v2 }.
Volume Segmentation
Existence of cutting loops
Proposition
Let V1 and V2 be the two sets of vertices of the two faces incident
to an edge {v1 , v2 }. Then there exists a cutting loop passing
{v1 , v2 } iff there is no edge connecting one vertex in V1 \{v1 , v2 }
and another in V2 \{v1 , v2 }.
Volume Segmentation
Existence of cutting loops
Proposition
Let V1 and V2 be the two sets of vertices of the two faces incident
to an edge {v1 , v2 }. Then there exists a cutting loop passing
{v1 , v2 } iff there is no edge connecting one vertex in V1 \{v1 , v2 }
and another in V2 \{v1 , v2 }.
Volume Segmentation
Existence of cutting loops
Proposition
Let V1 and V2 be the two sets of vertices of the two faces incident
to an edge {v1 , v2 }. Then there exists a cutting loop passing
{v1 , v2 } iff there is no edge connecting one vertex in V1 \{v1 , v2 }
and another in V2 \{v1 , v2 }.
Volume Segmentation
Geometric criteria: Curvature of an auxiliary edge
Volume Segmentation
Geometric criteria: Curvature of an auxiliary edge
Volume Segmentation
Geometric criteria: Curvature of an auxiliary edge
Volume Segmentation
Geometric criteria: Curvature of an auxiliary edge
Volume Segmentation
Geometric criteria: Curvature of an auxiliary edge
We modify the cost function to find a cutting loop with less curved
auxiliary edges


0
if e is a non-convex edge



1
if e is a convex edge
c(e) =

if e is an auxiliary edge
50 + angle discrepancy



+∞
otherwise
Volume Segmentation
Geometric criteria: Planarity of a cutting loop
Volume Segmentation
Geometric criteria: Planarity of a cutting loop
min
ne ∈{0,1}, e∈E
X
ne c(e)
e∈E
such that {e ∈ E, ne = 1} forms a path between v1 and v2
∀e1 , e2 ∈ E : ne1 = ne2 = 1, e1 and e2 are on diff. faces
Volume Segmentation
Geometric criteria: Planarity of a cutting loop
min
ne ∈{0,1}, e∈E
X
ne c(e)
e∈E
such that {e ∈ E, ne = 1} forms a path between v1 and v2
∀e1 , e2 ∈ E : ne1 = ne2 = 1, e1 and e2 are on diff. faces
Volume Segmentation
Geometric criteria: Planarity of a cutting loop
min
ne ∈{0,1}, e∈E
X
ne c(e)+fp (E, {ne , e ∈ E})
e∈E
such that {e ∈ E, ne = 1} forms a path between v1 and v2
∀e1 , e2 ∈ E : ne1 = ne2 = 1, e1 and e2 are on diff. faces
Volume Segmentation
Geometric criteria: Planarity of a cutting loop
min
ne ∈{0,1}, e∈E
X
ne c(e)+fp (E, {ne , e ∈ E})
e∈E
such that {e ∈ E, ne = 1} forms a path between v1 and v2
∀e1 , e2 ∈ E : ne1 = ne2 = 1, e1 and e2 are on diff. faces
Volume Segmentation
Resulting constrained minimization problem
min
ne ∈{0,1}, e∈E
X
ne c(e) + fp (E, {ne , e ∈ E})
e∈E
such that {e ∈ E, ne = 1} forms a path between v1 and v2
∀e1 , e2 ∈ E : ne1 = ne2 = 1, e1 and e2 are on diff. faces
where the cost function is given as


0



1
c(e) =
50 + angle discrepancy



+∞
Volume Segmentation
if e is a non-convex edge
if e is a convex edge
if e is an auxiliary edge
otherwise
Dijkstra algorithm
Find the shortest path connecting two given vertices v1 and v2 of a
graph G = (V, E, c).
Volume Segmentation
Dijkstra algorithm
procedure search(graph (V, E, c), vertices v1 and v2 )
T = V \{v1}
3:
Define a distance array d(v1, v) = c({v1, v}) for all v ∈ V
4:
while T 6= ∅ do
5:
Search for the vertex t ∈ T s.t. d(v1, t) = min d(v1, v)
1:
2:
v∈T
6:
7:
8:
9:
10:
11:
12:
for v in T \{t} do
if d(v1, v) > d(v1, t) + c(t, v)
then
d(v1, v) := d(v1, t)+c(t, v)
end if
end for
end while
end procedure
Volume Segmentation
Adaptive constrained Dijkstra algorithm
procedure search(graph (V, E, c), vertices v1 and v2 )
T = V \{v1}
3:
Define a distance array d(v1, v) = c({v1, v}) for all v ∈ V
4:
while T 6= ∅ do
5:
Search for the vertex t ∈ T s.t. d(v1, t) = min d(v1, v)
1:
2:
v∈T
6:
7:
8:
9:
10:
11:
12:
for v in T \{t} do
if d(v1, v) > d(v1, t) + c(t, v) and edges connecting
v1 to v are on different faces then
d(v1, v) := d(v1, t)+c(t, v)
end if
end for
end while
end procedure
Volume Segmentation
Adaptive constrained Dijkstra algorithm
procedure search(graph (V, E, c), vertices v1 and v2 )
T = V \{v1}
3:
Define a distance array d(v1, v) = c({v1, v}) for all v ∈ V
4:
while T 6= ∅ do
5:
Search for the vertex t ∈ T s.t. d(v1, t) = min d(v1, v)
1:
2:
v∈T
6:
7:
8:
9:
10:
11:
12:
for v in T \{t} do
if d(v1, v) > d(v1, t) + c(t, v) and edges connecting
v1 to v are on different faces then
d(v1, v) := d(v1, t)+c(t, v)+fp (E, edges con. v1 to v)
end if
end for
end while
end procedure
Volume Segmentation
Adaptive constrained Dijkstra algorithm
Proposition
The adaptive constrained Dijkstra algorithm solves the constrained
minimization problem.
Volume Segmentation
Main result
n-nonconvex vertex: A vertex at which n non-convex edges meet.
Volume Segmentation
Main result
n-nonconvex vertex: A vertex at which n non-convex edges meet.
Theorem
◮
There exists a cutting loop which passes a n-nonconvex vertex
with n ≥ 3 and a non-convex edge incident to the vertex that
splits the solid into sub-solids with the vertex being a
m-nonconvex where m < n.
Volume Segmentation
Main result
n-nonconvex vertex: A vertex at which n non-convex edges meet.
Theorem
◮
There exists a cutting loop which passes a n-nonconvex vertex
with n ≥ 3 and a non-convex edge incident to the vertex that
splits the solid into sub-solids with the vertex being a
m-nonconvex where m < n.
◮
If all n-nonconvex vertices have n ≤ 2, then there exists a
cutting loop which subdivides the solid into sub-solids with
less numbers of non-convex edges and with less numbers of
edges.
Volume Segmentation
Outline
Part I - Edge graph segmentation for solids with convex edges
Solid subdivision algorithm
Theoretical background
Cost-based subdivision algorithm
Examples
Part II - Edge graph segmentation for solids with non-convex edges
Conclusion and future work
Volume Segmentation
Conclusion and future work
◮
We have presented an edge graph segmentation for solids with
convex and non-convex edges.
◮
Based on combinatorial and geometric criteria.
◮
Convex edges: An implemented algorithm has been
presented.
◮
Non-convex edges: First promising results → ongoing
work.
◮
Future work: Implementation of the cutting loop and cutting
surface on the ’real solid’.
Volume Segmentation