1 / 85

Computer and Robot Vision II

This chapter discusses the consistent labeling problem, which arises in computer vision, artificial intelligence, science, and engineering. It covers examples such as the N-Queens problem, Latin-Square puzzle, Edge-Orientation problem, and Subgraph-Isomorphism problem.

rkrystal
Download Presentation

Computer and Robot Vision II

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. Computer and Robot Vision II Chapter 17The Consistent Labeling Problem Presented by: 傅楸善 & 陳相廷 0935 681 486 r95944034@csie.ntu.edu.tw 指導教授: 傅楸善 博士

  2. 17.1 Introduction • In this class of problems we are given a set of objects and a set of possiblenames or labels for those objects. • We are also given a set of constraints that limits the possible labels for each object. DC & CV Lab. CSIE NTU

  3. 17.1 Introduction • Unary constraints: • Certain features of an object limit the allowable labels for that object. DC & CV Lab. CSIE NTU

  4. 17.1 Introduction • Binary constraints: • A particular label for one object limits the possible set of labels for a related object. • e.g. N-Queens problem DC & CV Lab. CSIE NTU

  5. 17.1 Introduction • N-ary constrains: • The sets of labels allowed for sets of N mutully constrained objects is limited. DC & CV Lab. CSIE NTU

  6. N-ary consistent-labeling problem (CLP): 4-tuple 17.1 Introduction DC & CV Lab. CSIE NTU

  7. 17.1 Introduction DC & CV Lab. CSIE NTU

  8. 17.1 Introduction DC & CV Lab. CSIE NTU

  9. 17.2 Examples of Consistent-Labeling Problems • consistent-labeling problems arise in: • computer vision • artificial intelligence • science • engineering DC & CV Lab. CSIE NTU

  10. 17.2.1 The N-Queens Problem • N-queens problem: • given chessboard and N queens. • queens placed on chessboard: • no queen captures any other queen. • no two queens in same row, same column, or same diagonal of chessboard. • N-queens problem: • modeled as consistent-labeling. DC & CV Lab. CSIE NTU

  11. 17.2.1 The N-Queens Problem • unit set • set of rows on chessboard • label set • set of columns on chessboard • exactly one queen per row: • labeling specifies the column where queen placed • unit-constraint relation • set • unit-label constraint relation: DC & CV Lab. CSIE NTU

  12. 17.2.1 The N-Queens Problem • e.g. pair [(1,1), (2,4)] is in R since two queens do not capture each other. • e.g. pair [(1,1), (2,2)] and [(1,1), (3,3)] are not in R • consistent labeling: • solve N-queens problem with constraints satisfied 1 2 3 4 1 2 3 4 DC & CV Lab. CSIE NTU

  13. The problem is to arrange the objects such that each row, each column, and each of the two main diagonals of the matrix contains exactly one object of each color and exactly of each shape. 17.2.2 The Latin-Square Puzzle DC & CV Lab. CSIE NTU

  14. 17.2.2 The Latin-Square Puzzle • Latin-square puzzle: • n x n matrix, n2 objects arranged on matrix, one per square • e.g. consider 4 x 4 puzzle for ease of illustration • object is one of four colors • C = { red, blue, green, yellow } • object has one of four shapes • S = { circle, square, triangle, octagon } DC & CV Lab. CSIE NTU

  15. 17.2.2 The Latin-Square Puzzle • set of units U = { 1, 2,…, 16 }: 16 squares of matrix • labels L: objects to be placed on squares, e.g. red square, blue triangle, … • Cartesian product set L = C x S • model Tas quaternary constraint: DC & CV Lab. CSIE NTU

  16. 17.2.2 The Latin-Square Puzzle • The unit-label constraint relation Rwould then consist of quadruples of unit-label pairs of the form DC & CV Lab. CSIE NTU

  17. 17.2.3 The Edge-Orientation Problem • If a local edge operator has been applied to an image and has determined, for each pixel, the strength of an edge passing through it in each of eight possible directions. • The output of the edge operator is noisy due to image noise. • Most meaningful edges in the real world are highly continuous with low curvature. DC & CV Lab. CSIE NTU

  18. 17.2.3 The Edge-Orientation Problem • maximum bending angle of any small edge segment: • limited to some maximum • e.g. DC & CV Lab. CSIE NTU

  19. 17.2.3 The Edge-Orientation Problem • Return true if l, l’ compatible for x, x’, false otherwise. • U: set of pixels of the image. • L: set of possible edge orientations, including special value none. • E(x): set of possible edge orientations of pixel x, based on the results of the local edge operator. • Nbd(x): set of neighboring pixels to pixel x. DC & CV Lab. CSIE NTU

  20. 17.2.3 The Edge-Orientation Problem • edge orientation of given pixels: • constrained only by neighborhood edge • When do pairs of neighboring pixels have compatible labels? • At least one label is none. • Predicate is satisfied. DC & CV Lab. CSIE NTU

  21. 17.2.3 The Edge-Orientation Problem • unit-label constraint relation: DC & CV Lab. CSIE NTU

  22. Jooooooooooke! DC & CV Lab. CSIE NTU

  23. 17.2.4 The Subgraph-Isomorphism Problem DC & CV Lab. CSIE NTU

  24. 17.2.4 The Subgraph-Isomorphism Problem • vertices V: set of vertices • edges E: nonreflexive, symmetric binary relation over V • graph G: pair (V, E) • It is often necessary to determine whether two graphs representing two different entities are identical, except for the labels of the vertices, indicating that the two objects have the same structure. DC & CV Lab. CSIE NTU

  25. 17.2.4 The Subgraph-Isomorphism Problem • G = (V, E) is isomorphic to G’=(V’, E’): • if there is one-to-one, onto mapping f from V to V’, satisfying that • f: graph isomorphism DC & CV Lab. CSIE NTU

  26. 17.2.4 The Subgraph-Isomorphism Problem • unit-set U: set of vertices V of G • label-set L: set of vertices V’ of G’ • unit-constraint relationT: edge set E of G • unit-label constraint relationR: DC & CV Lab. CSIE NTU

  27. 17.2.4 The Subgraph-Isomorphism Problem • Graph-isomorphism problem is a dual consistent-labeling problem • f: VV’ and its inverse must be consistent labelings DC & CV Lab. CSIE NTU

  28. 17.2.5 The Relational-Homomorphism Problem DC & CV Lab. CSIE NTU

  29. 17.2.5 The Relational-Homomorphism Problem • Subgraph-isomorphism is a special case of relational-homomorphism problem. • Relational-homomorphism is defined on N-ary relations, instead of just binary. • Homomorphism is also a structure-preserving mapping, but not necessarily to be one-to-one. DC & CV Lab. CSIE NTU

  30. 17.2.5 The Relational-Homomorphism Problem DC & CV Lab. CSIE NTU

  31. 17.2.5 The Relational-Homomorphism Problem • Relational homomorphism from T to S: • mapping f: AB satisfying • Relational homomorphism applied to N-tuple of T: • result is N-tuple of S DC & CV Lab. CSIE NTU

  32. 17.2.5 The Relational-Homomorphism Problem • Finding relational homomorphism: • sometimes called relational matching • Relational homomorphism: • maps elements of A to B with same relationships • Relational monomorphism: • is a relational homomorphism that is one-to-one. • A monomorphism indicates a stronger match than homomorphism. DC & CV Lab. CSIE NTU

  33. 17.2.5 The Relational-Homomorphism Problem • Relational isomorphism f from N-ary relation T to N-ary relation S: • is an one-to-one relational homomorphism from T to S. • f-1 is a relational homomorphism from S to T. • Relational isomophism: • A, B have same number of elements • each primitive in A maps to unique primitive in B • each primitive in A mapped to by a primitive of B • eachtuple in T has corresponding one in S, vice versa • A strongest kind of match: symmetric match DC & CV Lab. CSIE NTU

  34. 17.2.5 The Relational-Homomorphism Problem • Graph isomorphism is a binary-relational isomorphism. • Relational-homomorphism fits consistent-labeling model in much the same way that the graph-isomorphism problem did. • A: set of units • B: set of labels • Unit-constraint relation: relation T of the relational homomorphism problem. • Unit-label constraint: • consistent labeling solution: relational homomorphism from A to B DC & CV Lab. CSIE NTU

  35. Joooooooke! DC & CV Lab. CSIE NTU

  36. 17.3 Search Procedures for Consistent Labeling • Given a consistent-labeling problem CLP = (U,L,T,R), then find the set of all consistent labelings. • If there is no consistent labeling, then returns the empty set. • Method: • Backtracking tree search • Backtracking tree search with speedup: • Forward checking • Discrete relaxation DC & CV Lab. CSIE NTU

  37. 17.3.1 The Backtracking Tree Search • backtracking tree search: • begin with first unit of U • select second unit of U, begins to construct children of first node • process continues to level |U| of the tree • path from root to any successful nodes at level |U|: consistent labeling DC & CV Lab. CSIE NTU

  38. Simple digraph-matching problem DC & CV Lab. CSIE NTU

  39. portion of the tree search for solving the graph-matching problem DC & CV Lab. CSIE NTU

  40. 17.3.2 Backtracking with Forward Checking • backtracking tree search: has exponential time complexity • forward checking: once a unit-label pair (u,l) is instantiated at a node in the tree, the constraints imposed by the relations cause instantiation of some future unit-label pairs (u’,l’) to become impossible DC & CV Lab. CSIE NTU

  41. if 1=A then 2 can either be D or F,… DC & CV Lab. CSIE NTU

  42. 17.3.2 Backtracking with Forward Checking • FTAB: future-error table • FTAB(u’,l’)=1: still possible to instantiate (u’,l’) • FTAB(u’,l’)=0: (u’,l’) already been ruled out • FTAB(u’,l’)=X: (u’,l’) impossible from previous level of recursion • one future-error table for each level of recursion in tree search DC & CV Lab. CSIE NTU

  43. 17.3.3 Backtracking with Discrete Relaxation • forward-checking algorithm: prunes search tree of nodes ruled out • discrete relaxation: • iterative polynomial complexity procedure • greatly reduces search for tightly-constrained problems • constrains search further for not tightly constrained tree DC & CV Lab. CSIE NTU

  44. 17.3.4 Ordering the Units • Better to choose the unit that has the fewest labels left as the next unit. • We can modify the algorithms to keep track of how many labels remain for each unit and which unit has the least number of labels left. DC & CV Lab. CSIE NTU

  45. 17.3.5 Complexity • Consistent-labeling problem: NP-complete problem • Forward checking and look-ahead: • Drastically reduce number of nodes searched. • But do not change overall complexity. DC & CV Lab. CSIE NTU

  46. 17.3.6 The Inexact Consistent-Labeling Problem • Extracted line from images: some missing, partially missing, extra, distorted • Inexact consistent-labeling problem: allows some error for real-life problems DC & CV Lab. CSIE NTU

  47. 17.3.6 The Inexact Consistent-Labeling Problem • tree search: initially called with past_error=0 • past_error:never allowed to exceed error threshold ε DC & CV Lab. CSIE NTU

More Related