Structural Pattern
Structural Pattern
Pattern Recognition
Selim Aksoy
Figure 1: The general string matching problem is to find all shifts s for which
the pattern x appears in text. Any such shift is called valid. In this example,
x = “bdac00 is indeed a factor of text, and s = 5 is the only valid shift.
Figure 3: Finding the shift s for which the edit distance between x and an
aligned factor of text is minimum. In this figure, the minimum edit distance is
1, corresponding to the character exchange u → i, and the shift s = 11 is the
location.
Figure 4: The problem of string matching with the “don’t care” symbol is the
same as the basic string matching except that the ∅ symbol can match any
character. The figure shows the only valid shift.
CS 551, Fall 2018 c 2018, Selim Aksoy (Bilkent University) 15 / 60
Grammatical Methods
αIβ → αxβ
I→x
α → zβ or α→z
Figure 6: A 2-D line drawing picture description grammar with the set of
terminal symbols {t, b, u, o, s, ∗, ¬, +} where + represents head to tail
concatenation, ∗ represents head-head and tail-tail attachment, and ¬
represents head and tail reversal. H represents heads of lines and T
represents the tails. (Schalkoff, Pattern Recognition: Statistical, Structural
and Neural Approaches, 1992)
a b c d a’ b’ c’ d’ a” b” c” d”
f (a) = a00
a 0 1 0 1 a’ 0 1 1 0 a” 0 1 0 1
f (b) = b00
b 1 0 1 0 b’ 1 0 0 1 b” 1 0 1 0
f (c) = c00
c 0 1 0 1 c’ 1 0 0 1 c” 0 1 0 1
f (d) = d00
d 1 0 1 0 d’ 0 1 1 0 d” 1 0 1 0
Ri ◦ f = {(b1 , b2 , . . . , bn ) ∈ B n | ∃(a1 , a2 , . . . , an ) ∈ An }
E i (f ) = |Ri ◦ f − Si | + |Si ◦ f −1 − Ri |.
I The total structural error for this mapping is the sum over all
relations n
X
E(f ) = E i (f )
i=1
I Let piq (n) denote the value of the q’th property of node n of
graph Gi .
I Nodes ni ∈ Ni and n2 ∈ N2 are said to form an agreement
(n1 , n2 ) if
p1q (n1 ) ∼ p2q (n2 )
where “∼” denotes similarity.
Figure 14: An example image scene and its attributed graph. Nodes
correspond to image regions marked with white boundaries and edges
correspond to the spatial relationships between these regions.