Persistent homology and partial similarity of shapes

Persistent homology and partial similarity of shapes

Pattern Recognition Letters 33 (2012) 1445–1450 Contents lists available at SciVerse ScienceDirect Pattern Recognition Letters journal homepage: www...

876KB Sizes 0 Downloads 51 Views

Pattern Recognition Letters 33 (2012) 1445–1450

Contents lists available at SciVerse ScienceDirect

Pattern Recognition Letters journal homepage: www.elsevier.com/locate/patrec

Persistent homology and partial similarity of shapes Barbara Di Fabio a, Claudia Landi b,a,⇑ a b

Università di Bologna, ARCES, Via Toffano 2/2, 40125 Bologna, Italy DiSMI, Università di Modena e Reggio Emilia, via Amendola 2, Pad. Morselli, 42122 Reggio Emilia, Italy

a r t i c l e

i n f o

Article history: Available online 15 November 2011 Keywords: Mayer–Vietoris formula Extended persistence Hausdorff distance

a b s t r a c t Persistent homology provides shapes descriptors called persistence diagrams. We use persistence diagrams to address the problem of shape comparison based on partial similarity. We show that two shapes having a common sub-part in general present a common persistence sub-diagram. Hence, the partial Hausdorff distance between persistence diagrams measures partial similarity between shapes. The approach is supported by experiments on 2D and 3D data sets. Ó 2011 Elsevier B.V. All rights reserved.

1. Introduction Distinguishing and recognizing deformable shapes is an important problem, encountered in numerous pattern recognition applications of computer vision and computer graphics. A major problem in the analysis of non-rigid shapes is finding similarity of deformable shapes which have only partial similarity, i.e., have similar as well as dissimilar parts. The problem of partial comparison is widely discussed in (Bronstein et al., 2008b) for 2D shapes, and in (Biasotti et al., 2006b) for 3D shapes. While we refer readers to these papers for an account of methods dealing with the partial similarity problem, we underline that the most common approach in the literature is based on dividing shapes into parts and applying a global comparison method to the parts as separate objects. Instead, the authors of the aforementioned papers tackle the problem by a different strategy. Although the first one is based on the Gromov-Hausdorff distance between domains of R2 , and the second one is based on a structural descriptor such as the Reeb graph of surfaces of R3 , the common underlying idea is to overcome the problem that there is no objective way to define a part, by considering a trade-off between the full similarity measure between sub-parts and the importance of these subparts. Importantly, all the possible sub-parts are considered instead of favoring a specific one. The aim of this paper is to show that the same paradigm allows us to cope with the partial similarity problem using shape descriptors based on persistent homology.

⇑ Corresponding author at: University of Modena and Reggio Emilia, DiSMI, Reggio Emilia, Italy. E-mail addresses: [email protected] (B. Di Fabio), [email protected] (C. Landi). 0167-8655/$ - see front matter Ó 2011 Elsevier B.V. All rights reserved. doi:10.1016/j.patrec.2011.11.003

Persistent homology is an algebraic tool for measuring topological features of spaces and functions. It allows for a multi-scale analysis of topological data. The scale at which a feature is significant is measured by its persistence. Motivated by the problem of describing and recognizing deformable shapes, persistence of 0th homology, also known as a size function, has been studied for years first in computer vision (Frosini, 1992; Verri et al., 1993) and later in computer graphics (Biasotti et al., 2006a). Persistence of higher homology was originally introduced to study alpha-shapes and later applied to pattern recognition (Carlsson et al., 2005). Using persistent homology, we obtain a shape descriptor in terms of a multiset of points of the plane, called a persistence diagram (or a barcode). Comparison of persistence diagrams by a distance such as the Hausdorff distance gives a stable methodology to assess shape similarity (Cohen-Steiner et al., 2007; Frosini and Landi, 1997). In order to cope with the partial similarity problem using persistence, we begin showing the relationship existing between the persistent homology of two sub-parts A and B, and that of X = A [ B. In other words, we provide Mayer–Vietoris formulas for persistence. A Mayer–Vietoris formula for ordinary persistence has been obtained in (Di Fabio and Landi, 2011). Similar formulas also for relative and extended persistence are a novel contribution of this paper. Next, we study how this reflects on persistence diagrams, i.e. our shape descriptors. The Mayer–Vietoris formula yields relationships among the persistence diagrams of X, A, B, indicating that the presence of A in X can be revealed by the presence of a common subset of points in the persistence diagrams of A and X (analogously for B and X). Based on this idea, we propose to deal with the partial similarity problem by computing a distance between significant sub-diagrams of persistence diagrams. A distance such as the partial

1446

B. Di Fabio, C. Landi / Pattern Recognition Letters 33 (2012) 1445–1450

Hausdorff pseudo-distance can be used to impose a significance threshold to sub-diagrams, and to measure the similarity between all significant sub-diagrams. It automatically gives as output the similarity measure between the two most similar significant subdiagrams. This idea is effectively used in the final experiments, dealing with the detection of both full and partial similarity of shapes in the Mythological Creatures 2D and 3D datasets.

2. Background on shape analysis by persistence Persistence involves analyzing a shape S by choosing a topological space X to represent it, and a function u : X ! R to define a family of subspaces X u ¼ u1 ðð1; uÞ; u 2 R, nested by inclusion, i.e. a filtration of X. The map u is chosen according to the shape properties of interest (e.g., height, distance from center of mass, curvature). Along the filtration, topological features such as connected components or tunnels can appear or disappear. For example, Fig. 1 shows the shape of a chair represented by a triangular mesh. Filtering it by the height function, one observes the birth of a connected component for each leg and a tunnel for each hole in the back. The four connected components merge into one when the seat is reached. Applying homology to the filtration, births and deaths of topological features can be algebraically detected and their lifetime measured. E.g., 0th homology is used to study the evolution of connected components, 1st homology to study the evolution of tunnels. The basic assumption is that the longer a feature survives, the more meaningful or coarse the feature is for shape description. Vice-versa, noise and shape details are characterized by a shorter life. The filtration fX u gu2R is used to define ordinary persistence as follows. Given u 6 v 2 R, we consider the inclusion of Xu into Xv. This inclusion induces a homomorphism of homology groups Hk(Xu) ? Hk(Xv) for every k 2 Z. Its image consists of the classes that live at least from Hk(Xu) to Hk(Xv) and is called the ordinary kth persistent homology group of X at (u, v). When this group is fiu;v nitely generated, we denote its rank by Ordk ðXÞ. The ordinary persistence paradigm allows us to rank topological features with bounded lifetime by importance, according to the length of their life. Nevertheless, it does not take into account the fact that some topological features could give rise to essential homology classes of X that never die along the filtration, still being produced by noise or expressing shape details (for example, the two holes in the chair of Fig. 1). To overcome this problem, we can consider the following extension of persistence, in which all homology classes eventually die. This allows us to rank also topological features with unbounded lifetime. To define extended persistence, also the superlevel sets X u ¼ u1 ð½u; þ1ÞÞ; u 2 R, are used. First, we consider the filtration fðX; X u Þgu2R , with R inversely ordered, in which the pair of sets (X, Xu) is nested in (X, Xv) whenever u P v. Given u P v 2 R, the inclusion of the pair (X, Xu) into (X, Xv) induces a homomorphism of homology groups Hk(X, Xu) ? Hk(X, Xv) for every k 2 Z. Its image is called the relative kth persistent homology group of X at (u, v). When this group is finitely generated, we denote its rank by u;v Relk ðXÞ. Finally, concatenating the two previous filtrations, we can define extended persistence as follows. Given u; v 2 R, the inclusion of the pair (Xu, ;) into (X, Xv) induces a homomorphism of homology groups Hk(Xu) ? Hk(X, Xv) for every k 2 Z. Its image is called the extended kth persistent homology group of X at (u, v). When v 1 this group is finitely generated, we denote its rank by Extu; k ðXÞ. 1 We warn readers that hereafter the symbol Ext refers to extended persistence and should not be confused with the notation for the Ext functor used in homological algebra.

The quantitative comparison of two shapes is performed using a representation of these groups, the so-called persistence diagram. A persistence diagram Dk(X) is a set of points ðu; v Þ 2 R2 each corresponding to a pairing between the birth of a kth homology class at u and its death at v along the filtration of X. Dk(X) can be partitioned into the ordinary sub-diagram, DOrd k ðXÞ, the relative Ext sub-diagram, DRel k ðXÞ, and the extended sub-diagram, Dk ðXÞ (Cohen-Steiner et al., 2009). An example is illustrated in Fig. 1. It clearly shows that ordinary and extended persistence detect different topological features. For example, the two holes in the back of the chair are detected only by extended persistence. Given two shapes S and Q, represented by spaces X and Y, respectively, the Hausdorff distance between Dk(X) and Dk(Y) gives a full similarity measure between S and Q (Cohen-Steiner et al., 2007; Frosini and Landi, 1997). 3. Mayer–Vietoris formulas for persistent homology In this section we give Mayer–Vietoris formulas for ordinary, relative and extended persistent homology. Given a triad (X, A, B) with X = A [ B, a Mayer–Vietoris formula is a relationship among the ranks of the homology groups of X, A, B and C = A \ B. It is obtainable from the Mayer–Vietoris sequence

   ! Hkþ1 ðXÞ ! Hk ðCÞ ! Hk ðAÞ  Hk ðBÞ ! Hk ðXÞ !    ; when this sequence is exact. We recall that the homomorphism Hk+1(X) ? Hk(C) maps [z] to ½@ðzjA Þ, the homomorphism Hk(C) ? Hk(A)  Hk(B) maps [z] to ([z], [z]), and the homomorphism Hk(A)  Hk(B) ? Hk(X) maps ([z], [z0 ]) to [z + z0 ]. As a trade-off between generality of use and minimality of assumptions ensuring exactness of the Mayer–Vietoris sequence, ˇ ech homology. Indeed, in C ˇ ech homology, it we shall work with C is sufficient that triads are compact and homology coefficients ˇ ech and simare taken in a vector space. For triangulable spaces, C plicial homology coincide (Eilenberg and Steenrod, 1952). In the context of persistent homology we endow X with a continuous function u, and A, B and C with the respective restrictions of u. We assume that (X, A, B) is a compact triad, and that the homology groups of the sublevel and superlevel sets of u, ujA, ujB, ujC are finitely generated. Moreover, we take homology coefficients in a field, so that persistent homology groups are vector spaces and their ranks are the dimensions of these vector spaces. These notations and assumptions will be maintained throughout the paper. The novel idea in obtaining Mayer–Vietoris formulas for persistent homology is that of interlacing Mayer–Vietoris sequences with long exact sequences containing the maps that define the persistent homology groups. In the case of ordinary persistence, which is defined by the homomorphism Hk(Xu) ? Hk(Xv) induced by inclusion, we shall use the long exact sequence of the pair (Xv , Xu), and the analogous ones for A, B, C. In the case of relative persistence, which is defined by the homomorphism Hk(X, Xu) ? Hk(X, Xv) induced by inclusion, we shall use the long exact sequence of the triple (X, Xv, Xu), and the analogous ones for A, B, C. Finally, in the case of extended persistence, which is defined by the homomorphism Hk(Xu) ? Hk(X, Xv) induced by inclusion, we shall use the long exact sequence of the proper triad (X, Xu, Xv), and the analogous ones for A, B, C. 3.1. A Mayer–Vietoris formula for ordinary persistence Since (X, A, B) is a compact triad and u is continuous, also (Xu, Au, Bu) is a compact triad for each u 2 R. Therefore, for each pair of values u, v in R, with u 6 v, and k 2 Z, we can consider the following diagram

1447

B. Di Fabio, C. Landi / Pattern Recognition Letters 33 (2012) 1445–1450 dk

Hkþ1 ðX u Þ

Hk ðC u Þ

!

# hkþ1

! Hk ðAu Þ  Hk ðBu Þ

# fk d0k

Hkþ1 ðX v Þ

# gk

Hk ðC v Þ

!

#

! Hk ðX v Þ

#

d k

# f k

#

Hk ðC v ; C u Þ ! Hk ðAv ; Au Þ  Hk ðBv ; Bu Þ ! Hk ðX v ; X u Þ

Hk ðX v ; X u Þ

#

#

#

dk1

Hk ðX u Þ

!

#

Hk1 ðC u Þ

#

! Hk1 ðAu Þ  Hk1 ðBu Þ

! Hk1 ðX u Þ ð1Þ

where the horizontal lines are part of exact Mayer–Vietoris sequences of the triads (Xu, Au, Bu), (Xv , Av , Bv), and (Xv , Av , Bv) relative to (Xu, Au, Bu), and the vertical lines are part of long exact sequences of the pairs (Xv , Xu), (Av , Au), (Bv , Bu), (Cv , Cu). Theorem 3.1. For every u; v 2 R, with u 6 v, and for every k 2 Z, u;v

u;v

u;v

u;v

Ordk ðXÞ ¼ Ordk ðAÞ þ Ordk ðBÞ  Ordk ðCÞ þ rkd0k  rkd00k þ rkdk1 ; with d0k ; d00k , and dk1 as in Diagram (1). This result is proved in (Di Fabio and Landi, 2011), observing u;v u;v u;v u;v that Ordk ðXÞ ¼ rkhk ; Ordk ðAÞ þ Ordk ðBÞ ¼ rkg k ; Ordk ðCÞ ¼ rkfk , with hk, gk, fk as in Diagram (1), and using algebraic results that can be restated as follows. Lemma 3.2. If Lk ; M k ; N k ; L0k ; M 0k ; N 0k ; L00k ; M 00k ; N 00k ; k 2 Z, are finitely generated vector spaces, and all the vertical and horizontal lines are exact in the diagram .. . #   ! Lkþ1

Dk

#

#

#

M 0k

!

# D00k

M 00k

!

#   ! Lk

.. .

# lk D0k

#   ! L00kþ1

.. .

Mk

!

# kkþ1   ! L0kþ1

.. .

#

! Nk

! Lk

# mk

! L0k

#

! L00k

#

.. .

#

#

#

!   ! M 0 # l0

!    ! M 00

#

! N00k

.. .

Dk1

# kk

! N0k

.. .

# !    ! M 000

#

! N0

! L0

# m0 ! N00

! L00

! L000

#

#

! M k1 ! Nk1 ! Lk1 !    ! 0

0

0

# kk

#

#

#

.. .

.. .

.. .

.. .

! 0

# u

! Hk1 ðC;C Þ

# u

u

! Hk1 ðA;A Þ  Hk1 ðB;B Þ

! Hk1 ðX;X u Þ ð2Þ

where the horizontal lines are part of exact Mayer–Vietoris sequences of the triads (X, A, B) relative to (Xu, Au, Bu), (X, A, B) relative to (Xv, Av, Bv), and (Xv, Av, Bv) relative to (Xu, Au, Bu), and the vertical lines are part of long exact sequences of the triples (X, Xv, Xu), (A, Av, Au), (B, Bv, Bu), (C, Cv, Cu). Applying Lemma 3.2 to Diagram (2), and observing that u;v  ; Relu;v ðAÞ þ Relu;v ðBÞ ¼ rkg ; Relu;v ðCÞ ¼ rkf ; Relk ðXÞ ¼ rkh k k k k k k

we deduce the following result. Theorem 3.3. For every u; v 2 R, with u P v, and for every k 2 Z, u;v

u;v

u;v

u;v

Relk ðXÞ ¼ Relk ðAÞ þ Relk ðBÞ  Relk ðCÞ þ rkd0k  rkd00k1 þ rkdk1 ; 00 0 ;   with d k dk1 , and dk1 as in Diagram (2).

3.3. Mayer–Vietoris formulas for extended persistence We now deduce Mayer–Vietoris formulas for extended persistence. The main difference with the previous cases is that, here, both sublevel and superlevel sets are involved, with u,v varying in R. So, it will be necessary to distinguish the two cases u < v and u P v. Theorem 3.4. For every u; v 2 R, and k 2 Z, the following statements hold:

v u;v u;v u;v ^0 ^00 ^ Ext u; k ðXÞ¼Ext k ðAÞþExt k ðBÞExt k ðCÞþrkdk rkdk þ rkdk1 ;

with ^ d0k ; ^ d00k , and ^ dk1 as in Diagram (4). (ii) If u P v, then

with ~ d0k ; ~ d00k1 , and ~ dk1 as in Diagram (5).

3.2. A Mayer–Vietoris formula for relative persistence In almost the same way as for ordinary persistence, we can deduce a Mayer–Vietoris formula for relative persistence. For each u P v 2 R; ðX; X v ; X u Þ is a compact triad with u X # Xv # X. So, we can consider the following long exact sequence of the triple: u

d k1

v u;v u;v u;v ~0 ~00 ~ Ext u; k ðXÞ ¼ Ext k ðAÞ þ Ext k ðBÞExt k ðCÞ þ rkdk  rkdk1 þ rkdk1 ;

Note that the above diagram is constructed in a ‘‘periodic’’ manner, hence the same symbols denote the same groups and maps. The proof of Lemma 3.2 can be found in Appendix A.

u

! Hk1 ðC v ; C u Þ ! Hk1 ðAv ;Au Þ  Hk1 ðBv ; Bu Þ ! Hk1 ðX v ; X u Þ

(i) If u < v, then ! 0

then rkkk ¼ rkmk  rklk þ rkD0k  rkD00k þ rkDk1 .

v

#

#

#

Dk1

#

# k0

# ! N000

! 0

Hk ðX;X Þ

! Hk ðX;X v Þ

d00 k1

# u

 #h k

! Hk ðA;Av Þ  Hk ðB;Bv Þ

Hkþ1 ðX;X v Þ ! Hk ðC; C v Þ

Hkþ1 ðX v ; X u Þ !

! Hk ðX;X u Þ

# gk

d0 k

#

#

! Hk ðA;Au Þ  Hk ðB;Bu Þ

Hkþ1 ðX;X u Þ ! Hk ðC; C u Þ  #h kþ1

# hk

! Hk ðAv Þ  Hk ðBv Þ

# d00k

! Hk ðX u Þ

v

v

u

   ! Hk ðX ; X Þ ! Hk ðX; X Þ ! Hk ðX; X Þ ! Hk1 ðX ; X Þ !    Analogous exact sequences exist for A,B,C. Therefore we have the following diagram for every k 2 Z:

Proof. Let us consider the triad (X, Xu, Xv) for fixed u; v 2 R, and, for the sake of conciseness, let us denote Xu [ Xv simply by [ X vu and Xu \ Xv by \ X vu . Since this triad (X, Xu, Xv) is compact, and hence proper, for every u; v 2 R, its homology sequence

   ! Hk X u ; \ X vu ! Hk ðX; X v Þ ! Hk X; [ X vu ! Hk1 X u ; \ X vu !

ð3Þ

is exact (Eilenberg and Steenrod, 1952). Let us consider separately the two cases u < v and u P v. (i) If u < v, then \ X vu ¼ ;. So (3) becomes

    ! Hk ðX u Þ ! Hk ðX; X v Þ ! Hk X; [ X vu ! Hk1 ðX u Þ !   

Applying analogous arguments to A, B, C, for every k 2 Z, we can consider the following diagram

1448

B. Di Fabio, C. Landi / Pattern Recognition Letters 33 (2012) 1445–1450

ϕ

Fig. 1. From left to right: the height function u on a chair shaped object X = A [ B, A being the seat, and B the back; the associated persistence diagrams Dk(X), Dk(A), Dk(B). We draw circles, squares, and diamonds for coding ordinary, extended, and relative sub-diagrams, respectively, and mark the dots by the dimension k of their diagrams. As discussed in Section 4, Dk(A) and Dk(B) present sub-diagrams in common with Dk(X).

^d k

Hkþ1 ðX u Þ ^ #h

! Hk ðC u Þ # ^f

kþ1

! Hk ðAu Þ  Hk ðBu Þ # g^k

k

^d0 k

v

Hkþ1 ðX;X Þ

! Hk ðC;C Þ

# v

Hkþ1 X; X u

v

[

! Hk C; C u #

# [

v

[

v

! Hk A; Au  Hk B; Bu #

^d k1

Hk ðX u Þ

! Hk ðX;X v Þ

#

^d00 k

#

v

! Hk ðA;A Þ  Hk ðB;B Þ

# [

k

v

v

! Hk1 ðC u Þ

vertical  lines are sequences of the pairs  part of long exact  X u ; \ X vu ; Au ; \ Avu , Bu ; \ Bvu ; C u ; \ C vu . The claim is again an immediate consequence of Lemma 3.2. h

! Hk ðX u Þ ^ #h

! Hk X; [ X vu



! Hk1 ðAu Þ  Hk1 ðBu Þ

! Hk1 ðX u Þ ð4Þ

where the horizontal lines are part of exact Mayer–Vietoris sequences of the triads (Xu, Au, Bu), (X, A, B) relative to (Xv, Av, Bv), and  (X, A, B) relative to [ X vu ; [ Avu ; [ Bvu , and the vertical lines are part of long exact sequences of the proper triads (X, Xu, Xv), (A, Au, Av), (B, Bu, Bv), (C, Cu, Cv). v u;v u;v ^ ^ We observe that Extu; k ðXÞ ¼ rkhk ; Ext k ðAÞ þ Ext k ðBÞ ¼ rkg k ; u;v ^ Extk ðCÞ ¼ rkf k . Therefore, applying Lemma 3.2, we obtain the claimed formula. (ii) If u P v, then [ X vu ¼ X. So (3) becomes

  ! Hk X u ; \ X vu ! Hk ðX; X v Þ ! Hk ðX; XÞ ! Hk1 X v ; \ X vu !

 This implies that, for every k 2 Z; Hk X u ; \ X vu is isomorphic to Hk(X,Xv). Consequently, by the commutativity of the diagram

v ~ it follows that Ext u; k ðXÞ ¼ rkhk . Similar considerations apply to A, B, v u;v u;v ~ C. Hence, for every k 2 Z, Extu; k ðAÞ þ Ext k ðBÞ ¼ rkg k and Ext k ðCÞ ¼ ~ ~ ~ rkf k , with g k and f k as in the following diagram ~d k

Hkþ1 ðX u Þ

! Hk ðC u Þ

~ #h kþ1 Hkþ1 X u ; \ X vu



! Hk C u ; \ C vu #

\

v

Xu

~d00 k1

! Hk1

# Hk ðX u Þ

~ #h k



   ! Hk Au ; \ Avu  Hk Bu ; \ Bvu ! Hk X u ; \ X vu #

\

v

Cu

# ~d k1

! Hk ðX u Þ

# g~k

~d0 k

# Hk

! Hk ðAu Þ  Hk ðBu Þ

# ~f k

! Hk1 ðC u Þ

! Hk1

4. Detection of sub-part similarity of shapes by persistence

#

# \

v

Au  Hk1

\

v

Bu

# ! Hk1 ðAu Þ  Hk1 ðBu Þ

! Hk1

\

X vu



# ! Hk1 ðX u Þ ð5Þ

where the horizontal lines are part of exact Mayer–Vietoris sequences of  the triads (Xu, Au, Bu), (X  u, Au, Bu) relative to \ v \ v \ v X u ; Au ; Bu , and the triad \ X vu ; \ Avu ; \ Bvu , respectively, and the

Following Bronstein et al. (2008b), our model for assessment of sub-part similarity is based on two criteria: first, since there is no objective way to divide a shape into parts, all the possible partitions of the shapes should be considered, instead of favoring a specific one; second, since different parts have different importance, the parts must be significant. Therefore, given two shapes S and Q, the partial similarity dP between S and Q can be expressed as dP ðS; QÞ ¼ minðS0 ;Q0 Þ dF ðS 0 ; Q0 Þ, where S 0 and Q0 vary in all the possible parts of the shapes S and Q, respectively, that have a given degree of significance. Let us see how to import these criteria in our framework. In dealing with sub-parts, the ideal situation would be that, if a sub-part S 0 of the shape S of X corresponds to a subspace A of X, then Dk(A) is a sub-diagram of Dk(X). In general, by the Mayer–Vietoris formulas for persistence developed in Section 3, this is true only up to a certain extent, as illustrated in Fig. 1. More formally, in (Di Fabio and Landi, 2011) conditions on the map dvk ;u of Diagram (1) are given in order for points of Ord Ord Ord DOrd k ðXÞ [ Dk ðCÞ to be also points of Dk ðAÞ [ Dk ðBÞ; furthermore, conditions on the homological critical values of u and ujC are given Ord Ord so that points of DOrd k ðAÞ [ Dk ðBÞ are also points of Dk ðXÞ[ DOrd ðCÞ. Analogous results can be proved for relative and extended k persistence using the cone argument from Cohen-Steiner et al. (2009): it suffices to interpret relative and extended persistence of X filtered by u as the ordinary persistence of a new space Xx = x  X, obtained by coning X from a new vertex x, but with x removed, and filtered by a function ux obtained from u on X. In view of our model for partial similarity assessment, the full similarity measure must be applied to sub-diagrams of Dk(X) and Dk(Y), respectively, corresponding to significant enough sub-parts of full shapes S and Q. Moreover, we must take the minimum over all the possible sub-diagrams. This can be achieved at once using the partial Hausdorff pseudo-distance (Huttenlocher et al., 1993). Indeed, it automatically selects a fixed fraction of the persistence diagrams points giving the best matching and uses only this subset to compute the Hausdorff distance. In this way, the minimum of the Hausdorff distances between pairs of sub-diagrams is automatically computed. Moreover, the choice of the fraction of points allows us to fix the importance of the considered sub-parts: the larger the fraction, the more significant the sub-parts.

1449

B. Di Fabio, C. Landi / Pattern Recognition Letters 33 (2012) 1445–1450

20

30

centaurs horses humans (michael) seahorses

20 10

10 0

0

−10 −20

−10

−30 −40

−20

−50 −60

−30 −30

−20

−10

0

10

20

−70 −40

−20

0

20

40

60

80

Fig. 2. Visualization of the partial similarity between the Mythological creatures of the 2D (left) and 3D (right) datasets.

5. Experiment and discussion In order to evaluate the potential of persistent homology in partial comparison, we performed two tests on different Mythological Creatures data sets, containing shapes of horses, humans, centaurs, seahorses. Each shape differs by an articulation and/or additional parts. We assume as ground truth that a man and a centaur are dissimilar in the sense of a full similarity criterion, yet, parts of these shapes (the upper part of the centaur and the upper part of the man) are similar. Likewise, a horse and a centaur are similar because they share a common part (bottom part of the horse body). At the same time, a man and a horse are dissimilar. In the first experiment, we used a data set of 2D images (silhouettes) representing 15 shapes: 5 humans, 5 horses and 5 centaurs (Bronstein et al., 2008b). Each shape is modeled by taking as a topological space the set of black pixels with the 8-neighbor adjacency topology, and as a filtering function the function ‘‘minus the distance from the center of the bounding box’’. For dimensional reasons, shapes are analyzed using only ordinary and extended 0th persistence. We considered the partial Hausdorff pseudo-distance taking 98% of points of each ordinary persistence sub-diagram and the 100% of each extended sub-diagram. Fig. 2 (left) visualizes the shape space with the partial Hausdorff pseudo-distance between persistence diagrams of ordinary and extended persistent homology using a Euclidean similarity pattern. It shows that the partial Hausdorff pseudo-distance between persistence diagrams clusterizes nicely semantically similar shapes. Moreover, the similarity relations assumed as ground truth are respected. This result can be directly compared with the analogous test presented in Fig. 11 of Bronstein et al. (2008b), where shapes are compared using the scalar partial similarity. In the second experiment, we used a data set of 3D models (triangular meshes) from the TOSCA non-rigid world data set (Bronstein et al., 2008a) representing 49 mythological shapes (centaurs, horses, humans, seahorses). Each model is filtered by the function ‘‘minus the distance from the centroid of the set of vertices’’ defined on the vertices and extended to other simplices by linearity. For dimensional reasons, shapes are analyzed using only ordinary and extended 0th and 1st persistence. The partial Hausdorff pseudo-distance in this case uses the 90% of points of each ordinary and extended persistence sub-diagram. The result is visualized in Fig. 2 (right). Based on these results we conclude that persistent homology performs nicely for the needs of automatic partial similarity assessment, and could be exploited in content-based shape search engines.

Appendix A. Proof of Lemma 3.2 Proof. By induction on k P 0 (for k < 0 it is trivial). Case k = 0: By the exactness of horizontal lines, and the dimensional relation linking the kernel and the image of each homomorphism, we obtain

rkL00 ¼ rkN00  rkM00 þ rkD00 ;

ðA:1Þ

rkL000 ¼ rkN000  rkM000 þ rkD000 :

ðA:2Þ

Now, subtracting equality (A.2) from equality (A.1), we have

 rkL00  rkL000 ¼ rkN00  rkN000  rkM 00  rkM000 þ rkD00  rkD000 ; which yields the claim by the exactness of vertical lines. Inductive step: Let us assume that

rkkk1 ¼ rkmk1  rklk1 þ rkD0k1  rkD00k1 þ rkDk2 :

ðA:3Þ

By the exactness of horizontal lines, we obtain

rkL0k ¼ rkN 0k  rkM0k þ rkD0k þ rkD0k1 ; rkL00k ¼ rkN 00k  rkM00k þ rkD00k þ rkD00k1 ;

ðA:4Þ ðA:5Þ

rkLk1 ¼ rkNk1  rkM k1 þ rkDk1 þ rkDk2 :

ðA:6Þ

Since, by exactness, rkkk ¼ rkL0k  rkL00k þ rkLk1  rkkk1 , let us use equalities (A.4)–(A.6), and the inductive assumption (A.3) to obtain

rkkk ¼ rkN 0k  rkM0k þ rkD0k þ rkD0k1

  rkN00k  rkM 00k þ rkD00k þ rkD00k1 þ rkNk1  rkM k1 þ rkDk1 þ rkDk2  rkmk1  rklk1 þ rkD0k1  rkD00k1 þ rkDk2



¼ rkN 0k  rkN00k þ rkNk1  rkmk1

  rkM 0k  rkM 00k þ rkMk1  rklk1 þ rkD0k  rkD00k þ rkDk1 ;

which yields the claim by the exactness of vertical lines and concludes the proof. h References Biasotti, S., Giorgi, D., Spagnuolo, M., Falcidieno, B., 2006a. Size functions for 3D shape retrieval, in: SGP’06: Proc. of the fourth Eurographics Symposium on Geometry Processing, pp. 239–242. Biasotti, S., Marini, S., Spagnuolo, M., Falcidieno, B., 2006b. Sub-part correspondence by structural descriptors of 3D shapes. Computer-Aided Design 38, 1002–1019.

1450

B. Di Fabio, C. Landi / Pattern Recognition Letters 33 (2012) 1445–1450

Bronstein, A., Bronstein, M., Kimmel, R., 2008a. Numerical Geometry of Non-Rigid Shapes. Springer Publishing Company, Incorporated. Bronstein, A.M., Bronstein, M.M., Bruckstein, A.M., Kimmel, R., 2008b. Analysis of two-dimensional non-rigid shapes. Internat. J. Comput. Vision 78, 67–88. Carlsson, G., Zomorodian, A., Collins, A., Guibas, L., 2005. Persistence barcodes for shapes. Internat. J. Shape Model. 11, 149–187. Cohen-Steiner, D., Edelsbrunner, H., Harer, J., 2007. Stability of persistence diagrams. Discrete Comput. Geom. 37, 103–120. Cohen-Steiner, D., Edelsbrunner, H., Harer, J., 2009. Extending persistence using Poincaré and Lefschetz duality. Found. Comput. Math. 9, 79–103. Di Fabio, B., Landi, C., 2011. A Mayer–Vietoris formula for persistent homology with an application to shape recognition in the presence of occlusions. Found. Comput. Math. 11, 499–527.

Eilenberg, S., Steenrod, N., 1952. Foundations of Algebraic Topology. Princeton University Press, Princeton, New Jersey. Frosini, P., 1992. Measuring shapes by size functions. In: D.P. Casasent (Ed.), Society of Photo-Optical Instrumentation Engineers (SPIE) Conference Series, vol. 1607, pp. 122–133. Frosini, P., Landi, C., 1997. New pseudo-distances for the size function space. In: Melter, R.A., Wu, A.Y., Latecki, L.J. (Eds.), Proc. SPIE, Vision Geometry VI, vol. 3168, pp. 52–60. Huttenlocher, D.P., Klanderman, G.A., Rucklidge, W., 1993. Comparing images using the Hausdorff distance. IEEE Trans. Pattern Anal. Machine Intell. 15, 850– 863. Verri, A., Uras, C., Frosini, P., Ferri, M., 1993. On the use of size functions for shape analysis. Biol. Cybernet. 70, 99–107.