480 likes | 589 Views
IV COMPUTING SIZE FUNCTIONS. Patrizio Frosini Vision Mathematics Group University of Bologna - Italy http://vis.dm.unibo.it/. In order to compute size functions we have to develop a discrete theory of size functions. d -covering. Size graph. The approximation procedure.
E N D
IVCOMPUTING SIZE FUNCTIONS Patrizio Frosini Vision Mathematics Group University of Bologna - Italy http://vis.dm.unibo.it/ International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
In order to compute size functions we have to develop a discrete theory of size functions. d-covering Size graph International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
The approximation procedure Let us consider a size pair (M,j) where M is a compact and locally connected subset of IRm and assume that j is the restriction to M of a continuous function g : IRmIR. Call () the modulus of continuity of the functiong : () =sup|g(P)-g(Q)|: P,Q IRm,||P-Q||< International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Definition of d-covering of M Consider a finite set P= P0,…,Ph of points of IRm and the set Bd of the h+1 open balls B(Pi,d) of radius d with centers at the points of P. Let us assume that Bd verifies the following properties: • M is contained in the union of the ballsB(Pi,d) • For every index 0ih,B(Pi,d)M is a non-empty connected set. ThenBd is called a d-covering of M International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
An example of d-covering of M d-covering M International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
The size graph(G,’)associated to ad-covering Consider a d-coveringBd= B(P0,d),…, B(Ph,d)ofM We call size graph associated to Bd the following labelled graph: Set of vertices: V=P0,…,Ph Two vertices Pi,Pjare adjacent if and only if the set(B(Pi,d)B(Pj,d)) M is connected. We label each vertex Piby the real number’(Pi)= g(Pi). We say that (G,’)d-approximates the size pair (M,). International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
An example of size graph Size graph We label each vertex Piby the real number g(Pi). This way we get a discrete measuring functionj’:P0,…,PhIR. The size graph is the pair(G,j’). International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
The discrete size function of a size graph We set G’ x= subgraph of G obtained by erasing all the vertices of G at which j’ takes a value strictly greater than x and all the edges connecting those vertices to other vertices. We call discrete size function of the size graph (G,’) the functionl (G,’): x yINthat takes each point (x,y) to the number of connected components ofG’ y containing at least one vertex of G’ x . International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Example: computing l (G,’)(0.5,0.8) l (G,’)(0.5,0.8)=3 International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
The approximation theorem Theorem. Assume that a size graph (G,’) is given, d-approximating the size pair (M,). Then for every x,yIR and every () withx+ y- the following inequalities hold l (G ,’)(x-,y+ ) l(M,j)(x,y) l (G ,’)(x+,y- ) l (M ,)(x-,y+ ) l(G,j’)(x,y) l (M ,)(x+,y- ) Previous theorem gives us a method for computing size functions. International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Problem: size graph are usually big. Example. If the topological space M is the rectangle mxn of the image, then our d-approximating size graph has more than mxn/4d2vertices (d expressed in number of pixels). International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Reducing size graph in order to make the computation of size functions easier. Theorem. These reduction moves do not change the discrete size function. International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Theorem. After a finite number of steps we get a decreasing arborescence w.r.t j (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. International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Computing the size function of the decreasing arborescence we have obtained: A recursive procedure • Choose the highest leaf wv and erase it; • Put a cornerpoint at (j’(v),j’(w)); • If just one vertex u is left, then draw the cornerlinex=j’(u) and stop,otherwiserepeat from 1). International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
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. International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
The first step: ordering the vertices w.r.tj Computational cost:O(n·log n) International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
The second step: D*-reduction of the size graph. Computational cost:O(m·a(2m+n,n))(where a is the inverse function of the Ackermann’s function) After D*-reduction we get a decreasing arborescence w.r.t j. The new nodes are already ordered. International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
The third step: computing the size function of the decreasing arborescence. From previous steps we can assume that the n’ vertices are ordered w.r.tjand that n’ n. Computational cost:O(n’ ) International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
In practical cases the main cost is due to the ordering of vertices: O(n·log n) International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Applications International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
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). International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Example 1 We have considered the following database (by courtesy of Pelillo and Siddiqi): International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Some queries: International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Searching for a horse: International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Searching for a hand: International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Searching for another hand: International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Changing the measuring functions: International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Allowing rotations: International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Example 2 Trittico International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Searching by examples International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Searching by examples Size functions allow us to formalize the concept of “average shape”. International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Example 3 • We consider some piecewise-smooth curves, generated by random parameter variations of the formula: where Some polygonals are obtained by joining random points. International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Some sample curves (database=700 curves) International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Some sample polygons (database=700 polygons) International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Experiments International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Experiments International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Evaluating symmetry and irregularity International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Is this “fine-tooth comb” symmetrical? 20 teeth 22 teeth International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Comparing the shape and the mirror shape International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Superimposing shape and mirror shape International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Difference image International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Size functions reveal the similarity The presence of the red cluster reveals the symmetry of shape. International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Revealing asymmetry and irregularity is useful for melanoma detection. nevus melanoma International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
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). International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran
Summary • The concepts of size graph (G,’)d-approximating a size pair (M,) is given, together with the concept of discrete size function of a size graph. • An approximation theorem is shown, linking size functions to the discrete size functions of thed-approximating size pairs. • From this a computational method for size functions follows. • The computational complexity of computing size functions is described and a method for its reduction is given. • Some applications of size functions are described. International Workshop on Computer Vision - Institute for Studies in Theoretical Physics and Mathematics, April 26-30 2004, Tehran