440 likes | 457 Views
2005-11-21 Weekly Seminar Kaisuke Nakajima. Finding Perceptually Closed Paths in Sketches and Drawings. Eric Saund (PARC) IEEE Transactions on Pattern Analysis and Machine Intelligence, April 2003. Why this paper?. Technique developed for ScanScribe Let’s read papers from other areas :).
E N D
2005-11-21 Weekly Seminar Kaisuke Nakajima Finding Perceptually Closed Paths in Sketches and Drawings Eric Saund (PARC) IEEE Transactions on Pattern Analysis and Machine Intelligence, April 2003
Why this paper? • Technique developed for ScanScribe • Let’s read papers from other areas :) Eric Saund, David Fleet, Daniel Larner, James Mahoney (PARC). Perceptually-Supported Image Editing of Text and Graphics. In Proc. UIST 2003 (Best Paper).
Outline • Introduction • Previous work • Phenomenon & goals • Algorithm • Results • Summary
Motivation • Intelligent operations for graphical data • Closed paths: meaningful structure
Even in abstract figures… • We find some structure. • Connection with physical world: not necessary
Salient Not salient This paper proposes… • Algorithm to find perceptually salient closed paths • Input: curve fragments • Output: closed paths
Challenges & ideas (1/2) • What is “perceptually salient”? Smooth continuation Maximally turning
Challenges & ideas (2/2) • Exponential number of candidate paths Bidirectional best-first search
Outline • Introduction • Previous work • Phenomenon & goals • Algorithm • Results • Summary
Previous work (1/2) • Early work in Computer Vision • Tried to find • Local rotational symmetries [Fleck 1986] • Local convexities [Mohan and Nevaita 1992] • Partial circular regions [Saund 1992] • For • Detecting buildings in aerial images • Etc.
Previous work (2/2) • More recent approach: graph search • Strictly convex groups in line segments • [Huttenlocher and Wayner 1992] • Strictly convex paths • [Jacobs 1996] • Continuation of paths • [Elder and Zucker 1996] • But… • Too strict • Not suited for sketches & drawings
Outline • Introduction • Previous work • Phenomenon & goals • Algorithm • Results • Summary
Before designing an algorithm… • Basically: closure: distinguish “inside” & “outside” • But: constrain the problem! (target figures)
OK Of course! OK Gaps: clear to fill Target & non-target figures (1/6)
Target & non-target figures (2/6) • NG • Gaps: not clear to fill • NG • Contours: locally discontinuous / noisy Image-level preprocess
OK Slightly concave NG Dominated by concavity Not immediately clear whether closed or not Target & non-target figures (3/6)
OK Some open end NG Too open… Target & non-target figures (4/6)
Target & non-target figures (5/6) • OK • Multiple paths can share contours
Target & non-target figures (6/6) • OK • Clutters are disruptive, though…
Requirements for the algorithm • Find nearly closed paths • Allow gaps & clutters • Allow concavity • Allow local misleading branches • Allow multiple paths sharing common contour • Efficiently find small subset of exponential paths
Outline • Introduction • Previous work • Phenomenon & goals • Algorithm • Results • Summary
Algorithm: Topics • Preparation • Junction graph • Closed path quality criteria • Bidirectional best-first search
Junction graph • Make the data manageable! • Node: endpoints of curve fragments • Edge: possible links among fragment endpoints • Adaptive clustering • Transitive closure
Closed path quality criteria (1/3) • While extending the paths… • Evaluate each path • Select the path to extend next
Closed path quality criteria (2/3) • Local junction preferences • When extending a path, multiply a preference score • 1 = best … 0 = worst
Closed path quality criteria (3/3) • Global figural goodness = product of • Compactness = (area of figure) / (area of convex hull) • Endpoint distance = 1 – d/p • Non-end-nearest-approach = min[1, a / (d – p/c)] • 1 = best … 0 = worst
Bidirectional best-first search (1/2) main: for each curve fragment seed for each config in {{smooth, max-turn}×{CW, CCW}} search(seed, config)
Bidirectional best-first search (2/2) search(seed, config): Q: priority queue Q (two endpoints of seed, with goodness 1) while (goodness of best node of Q > threshold) pop best node of Q u for each node v in opposite side if (global goodness of path(u, v) > threshold) add path(u, v) to result generate children of u Q return result
Seed selection & elimination (1/2) • Basically: • Paths found: redundant! main: for each curve fragment seed for each config in {{smooth, max-turn}×{CW, CCW}} search(seed, config)
Seed selection & elimination (2/2) • Mark fragments used in paths found Used in smooth-CCW!
Candidate consolidation (1/2) • Paths found: redundant! smooth-CCW smooth-CW
Candidate consolidation (2/2) • Cluster similar paths • Oriented bounding box (5D vector) • Orientation (1D) • Coordinate of the center (2D) • Width & height (2D)
Outline • Introduction • Previous work • Phenomenon & goals • Algorithm • Results • Summary
Performance tested with • Java implementation • Pentium 700 MHz
Results (1/4) – whiteboard sketch • 702 curve fragments 125 closed paths • 8 seconds
Results (2/4) – photo contours • 534 curve fragments 169 closed paths • 6 seconds
Results (3/4) – line art • 265 curve fragments 73 closed paths
Results (4/4) – engineering drawing • 409 curve fragments 126 closed paths • 7 seconds
Outline • Introduction • Previous work • Phenomenon & goals • Algorithm • Results • Summary
Paper summary • Algorithm for finding perceptually closed paths • Contributions • Smooth continuation & maximally turning • Bidirectional best-first search
(For sketch beautification) • Stroke ≠ meaningful structure • Find closed paths infer constraints • Symmetry etc.