1 / 36

Rectilinear Pattern Recognition

Rectilinear Pattern Recognition. Dan J. Nardi Masters Thesis April 11, 2003. Index of Topics. Introduction of Problem Target & Chip Model Algorithms Overlay Search Breadth-first vs. Depth-first Graph Model Recursion for ‘deep compare’ Conclusion. Introduction of Problem.

tao
Download Presentation

Rectilinear Pattern Recognition

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Rectilinear Pattern Recognition Dan J. Nardi Masters Thesis April 11, 2003

  2. Index of Topics • Introduction of Problem • Target & Chip Model • Algorithms • Overlay • Search • Breadth-first vs. Depth-first • Graph Model • Recursion for ‘deep compare’ • Conclusion

  3. Introduction of Problem • IBM needs help • Need algorithm to find all occurrences of a simple pattern within larger pattern • Data describes geometric layout • Uses only rectilinear shapes

  4. Target & Chip Model • Smaller pattern is our ‘target’

  5. Target & Chip Model • Larger pattern is our ‘chip’

  6. Algorithms • Program broken into two parts • Read in data and optimize (overlay) • Perform search (deep compare)

  7. Algorithms • Read data into appropriate data structures • Vertex table • Edge table • Face table • Shapes are on different layers that overlap • Needed to ‘flatten’ representation

  8. Overlay Algorithm • Have: • Want:

  9. Overlay Algorithm • We used the Plane Sweep Algorithm • Computational Geometry: Algorithms and Applications by M. de Berg et al [pages 20 – 38] • Start at highest horizontal edge • Go to next highest, and so on • Keep track of active vertical edges • Test for intersection(s)

  10. Plane Sweep Algorithm

  11. Plane Sweep Algorithm

  12. Intersection Found Plane Sweep Algorithm

  13. Intersection Found Plane Sweep Algorithm

  14. Plane Sweep Algorithm

  15. Overlay Algorithm get all horizontal edges and sort into list for each horizontal edge in list { remove inactive vertical edges; //active edges now above activeH add active vertical edges; //vert. edges starting @ activeH for each active vertical edge { test_intersection(activeH, activeV); if(intersection == true) update tables with new values; } }

  16. Search • Ready to compare target & chip data • Can be solved with recursion • But where to start? • Target ‘key’ • Face in target with the largest # edges • Most unique  more definitive search

  17. Search • Now that we have starting point • How to search • Breadth-first search • Requires a lot of memory • Depth-first search • Less memory needed • Need a finite tree to search

  18. Breadth-first Search

  19. Breadth-first Search

  20. Breadth-first Search

  21. Breadth-first Search

  22. Breadth-first Search

  23. Depth-first Search

  24. Depth-first Search

  25. Depth-first Search

  26. Depth-first Search

  27. Depth-first Search Can throw away this sub-tree

  28. Graph Model • Now we need to represent the patterns in such a way that we can use one of these searches • Visualize a tree • Root node is target ‘key’ • Each neighboring face becomes a child node • Recursively iterate through pattern

  29. Graph Model f1 f1 f2 f3 e f2 f3 f4 e e f4 f4 e e e Abstract Tree

  30. Graph Model • Don’t need to represent multiple shared edges • Mark faces & edges as ‘visited’ once checked f1 e e f3 f3 f3 e f2 f2 f2 e e e Concrete Tree (repetitive edges)

  31. Recursive ‘Deep Compare’ • Use recursion on abstract trees • Start with key and possible match

  32. get list of possible matches (those equivalent to target key) for each face in list { if(deepCompare(t-key, cface)); keep face in list } bool deepCompare(tface, cface) { if(tface == cface) { do{ new-cface = get next neighbor of cface new-tface = get next neighbor of tface if not (deepCompare(new-cface, new-tface)) return false; }while still have unvisited neighbors; return true; } return false; } Deep Compare Algorithm

  33. Search • If deepCompare is true for possible match • Then candidate is a final match and is flagged • Else • Removed from the list • At end all matches are flagged

  34. Conclusion • Algorithm can be adapted for other input data • We’re allowed conveniences by having rectilinear shapes (less detail and overhead) • Using plane-sweep algo. saves on runtime • Now log(n) not n2

  35. Conclusion • Good choice for target ‘key’ quickly decreases search space • Depth-first search saves on memory

  36. The End Created: April 4, 2003

More Related