Presentation is loading. Please wait.

Presentation is loading. Please wait.

International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 1 IV COMPUTING SIZE.

Similar presentations


Presentation on theme: "International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 1 IV COMPUTING SIZE."— Presentation transcript:

1 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 1 IV COMPUTING SIZE FUNCTIONS Patrizio Frosini Vision Mathematics Group University of Bologna - Italy http://vis.dm.unibo.it/

2 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 2 In order to compute size functions we have to develop a discrete theory of size functions.  -coveringSize graph

3 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 3 The approximation procedure Let us consider a size pair (M,  ) where M is a compact and locally connected subset of IR m and assume that  is the restriction to M of a continuous function g : IR m  IR. Call  (  ) the modulus of continuity of the function g :  (  ) =sup  |g(P)-g(Q)|: P,Q  IR m,||P-Q||<  

4 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 4 Consider a finite set P =  P 0,…,P h  of points of IR m and the set B  of the h+1 open balls B(P i,  ) of radius  with centers at the points of P. Let us assume that B  verifies the following properties: Definition of  -covering of M 1)M is contained in the union of the balls B(P i,  ) 2)For every index 0  i  h, B(P i,  )  M is a non-empty connected set. Then B  is called a  -covering of M

5 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 5  -covering An example of  -covering of M M

6 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 6 We call size graph associated to B  the following labelled graph: The size graph (G,  ’ ) associated to a  -covering Set of vertices: V=  P 0,…,P h  Consider a  -covering B    B(P 0,  ),…, B(P h,  )  of M Two vertices P i,P j are adjacent if and only if the set ( B(P i,  )  B(P j,  ) )  M is connected. We label each vertex P i by the real number  ’ (P i )= g(P i ). We say that (G,  ’ )  -approximates the size pair (M,  ).

7 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 7 Size graph An example of size graph We label each vertex P i by the real number g(P i ). This way we get a discrete measuring function  ’ :  P 0,…,P h   IR. The size graph is the pair (G,  ’ ).

8 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 8 The discrete size function of a size graph We call discrete size function of the size graph (G,  ’ ) the function l (G,  ’ ) :  x  y   IN that takes each point (x,y) to the number of connected components of G  ’  y  containing at least one vertex of G  ’  x . G  ’  x  = subgraph of G obtained by erasing all the vertices of G at which  ’ takes a value strictly greater than x and all the edges connecting those vertices to other vertices. We set

9 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 9 l (G,  ’ ) (0.5,0.8)=3 Example: computing l (G,  ’ ) (0.5,0.8)

10 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 10 Theorem. Assume that a size graph (G,  ’ ) is given,  -approximating the size pair (M,  ). Then for every x,y  IR and every    (  ) with x+   y-  the following inequalities hold l (G,  ’ ) ( x- ,y+  )  l (M   x,y)  l (G,  ’ ) ( x+ ,y-  ) l (M,  ) ( x- ,y+  )  l (G  ’   x,y)  l (M,  ) ( x+ ,y-  ) The approximation theorem Previous theorem gives us a method for computing size functions.

11 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 11 Problem: size graph are usually big. Example. If the topological space M is the rectangle m x n of the image, then our  -approximating size graph has more than m x n/4   vertices (  expressed in number of pixels).

12 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 12 Reducing size graph in order to make the computation of size functions easier. Theorem. These reduction moves do not change the discrete size function.

13 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 13 Theorem. After a finite number of steps we get a decreasing arborescence w.r.t  (i.e. a directed tree where there is exactly one descending path from the root to every other node) where no further move can be applied. This descending arborescence does not depend on the particular sequence of moves we have applied.

14 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 14 Computing the size function of the decreasing arborescence we have obtained: 1)Choose the highest leaf wv and erase it; 2)Put a cornerpoint at (  ’ (v),  ’ (w)); 3)If just one vertex u is left, then draw the cornerline x=  ’( u ) and stop, otherwise repeat from 1). A recursive procedure

15 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 15 What is the computational cost of computing size functions? Suppose that our size graph is connected and set n = number of its vertices, m = number of its edges.

16 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 16 Computational cost  O(n·log n) The first step: ordering the vertices w.r.t 

17 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 17 Computational cost  O(m·  (2m+n,n)) (where  is the inverse function of the Ackermann’s function) The second step:  *-reduction of the size graph. After  *-reduction we get a decreasing arborescence w.r.t . The new nodes are already ordered.

18 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 18 From previous steps we can assume that the n ’ vertices are ordered w.r.t  and that n ’  n. Computational cost: O(n ’ ) The third step: computing the size function of the decreasing arborescence.

19 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 19 In practical cases the main cost is due to the ordering of vertices: O(n·log n)

20 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 20 Applications

21 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 21 Size functions are mostly useful for qualitative comparison, i.e. comparison where the group of invariance is not clear (or does not exist at all).

22 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 22 Example 1 We have considered the following database (by courtesy of Pelillo and Siddiqi):

23 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 23 Some queries:

24 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 24 Searching for a horse:

25 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 25 Searching for a hand:

26 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 26 Searching for another hand:

27 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 27 Changing the measuring functions:

28 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 28 Allowing rotations:

29 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 29 Trittico Example 2

30 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 30 Searching by examples

31 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 31 Searching by examples Size functions allow us to formalize the concept of “average shape”.

32 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 32 We consider some piecewise-smooth curves, generated by random parameter variations of the formula: where Some polygonals are obtained by joining random points. Example 3

33 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 33 Some sample curves (database=700 curves)

34 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 34 Some sample polygons (database=700 polygons)

35 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 35 Experiments

36 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 36 Experiments

37 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 37 Evaluating symmetry and irregularity

38 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 38 Is this “fine-tooth comb” symmetrical? 22 teeth 20 teeth

39 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 39 Comparing the shape and the mirror shape

40 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 40 Superimposing shape and mirror shape

41 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 41 Difference image

42 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 42 Size functions reveal the similarity The presence of the red cluster reveals the symmetry of shape.

43 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 43 melanoma nevus Revealing asymmetry and irregularity is useful for melanoma detection.

44 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 44 A software package (SketchUp) for automatic classification of hand-drawn sketches of tools in a 7 elements set has been implemented. (Only the outer contour is actually input to the recognition process).

45 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 45

46 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 46

47 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 47

48 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 48 Summary 1)The concepts of size graph (G,  ’ )  -approximating a size pair (M,  ) is given, together with the concept of discrete size function of a size graph. 2)An approximation theorem is shown, linking size functions to the discrete size functions of the  - approximating size pairs. 3)From this a computational method for size functions follows. 4)The computational complexity of computing size functions is described and a method for its reduction is given. 5)Some applications of size functions are described.


Download ppt "International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran 1 IV COMPUTING SIZE."

Similar presentations


Ads by Google