Download presentation
Presentation is loading. Please wait.
Published byEzra Blair Modified over 9 years ago
1
Contour Stitching Introduction to Algorithms Contour Stitching CSE 680 Prof. Roger Crawfis
2
Contour Stitching Problem: Given: 2 two-dimensional closed curves Curve #1 has m points Curve #2 has n points Which point(s) does vertex i on curve one correspond to on curve two? How many possible triangulations are there? ?? i
3
A Solution Fuchs, et. al. Optimization problem 1 stitch consists of: 2 spans between curves 1 contour segment Triangles of {P i,Q j,P i+1 } or {Q j+1,P i,Q j } Consistent normal directions PiPi P i+1 QjQj
4
Fuchs, et. al. Left span P i Q j => go up Right span (either) P i+1 Q j => go down P i Q j+1 => go down
5
Fuchs, et. al. Constraints Each contour segment is used once and only once. If a span appears as a left span, then it must also appear as a right span. If a span appears as a right span, then it must also appear as a left span.
6
Fuchs, et. al. This produces an acceptable surface (from a topological point of view) No holes We would like an optimal one in some sense.
7
Fuchs et. al. Graph problem Vertices V ij = span between P i and Q j Edges are constructed from a left span to a right span. Only two valid right spans for a left span. PiPiPiPi QjQjQjQj Q j+1 P i+1
8
Fuchs, et. al. Organize these edges as a grid or matrix. P Q i j P i Q j P i+1 Q j P i Q j+1 ?
9
Fuchs, et. al. Acceptable graphs Exactly one vertical arc between P i and P i+1 Exactly one horiz. arc between Q j and Q j+1 Either indegree(V ij ) = outdegree(V ij ) = 0 both > 0 (if a right, also has to be a left)
10
Fuchs, et. al. Claim: An acceptable graph, S, is weakly connected. Lemma 2 Only 0 or 1 vertex of S has an indegree = 2. E.g., Two cones touching in the center. All other vertices have indegree=1 (recall indegree = outdegree)
11
Fuchs, et. al. Thereom 1: S is an acceptable surface if and only if: S has one and only one horizontal arc between adjacent columns. S has one and only one vertical arc between adjacent rows. S is Eulerian closed walk with every arc only once. PQ i j P i Q j P i+1 Q j P i Q j+1
12
Fuchs, et. al. Number of arcs is thus m+n. Many possible solutions still!!! Associate costs with each edge Area of resulting triangle Aspect ratio of resulting triangle
13
Fuchs, et. al. Note that V i0 is in S for some i. Note that V 0j is in S for some j. With the weights (costs), we can compute the minimum path from a starting node V i0. Since we do not know which V i0, we compute the paths for all of them and take the minimum. Some cost saving are achievable.
14
Fuchs, et. al. Note, that once a search hits the optimal path, it will not cross it, it must follow it.
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.