Topology-preserving rigid transformation of 2D digital images Phuc Ngo, Nicolas Passat, Yukiko Kenmochi, Hugues Talbot

To cite this version:

Phuc Ngo, Nicolas Passat, Yukiko Kenmochi, Hugues Talbot. Topology-preserving rigid transfor- mation of 2D digital images. IEEE Transactions on Image Processing, Institute of Electrical and Electronics Engineers, 2014, 23 (2), pp.885 - 897. ￿10.1109/TIP.2013.2295751￿. ￿hal-00795054v1￿

HAL Id: hal-00795054 https://hal-upec-upem.archives-ouvertes.fr/hal-00795054v1 Submitted on 3 Jul 2013 (v1), last revised 22 Apr 2014 (v2)

HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. JOURNAL OF LATEX CLASS FILES, VOL. X, NO. X, JANUARY 20XX 1 Topology-preserving rigid transformation of 2D digital images Phuc Ngo, Nicolas Passat, Yukiko Kenmochi, Hugues Talbot

Abstract—We provide conditions under which 2D digital im- We then propose, in Sec. IV, some conditions under which ages, considered in the two most common digital topology models a 2D digital image preserves its topological properties under (namely, dual adjacency and well-composedness), preserve their any rigid transformation. Based on these results, we provide topological properties under rigid transformation. This study, that is developed in a discrete framework, leads to the proposal in Sec. V some methodological solutions for analysing and of efficient preprocessing strategies that ensure the topological preprocessing digital images before rigid transformation, in invariance of images under further rigid transformation. These order to preserve their topological properties. This study is results and methods are proved to be valid for various kinds of generic on two sides: (i) the main two digital topology models images (binary, grey-level, label), thus providing a generic set are considered, namely the dual adjacency, and the well- of tools, that can be used in particular in the context of image registration and warping. composedness ones; and (ii) the cases of binary, grey-level and label images are dealt with. Sec. VI concludes the article Index Terms—Digital imaging, rigid transformation, digital by perspective works. For the sake of readability, technical topology, well-composed images, image correction. proofs are reported in Appendix.

II.BACKGROUNDNOTIONS I.INTRODUCTION A. Notations N digital imaging, the preservation of topological properties A B C is a crucial issue in several application fields, involving 3D The sets are noted , , , etc. Subsets of these sets are I A data (e.g., medical imaging [1]) but also 2D ones (e.g., remote noted A, B, Γ, etc. The power set of a set A is noted 2 . The sensing [2]). In particular, topology preservation –pioneered elements of sets are noted a, b, c, etc., and a, b, c, etc. if the nearly fifty years ago [3], [4]– has been investigated in the set is a cartesian product. By abuse of notation, an element a, that should be noted as a column vector, is noted as a line context of image transformation, both from the viewpoints of a registration [5] and warping [6]. It has to be noticed that efforts vector, e.g., a = (a b) instead of a = b . have been mainly devoted to handle complex transformations, The functions defined on continuous sets are noted A, B, C, while more simple ones have been globally unconsidered. etc., and the ones defined on discrete sets are noted A, B, C, A B A B A Indeed, the handling of “simple” transformations (e.g., etc. A function F from to is noted F : → . If A ⊆ B −1 translations, rotations) is often assumed to be trivial. This can and B ⊆ , we note F (A) = {F (x) | x ∈ A} and F (B) = be explained by the fact that, in the continuous case (i.e., in {x | F (x) ∈ B}. If F is a bijection, its inverse function is −1 B A A B Rn), most of such transformations are topology-preserving, also noted F : → . The restriction of F : → to A B while this is not necessarily the case for complex ones (e.g., the subset A ⊆ is noted F|A : A → . The composition of A B B C A C those induced by nonrigid registration [7]). Based on this F : → and G : → is noted G ◦ F : → . The “continuous” assertion, it is often thought that simple trans- spaces of functions are noted A, B, C, etc. formations still lead to easy handling of topological properties Adjacency (i.e., binary, irreflexive and symmetric) relations in the digital case (i.e., in Zn). This is a wrong belief. are noted . Equivalence (i.e., binary, reflexive, transitive and In the case of rigid transformations [8], that include the symmetric) relations are noted ∼. We recall that a relation family of rotations, (e.g., (quasi-)shear rotations [9], [10], or (resp. ∼) defined on a set A is actually a subset of A×A, and hinge angle rotations [11], [12], [13]), some topological issues that a b (resp. a ∼ b) means that (a b) ∈ (resp. ∼). have been identified [14], [15]. These issues are directly or Given a set A, equipped with an equivalence relation ∼, the indirectly induced by the sampling policies that are mandatory equivalence class of a ∈ A with respect to ∼ is noted [a]∼, to guarantee the stability of the transformations inside Zn. and the quotient set of A with respect to ∼ is noted A∼. In this article, we propose a study devoted to the topological B. Rigid transformations invariance of 2D digital images under rigid transformation. In R2 Sec. II, we first provide background notions required to make 1) Continuous case: In , a rigid transformation is a function the article self-contained. Secs. III–V constitute the core of U : R2 → R2 (1) the article. The main purposes are first detailed in Sec. III. x → Rx + t

2 Phuc Ngo, Yukiko Kenmochi and Hugues Talbot are with the ESIEE- where R is a matrix, and t ∈ R . The function U is Paris and the Universit´e Paris-Est, LIGM UMR CNRS 8049, Paris, France a bijection, and we note T = U −1 its inverse function, which ({p.ngo,y.kenmochi,h.talbot}@esiee.fr). Nicolas Passat is with the Universit´e de Reims Champagne-Ardenne, is also a rigid transformation. We note RigR2 the set of the CReSTIC EA 3804, Reims, France ([email protected]). rigid transformations. JOURNAL OF LATEX CLASS FILES, VOL. X, NO. X, JANUARY 20XX 2

2) Discrete case: These definitions cannot be directly ap- D. Digital topology Z2 plied in the discrete case, i.e., when considering instead 1) Basic notions: Digital topology [16] provides a simple R2 Z2 Z2 of . Indeed, there is no guarantee that U( ) ⊆ . The framework for handling the topology of binary images in Zn. handling of discrete rigid transformations then requires to Beyond its simplicity, it is also a robust framework that has R2 Z2 consider a discretisation operator D : → . In the most been proved to be compliant [17] with other discrete models common cases –and in the present one– D is the standard (e.g., Khalimsky grids [18] and cubical complexes [19]) but rounding function. We can then define the discrete analogues also with continuous notions of topology [20]. Z2 Z2 Z2 Z2 U : → and T : → , of U and T , as Practically, digital topology on Zn mainly relies on two adjacency relations, noted n and n , defined, for any U = D ◦ U Z2 (2) 2 3 −1 | p q Zn −1 ∈ , by T = D ◦ T|Z2 = D ◦ (U )|Z2 (3) p 2n q ⇐⇒ p − q1 = 1 (4) We note RigZ2 the set of the discrete rigid transformations. p n q ⇐⇒ p − q = 1 (5) 3) Transformation models: Two transformation models can 3 −1 ∞   be considered for discrete (rigid) transformations: the Eulerian In the case of Z2, we retrieve in particular the well-known 4- (or backwards) model, and the Lagragian (or forwards) one. and 8-adjacency relations, namely 4 and 8. The Lagrangian model consists of computing U(Z2), i.e., Let Ω ⊆ Z2, and p q ∈ Ω. We say that p q are 4- (resp. 8-) Z2 it determines the image of the “initial” space associated adjacent (in Ω) if p 4 q (resp. p 8 q). From the reflexive- to the rigid transformation. From an imaging viewpoint, this transitive closure of 4 (resp. 8) on Ω, we derive the 4- model is not satisfactory, since U is, in most cases, neither (resp. 8-) connectedness relation ∼4 (resp. ∼8) (on Ω); we injective nor surjective. In other words, if U is applied on a say that p q are 4- (resp. 8-) connected (in Ω) if p ∼4 q digital image (see Sec. II-C), it may lead to a transformed (resp. p ∼8 q). It is plain that ∼4 (resp. ∼8) is an equivalence image that will present both undefined and conflicted values. relation on Ω; the equivalence classes of Ω with respect to ∼4 By opposition, the Eulerian model consists of computing (resp. ∼8), namely the elements of Ω∼4 (resp. Ω∼8) are T (Z2), i.e., it determines the preimage of the “transformed” called the 4- (resp. 8-) connected components of Ω. space Z2 associated to the rigid transformation. From an 2) Dual adjacency and well-composedness models: A finite imaging viewpoint, this model is more satisfactory, since T is set Ω ⊂ Z2 can be modeled as a binary image I ∈ ImB, defined on the whole transformed space Z2, thus guaranteeing defined by I−1({1}) = Ω and I−1({0}) = Ω = Z2\Ω, or vice that any point of a transformed digital image will be unam- versa. The topological handling of such a binary image cannot biguously defined. Nevertheless, since T presents the same relevantly rely on 8 for both Ω and Ω, due to paradoxes properties as U in terms of non-injectivity and non-surjectivity, related to the discrete version of the Jordan theorem [21]. In this model is not exempt from (topological) drawbacks. this context, it has been proved [22] that such paradoxes could be avoided by considering distinct adjacencies for Ω and Ω, leading to the dual adjacency model (see Fig. 1(a–d)). C. Digital images Definition 2 (Dual adjacency [22]): Let I ∈ ImB. Let Ω = In this article, we consider finite digital images, that are I−1({1}) and Ω = I−1({0}). We say that I is a (8 4)- (resp. 2 defined as functions from Z to a value set V. A digital image a (4 8)-) image if Ω is equipped with 4 (resp. 8), while 2 I : Z → V is considered as finite if there exists a value ⊥ ∈ V Ω is equipped with 8 (resp. 4). We define the set of the such that I−1(V \ {⊥}) is finite. The infinite part I−1({⊥}) connected components of the (8 4)- (resp. (4 8)-) image I as is then considered as the “background” of the image. This (84) −1 −1 assumption is motivated by practical considerations related to C [I] = I ({1})∼8 ∪ I ({0})∼4 (6) (48) −1 −1 the digital definition of images in computer-based applications. (resp. C [I] = I ({1})∼4 ∪ I ({0})∼8 ) (7) Still motivated by practical considerations, we consider three kinds of frequently used value sets for V: (For the sake of concision, we will often write (k k) as a unified notation for (8 4) and (4 8).) • B ; = {0 1} Alternatively, both Ω and Ω may be equipped with . In G Z R 4 • ⊆ or (equipped with the canonical order ); this context, it has been proposed [23] to only focus on images L • , being any arbitrary set (non-equipped with an order). that avoid the issues related to the Jordan theorem, i.e., those V B The first case ( = ) deals with binary images. The set of for which ∼4 and ∼8 are equivalent for both Ω and Ω, thus finite binary images is noted ImB. The second case (V = G) leading to the well-composedness model (see Fig. 1(e–h)). deals with grey-level images. Without loss of generality, we Definition 3 (Well-composedness [23]): Let I ∈ ImB. We can assume that ⊥ = G. The set of finite grey-level images say that I is a well-composed (or a wc-) image if is noted ImG. The thirdV case (V = L) deals with label images. −1 −1 The set of finite label images is noted ImL. ∀v ∈ B I ({v})∼8 = I ({v})∼4 (8) Remark 1: For the sake of readability, a point p = (x y) ∈ Z2 1 1 1 We define the set of the connected components of the wc- will be associated to the pixel [x − 2 x + 2 ] × [y − 2 y + 1 R2 image I as 2 ] ⊂ . In particular, the figures that illustrate the following wc −1 −1 sections rely on this digital interpretation. C [I] = I ({1})∼4 ∪ I ({0})∼4 (9) JOURNAL OF LATEX CLASS FILES, VOL. X, NO. X, JANUARY 20XX 3

in a global fashion, and do not model accurately the possible local modifications of the image topological structure. Broadly speaking, I and IT may have the same fundamental , homotopy-type and/or adjacency-tree while there exist some topological differences between some regions of I and IT that (84) (48) (a) I1 ∈ ImB (b) C [I1] (c) C [I1] (d) I1 ∈ WCB are in correspondence with respect to T (see, e.g., [30]). In the sequel, we propose some conditions that reach that first goal. Our conjecture is that these conditions are necessary and sufficient to locally preserve image topological properties under any rigid transformation. However, in this article, we only establish that they are sufficient to globally preserve

(84) (48) image topological properties under any rigid transformation. (e) I2 ∈ ImB (f) C [I2] (g) C [I2] (h) I2 ∈ WCB Indeed, on the one hand, the proof of the whole conjecture Fig. 1. (a) An image I1 ∈ ImB. (b) The 8-connected components of −1 −1 would require to develop a heavy theoretical framework, that Ω = I1 ({1}) and the 4-connected components of Ω = I1 ({0}). (c) The 4-connected components of Ω and the 8-connected components of falls out of the scope of this journal (see Sec.VI). On the other Ω. Note that I1 has the same topological structure as a (8 4)- and as a hand, the sufficiency of these conditions is the part of the result (4 8)-image. (d) Then, I1 can also be considered in the well-composedness that is actually useful to justify and develop methodological model: the boundaries shared by its foreground and background regions, depicted in green, are 1-manifolds. (e) An image I2 ∈ ImB. (f) The 8- tools for image (pre)processing, that is the second purpose of −1 connected components of Ω = I2 ({1}) and the 4-connected components this article, and probably the most interesting for the reader. of Ω = I−1({0}). (g) The 4-connected components of Ω and the 8-connected 2 We will consider, as (global) topological , the components of Ω. Note that I2 does not have the same topological structure as a (8 4)- and as a (4 8)-image. (h) Then, I2 cannot be considered in adjacency-tree [29]. The motivation of this choice is twofold: the well-composedness model: the boundaries shared by its foreground and (i) the understanding of this topological invariant is probably background regions, depicted in green, are not 1-manifolds (see the red dots). easier for most readers; and (ii) in the 2D case, its preservation (a,d,e,h) Ω is depicted in black, and Ω in white. (b,c,f,g) For the sake of readability, each connected component is represented by a different colour. is equivalent [31] to the preservation of the homotopy-type, that is the most commonly used topological invariant in image processing. We now recall the definition of the adjacency-tree. The set of the finite well-composed binary images is noted (kk) Let I ∈ ImB (resp. WCB). Let Ω1 Ω2 ∈ C [I] (resp. WCB. (kk) Cwc[I]), with Ω = Ω . We note Ω Ω (resp. Ω wc Remark 4: When “interpreting” digital topology in a con- 1 2 1 I 2 1 I Ω ) if there exist p ∈ Ω and q ∈ Ω such that p q. tinuous framework [17], an image is well-composed iff the 2 1 2 4 It is plain that (kk) (resp. wc) is an adjacency relation, boundaries shared by the foreground and background regions I I (kk) −1 are manifolds [23] (see Fig. 1(d,h)). and that Ω1 I Ω2 implies that Ω1 ∈ I ({1})∼k and −1 Remark 5: The well-composedness model is more restric- Ω2 ∈ I ({0})∼k or vice versa. We define the (k k)- (resp. (kk) (kk) (kk) tive than the dual adjacency one. Indeed, any I ∈ ImB can be wc-) adjacency graph of I as G (I) = (C [I] I ) wc wc wc considered in the dual adjacency model, but not necessarily in (resp. G (I) = (C [I] I )). This graph is connected and the well-composedness one, i.e. acyclic, and is indeed a tree. It can be equipped with a root that is the (only) infinite connected component of C(kk)[I] WCB ⊂ ImB (10) (resp. Cwc[I]), thus leading to the following definition. Definition 6 (Adjacency tree [29]): Let I ∈ ImB (resp. III.PURPOSEANDCHOICES WCB). The (k k)- (resp. wc-) adjacency tree of I is the triple Let us consider an image I ∈ ImV, a transformation T : 2 2 Z → Z , and the transformed image IT ∈ ImV obtained (kk) (kk) (kk) (kk) T (I) = C [I] I BI (11) from I and T . A frequent question in image analysis is: “Does wc wc wc wc (resp. T (I) = C [I] I BI ) (12) T preserve the topology between I and IT ?” It is generally answered by considering topological invariants of the images.  The most simple ones are, e.g., the Euler-Poincar´echarac- (kk) (kk) wc wc where BI ∈ C [I] (resp. BI ∈ C [I]) is the unique teristic, or the Betti Numbers. However, they are too weak to infinite connected component of I. correctly model the “topology preservation” between images. We are now ready to present our definition of topology- It is then mandatory to consider stronger topological invariants, preservation under rigid transformation. e.g., the (digital) fundamental group [24], the homotopy-type Definition 7 (Topological invariance): Let ImB (resp. (considered via notions of simple points/sets [25], [26], [27], I ∈ WCB). We say that is - (resp. -) topologically [28]), or the adjacency-tree [29]. I (k k) wc invariant if any T ∈ RigZ2 induces an isomorphism between Our first goal is to provide conditions under which 2D digi- (kk) wc (kk) wc tal images preserve their topological properties under any rigid T (I) (resp. T (I)) and T (I ◦ T ) (resp. T (I ◦ T )), (kk) transformation. In this context, a crucial issue is the choice and if I ◦ T ∈ ImB (resp. WCB). We note InvB (resp. wc of the topological invariant used to formalise this problem. InvB ) the set of the (k k)- (resp. wc-) topologically invariant Any of those presented above describe topology preservation binary images. JOURNAL OF LATEX CLASS FILES, VOL. X, NO. X, JANUARY 20XX 4

IV. THEORETICAL RESULTS Proposition 11: We have

In this section, we define a notion of regularity (Sec. IV-C) wc (kk) Inv ⊆ Inv ∩ WCB ⊆ NSB (17) that provides conditions under which binary images are topo- B B  logically invariant (Sec. IV-D). We then derive analogue con- In the sequel, we then carry out our study of topological in- ditions for grey-level (Sec. IV-E) and label images (Sec. IV-F). variance within the set of well-composed non-singular images, independently from the considered (dual adjacency, or well- A. Preliminary remarks composedness) model. As stated above, we consider the Eulerian transformation model (Sec. II-B), and we first focus on binary images. In C. Regularity other words, given an image I ∈ ImB and a discrete rigid Let us now introduce a new notion that strenghtens the transfomation T ∈ RigZ2 (intrinsically associated to a rigid notion of well-composedness. transformation T ∈ RigR2 ), we consider the transformed Definition 12 (Regularity): Let I ∈ NSB. We say that I is −1 image IT ∈ ImB defined as k-regular (resp. k-regular) if for any p q ∈ I ({1}) (resp. I−1({0})), we have IT = I ◦ T = I ◦ D ◦ T|Z2 (13) p q =⇒ ∃⊞ ⊆ I−1({1}) p q ∈ ⊞ (18) −1 −1 4 By setting Ω = I ({1}), Ω = I ({0}) and ΩT = −1 −1 −1 (resp. p 4 q =⇒ ∃⊞ ⊆ I ({0}) p q ∈ ⊞ ) (19) I ({1}), ΩT = I ({0}), Eq. (13) rewrites as T T  where ⊞ is a “square” element, i.e., ⊞ , Ω = Z2 ∩ T −1(Ω ⊕ ) (14) = {x x+1}×{y y+1} T for Z2. We say that is regular if it is both - and 2 −1 (x y) ∈ I k ΩT = Z ∩ T (Ω ⊕ ) (15) k k k-regular. We note RegB (resp. RegB, resp. RegB) the set of where ⊕ is the dilation operator defined in mathematical the k-regular (resp. k-regular, resp. regular) binary images. morphology (see, e.g., [32]-Ch. 1), and ⊂ R2 is the unit Remark 13: Following mathematical morphology terminol- square, namely a pixel. These equations can lead to different ogy and notations (see, e.g., [32]-Ch. 1), if I is k- (resp. k-) results depending on the definition of this pixel, that may be regular, then Ω = I−1({1}) (resp. Ω = I−1({0})) is open by 1 1 2 1 1 2 any structuring element ⊞, i.e. = [− 2 2 ] or ] − 2 2 [ . This motivates the next remark. Remark 8: In this work, we assume that T and T are such γ (Ω) = Ω ⊖ ⊞ ⊕ ⊞ = Ω (20) that Z2 does not intersect any transformed pixel border. In ⊞ other words, we consider that Eqs. (13)–(15) lead to equal results for both definitions of . From a theoretical view- D. Topological invariance: the binary case point, this allows us to develop a general discussion without We now establish our main result for binary images, that confusing variants related to D. From a pratical viewpoint, this states that regularity implies topological invariance. assumption is compliant with computer-based applications, Theorem 14: that generally rely on floating point arithmetic. k (84) RegB ⊆ InvB (21) k (48) B. Image space restrictions RegB ⊆ InvB (22) wc We first state that the binary images considered for the study RegB ⊆ InvB (23) of topological invariance can be chosen in a subspace of ImB. Remark 9: We restrict our study of (k k)-topological in- E. Topological invariance: the grey-level case variance within the binary images to the subspace WCB ⊂ In Sec. II-C, it has been observed that a grey-level image 1 ImB. This restriction is motivated by the fact that any takes its values in a finite (and totally ordered) subset of Z or I ∈ ImB \ WCB presents configurations (see Th. 23) that R. Any such image is then equivalent to an image I : Z2 → G, may be non-compliant with the definition of (k k)-topological where G = [[0 m]] ⊂ Z is a finite interval, and ⊥ = 0. Without invariance. loss of generality, we then focus on such images. We now introduce a notion of singularity, and we establish A grey-level image I ∈ ImG can unambiguously be mod- that singular images cannot be topologically invariant, thus eled by the finite set of its binary level set images λv(I) ∈ ImB reducing the image subspace to consider. defined, for any v ∈ G as Definition 10 ((Non-)singular image): Let I ∈ ImB. We λ (I): Z → B say that I is a singular image if v 1 if v I(p) (24) 2 2 p → ∃p ∈ Z ∀q ∈ Z q 4 p =⇒ I(p) = I(q) (16)  0 otherwise

  We note NSB the set of the well-composed images that are The image I can then be reconstructed as the supremum of not singular. these |G| level set images, with respect to the pointwise order ≤ on functions induced by the order on G 1This restriction, presented as a motivated –but arbitrary– choice when considering a global topological invariant, may however be proved when ≤ considering a local one. As discussed in Sec. III, such a proof is beyond I = vλv(I) (25) the scope of this article. v_∈V JOURNAL OF LATEX CLASS FILES, VOL. X, NO. X, JANUARY 20XX 5

Based on this modelling of I ∈ ImG by the set {λv(I)}v∈G, the topology of a label image I ∈ ImL, and its potential the notions previously introduced for binary images can be preservation, are considered by observing all the binary images extended to grey-level ones2. In particular, we have exhaustively induced by labels Λ that are the elements of the power set 2L. This leads to the following notions. WCG = I ∈ ImG | ∀v ∈ G λv(I) ∈ WCB (26) A label image I ∈ ImL can unambiguously be modeled by G  G G B NS = I ∈ WC | ∀v ∈ λv(I) ∈ NS (27) the finite set of its binary characteristic images χΛ(I) ∈ ImB  L Moreover, we define the analogues of the binary notions of defined, for any Λ ∈ 2 as topological invariance (Def. 7) and regularity (Def. 12). χΛ(I): Z → B Definition 15 (Grey-level topological invariance): Let I ∈ 1 if I(p) ∈ Λ (31) p → NSG. We say that I is (k k)- (resp. wc-) topologically  0 otherwise (kk) wc invariant if for any v ∈ G, λv(I) ∈ InvB (resp. InvB ). In particular, by identifying (i) the sets {l}l L and {{l}}l L, (kk) wc ∈ ∈ We note InvG (resp. InvG ) the set of the (k k)- (resp. and (ii) the monoids (B ) and ({L ∅} ∪), the image I can be wc-) topologically invariant grey-level images. reconstructed –similarly to the case of grey-level images (see Definition 16 (Grey-level regularity): Let I ∈ NSG. We Eq. (25))– as the infimum of these 2|L| characteristic images, say that I is k-regular (resp. k-regular, resp. regular) if for with respect to the pointwise order ⊑ on functions induced by k k L any v ∈ G, λv(I) ∈ RegB (resp. RegB, resp. RegB). We note the inclusion order ⊆ on 2 k k RegG (resp. RegG, resp. RegG) the set of the k-regular (resp. ⊑ -regular, resp. regular) grey-level images. k I = ΛχΛ(I) (32) The following theorem, that is the grey-level analogue of Λ^∈2L Th. 14, straightforwardly derives from this last theorem, and Based on this modelling of ImL by the set Defs. 15, 16. I ∈ L , the notions previously introduced for binary Theorem 17: {χΛ(I)}Λ∈2 images can be extended3 to label ones. In particular, we have k (84) RegG ⊆ InvG (28) L WCL = I ∈ ImL | ∀Λ ∈ 2 χΛ(I) ∈ WCB (33) k (48) RegG ⊆ InvG (29) L NSL = I ∈ WCL | ∀Λ ∈ 2 χ (I) ∈ NSB (34) wc Λ RegG ⊆ InvG (30)  Moreover, we define the analogues of the binary notions of Remark 18: The topological invariance (and thus, the reg- topological invariance (Def. 7) and regularity (Def. 12). ularity) of I ∈ ImG also leads to the preservation of the Definition 19 (Label topological invariance): Let hierarchy of its connected components between successive I ∈ NSL. We say that I is (k k)- (resp. wc-) topologically levels. More precisely, the (k k)- (resp. wc-) topological L (kk) wc invariant if for any Λ ∈ 2 , χΛ(I) ∈ InvB (resp. InvB ). invariance implies that for any T ∈ RigZ2 , the images I and (kk) wc I ◦ T have isomorphic component-trees [34]. This assertion We note InvL (resp. InvL ) the set of the (k k)- (resp. is easy to prove, based on the fact that establishes a wc-) topologically invariant label images. (i) T 4 bijection between the connected components of the initial and Remark 20: In the sequel, we restrict our study to the case transformed level set images (Prop. 35), and (ii) T preserves, of wc-topological invariance for label images. Definition 21 (Label regularity): Let I ∈ NSL. We say by construction (see Eqs. (3), (24)–(25)), the inclusion rela- L tion between these components at successive levels. A more that I is regular if for any Λ ∈ 2 , χΛ(I) ∈ RegB. We note complete discussion on this topic is beyond the scope of this RegL the set of regular label images. article; the reader is referred, e.g., to [34], [35] or [32]-Ch. 7 The following theorem, that is the label analogue of Th. 14, (and the references therein) for complementary information. straightforwardly derives from this last theorem, and Defs. 19, 21. Theorem 22: F. Topological invariance: the label case wc RegL ⊆ InvL (35) Similarly to the case of grey-level images, it has been observed in Sec. II-C that a label image takes its values in V. METHODOGY a finite set. Any such image is then equivalent to an image In Sec. IV, we have established sufficient conditions for I : Z2 → L, where L is finite and ⊥ ∈ L. Without loss of generality, we now focus on such images. guaranteeing topological invariance, thanks to the notion of Several attempts have been made to propose topological regularity (Ths. 14, 17, 22). From this theoretical study, we frameworks for label images, and more precisely to define first propose simple algorithms to characterise the regularity of what is the exact meaning of the “topology preservation” in 3The definition of well-composedness for label images proposed here (see such images [36], [37], [5], [38]. In this work, we follow Eq. (33)) slightly differs from the one introduced in [36], that only requires L a recent and general proposal [39], [40], that consists of that χ{l}(I) ∈ WCB for any proto-label l ∈ . 4 considering the values of L as “proto-labels”, and any subsets As in Rem. 9 and the associated footnote, this restriction is motivated by the fact that the (8 4)- and (4 8)-topological invariance (that are equal, of such values as the actual labels of the image. In other words, from there very definitions) may be proved to be equal to the wc-topological invariance. Once again, the proof of this assertion is beyond the scope of this 2A notion of grey-level well-composedness has also been proposed in [33]. article. JOURNAL OF LATEX CLASS FILES, VOL. X, NO. X, JANUARY 20XX 6

satisfies at least one of the following two conditions (up to π2 rotations and symmetries) (a) (b) (c) I(p − (1 0)) < I(p) > I(p + (1 0)) (41)

k (resp. I(p − (1 0)) > I(p) < I(p + (1 0))) (42) Fig. 2. Forbidden patterns in WCB (a) and in RegB (a–c), up to π2 rotations k and symmetries. The patterns forbidden in RegB are obtained from (a–c) by I(p + (0 1)) I(p) > I(p − (1 0)) I(p + (1 1)) value inversion. Black (resp. white) points have value 1 (resp. 0). (43) (resp. I(p + (0 1)) I(p) < I(p − (1 0)) I(p + (1 1))) an image (Sec. V-A). Then, we describe some preprocessing (44) strategies that enable to turn a non-regular image into a regular Corollary 28: Let I ∈ WCL. We have I∈ RegL iff there (and then topologically invariant) one (Sec. V-B). exists p ∈ Z that satisfies at least one of the following two conditions (up to π2 rotations and symmetries) A. Pattern-based characterisation of regular images I(p − (1 0)) = I(p) = I(p + (1 0)) (45) In this section, we show that the regularity of a 2D digital I(p) = I(p − (1 0)) = I(p + (0 1)) = I(p + (1 1)) = I(p) image can be easily determined by considering a small set (46) of specific patterns. This result straightforwardly leads to an algorithm of optimal time and space complexity. The characterisation of binary, grey-level and label images as regular ones can then be carried out by simply checking 1) Well-composedness characterisation: Regular images that they do not contain the forbidden patterns induced by the are defined within the set of well-composed ones. A pre- binary patterns depicted in Fig. 2(a–c). requisite is then to characterise WCB. This is tractable by 3) Complexity: The following result straightforwardly de- considering a specific 2 × 2 pattern [23]. rives from Th. 23, Prop. 26, and their respective corollaries. Theorem 23 ([23]): Let I ∈ ImB. We have I∈ WCB iff Proposition 29: Let I ∈ WCV (with V = B, G or L). Let there exist distinct points p q r s ∈ Z2, with p q 4 4 S ⊂ Z2 be such that I−1(V \ {⊥}) ⊆ S (practically, S is the r s p, that verify 4 4 finite set where I is defined in a computer-based application). I(p) = I(q) = I(r) = I(s) (36) Then, the algorithm that determines the (non-)regularity of I, has a time complexity O(|S|), and a space complexity O(1). Based on Th. 23 and Defs. 15, 19, we straightforwardly derive characterisations of grey-level and label well-composedness. B. Image regularisation Corollary 24: Let I ∈ ImG. We have I∈ WCG iff there 2 We now propose two strategies for preprocessing images exist distinct points p q r s ∈ Z , with p 4 q 4 r 4 in order to obtain regular –and then topologically invariant– s 4 p, that verify ones, before further rigid transformation. Such regularisation I(p) > I(q) < I(r) > I(s) < I(p) (37) strategies (i) must preserve the topological properties of the images, and (ii) should preserve as much as possible their Corollary 25: Let ImL. We have WCL iff there I ∈ I∈ geometric properties. p q r s Z2 p q r exist distinct points ∈ , with 4 4 4 1) Iterative homotopic regularisation: A first strategy con- s p 4 , that verify sists of locally modifying the image to eliminate the forbidden I(p) = I(q) = I(r) = I(s) = I(p) (38) configurations defined in Eqs. (36)–(46) and Fig. 2. Let I ∈ ImV (or WCV, if we aim to obtain regularity, and The characterisation of binary, grey-level and label images not only k or k-one). The problem to tackle can be expressed as well-composed ones can then be carried out by simply as a constrained optimisation one, described by checking that they do not contain the forbidden patterns R(I) = arg min DI (47) induced by the binary pattern depicted in Fig. 2(a). ⋆ RegV(I) 2) Regularity characterisation: We now propose a pattern- ⋆ based characterisation of regular binary images. where R(I) is the regularised version of I; RegV(I) is the k ⋆ k k Proposition 26: Let I ∈ WCB. We have I∈ RegB (resp. subset of RegV ∈ {RegV RegV RegV} composed by the k −1 images that have the same topology as I; and DI : ImV → R RegB), and a fortiori RegB, iff there exists p ∈ I ({1}) + (resp. I−1({0})) that satisfies at least one of the following is a cost function that describes the “distance” from I, from a two conditions (up to π2 rotations and symmetries) geometric viewpoint. (The definition of DI actually depends on the targeted application, and can rely, e.g., on Hausdorff I(p − (1 0)) = I(p) = I(p + (1 0)) (39) distance, or any standard (dis) measure.) 2 I(p + (0 1)) = I(p) = I(p − (1 0)) = I(p + (1 1)) (40) In real applications, I is defined on a finite set S ⊂ Z , and so is the space of (potential) solutions of Eq. (47). However, Based on Prop. 26 and Defs. 15, 19, we straightforwardly the size O(|V||S|) of this space is huge. Then, one has to derive characterisations of grey-level and label regularity. accept to only look for an approximate solution of Eq. (47), k Corollary 27: Let I ∈ WCG. We have I∈ RegG (resp. instead of an exact one. In this context, a tractable strategy is to k 2 RegG), and a fortiori RegG, iff there exists p ∈ Z that consider the homotopy-guided approach initially developped JOURNAL OF LATEX CLASS FILES, VOL. X, NO. X, JANUARY 20XX 7

embedding, but simply on a 2 × 2 super-resolution approach. More precisely, from I ∈ WCV, we can define a new image I : Z2 → V 2×2 (49) p = (x y) → I((⌊x2⌋ ⌊y2⌋))

The proof of the following result straightforwardly derives from this definition. Fig. 3. Some well-composed images that cannot be regularised without a Proposition 31: Let I ∈ WCV (with V = B, G or L). Then super-resolution approach, due to fine texture effects. we have I2×2 ∈ RegV. Moreover, I2×2 and I have the same homotopy-type when considered as (k k)- (resp. wc-) images. Finally, Eqs. (48)–(49) provide a global super-resolution for monotonic transformations [41], and then adapted to non- strategy that enables to redefine any (8 4)-, (4 8)-, or wc- monotonic ones [42], [43], [6], [38]. image as a regular –and thus topologically invariant– one. By This strategy starts from the image I, and iteratively elimi- opposition to the previous strategy, this one has the advantages nates forbidden configurations by modifying the value of one of being deterministic and geometrically preserving (up to point p ∈ S at each iteration, until stability. The choice of p a possible “thickening” of the interpixel space). Its main is guided (i) by the position of the forbidden configurations, drawback, by opposition to the first strategy, is its higher (ii) by DI , and (iii) by choosing p as a simple point. This spatial cost, as it models an image of size |S| as a new one of is feasible for V = B, G or L since notions of simple points size 4|S| (and 16|S| in the worst cases). have been proposed in binary [44], grey-level [45] and label cases [39]. VI.CONCLUSION The obtained algorithm can be seen as an extension of the We have investigated the notion of topology preservation ones presented in [31], [46] for well-composedness recovery, of 2D digital images under rigid transformation. Based on to the case of regularity recovery. In particular, it presents the theoretical results established in the digital topology frame- same strenghts and weaknesses. Indeed, in most application work, we have derived efficient algorithms for analysing and cases, it will converge in linear time with respect to the number preprocessing such images. The genericity of these results and of forbidden configurations, that are often sparsely distributed methods, in terms of topological models (dual adjacency and within images. Nevertheless, in pathological cases (e.g., in well-composedness) and values (binary, grey-level and label presence of fine textures, see Fig. 3), it may not converge, images), authorise their actual use in real applications. or even fail. To deal with this issue, we propose hereafter a A short term purpose will be to prove that the notion of second –super-resolution– regularisation strategy. regularity provides not only sufficient, but also necessary con- 2) Super-resolution regularisation: Let I ∈ ImV (with ditions for topological invariance (in other words, that the ⊆ V B G = or ) be a (k k)-image. Even before the issue of symbols in Ths. 14, 17 and 22, are indeed = symbols). To this regularisation, it may happen that I cannot be modified into end, it will be necessary to define a relevant local topological a topologically-equivalent well-composed image, when using invariant, relying, e.g., on the topological structure that can be a strategy such as the one presented above. It is then possible defined on tilings of Z2 induced by rigid transformations. to oversample I by explicitely representing its “interpixel” We will also investigate the links between our results, topological structure. This can be done by embedding I into established in a discrete framework, and some results obtained (kk) the Khalimsky space [18], then leading to a new image IK in the research field of digitisation, that intrinsically merges defined as both discrete and continuous frameworks. Indeed, as suggested by Eqs. (14)–(15) the rigid transformation of a digital image I(84) : Z2 → V K can be interpreted as the (re)digitisation of its associated 2p → I(p) continuous pixel-based representation. Based on this assertion, 2p + (0 1) → I(p + {0} × {0 1}) our notion of regularity may be seen as a discrete analogue of 2p + (1 0) → W I(p + {0 1} × {0}) the notion of r-regularity developped fifteen years ago [47], 2p + (1 1) → W I(p + {0 1} × {0 1}) [48], for topology-preserving digitisation purpose. These links,

W (48) that are easy to intuit, are less trivial to formally establish. (48) (The image IK is defined by substituting to in From a more methodological viewpoint, the next step will Eq. (48).) The proof of the following result straightforwarV W dly consist of passing from Z2 to Z3. This raises supplementary derives from these definitions. difficulties, related to the more complex definitions of topo- Proposition 30: Let I ∈ ImV (with V = B or G). Then we logical models [49] and topological invariants [30]. To cope (kk) (kk) have IK ∈ WCV. Moreover, IK and I have the same with this challenge, various ways may be considered. A first homotopy-type, when considered as (k k)-images. one relies on the possible analogy between regularity and r- From now on, we then assume that I ∈ WCV (with V = B, regularity (see above). A second one relies on a morphological G or L). It may happen that I cannot be modified into a interpretation of regularity. Indeed, as stated in Rem. 13, regular image when using homotopic iterative regularisation. regular images are open for square structuring elements, but Once again, an oversampling strategy can be alternatively the counterpart is not true. A specific class of open images, for proposed. This strategy no longer relies on Khalimsky space which the opening relies on homotopic erosions and dilations, JOURNAL OF LATEX CLASS FILES, VOL. X, NO. X, JANUARY 20XX 8 may be considered and compared to the family of regular D. Proof of Theorem 14 images, in a morpho-topological framework [50], [51], [52]. k k Proposition 34: Let I ∈ RegB (resp. RegB, resp. RegB). ACKNOWLEDGEMENT Let T ∈ RigZ2 . Then T|(I◦T )−1({1}) establishes a homomor- −1 −1 phism from ((I ◦ T ) ({1}) 4) (resp. ((I ◦ T ) ({1}) 8 The research leading to these results has received funding −1 −1 ), resp. ((I ◦ T ) ({1}) 4)) to (I ({1}) ∼4) (resp. from the French Agence Nationale de la Recherche (Grant −1 −1 (I ({1}) ∼8), resp. (I ({1}) ∼4)), while T|(I◦T )−1({0}) Agreement ANR-2010-BLAN-0205). −1 establishes a homomorphism from ((I ◦ T ) ({0}) 8) −1 −1 APPENDIX (resp. ((I ◦ T ) ({0}) 4), resp. ((I ◦ T ) ({0}) 4)) to −1 −1 −1 (I ({0}) ∼8) (resp. (I ({0}) ∼4), resp. (I ({0}) ∼4)). A. Auxiliary properties ′ ′ −1 Proof Let I ∈ RegB. Let p q ∈ (I ◦ T ) ({1}), with The following two properties deal with configurations that ′ ′ ′ ′ p 4 q . Let p = T (p ), q = T (q ). From Eq. (13), two have already been discussed in the literature (see, e.g., [14], cases can occur: (i) p = q, and then p ∼4 q; (ii) p 8 q, [15]. Their proofs, that do not present much difficulties, are left that implies p ∼4 q (Def. 3), and then p ∼4 q. The same to the reader. (We recall that we are still under the hypotheses −1 k reasonning holds for I ∈ RegB and (I ◦T ) ({0}); I ∈ RegB of Rem. 8.) −1 k −1 2 and (I ◦ T ) ({1}); and I ∈ RegB and (I ◦ T ) ({0}). Property 32: Let p ∈ Z . There exists T ∈ Rig 2 such Z Let I ∈ Regk . Let p′ q′ ∈ (I ◦ T )−1({0}), with p′ q′. that B 8 Let p = T (p′), q = T (q′). From Eq. (13), three cases can p ∈ T (Z2) (50) occur: (i) p = q, and then p ∼8 q; (ii) p 8 q, and then 2 Let T be such a transformation. Let {n e s w} = {q ∈ Z | p ∼8 q; or (iii) p = q + (2 0) or (2 1), up to π2 rotations p 4 q}, with n 8 e 8 s 8 w. There exist distinct points and symmetries, and then p ∼8 q derives from Prop. 26. The ′ ′ ′ ′ Z2 ′ ′ ′ ′ ′ k −1 n e s w ∈ , with n 4 e 4 s 4 w 4 n , such same reasonning holds for I ∈ RegB and (I ◦ T ) ({1}). that We can then licitely define the following notions. Let I ∈ ′ ⋆ q n e s w q q (51) 2 ∀ ∈ { } = T ( ) WCB and T ∈ RigZ . Let us consider the function TI (with Property 33: Let C = {x x + 1} × {y y + 1} ⊂ Z2. Let ⋆ = (k k) or wc) defined as −1 −1 T ∈ RigZ2 . Then we have T (C)∼4 = {T (C)}. T ⋆ : C⋆[I ◦ T ] → C⋆[I] I (52) C → CT ⊇ T (C) B. Proof of Proposition 11 We are now ready to establish the first part of the iso- Let I ∈ WCB. Let us suppose that I∈ NSB. Let p ∈ Z2 2 morphism, namely the one-to-one correspondence between the be such that ∀q ∈ Z (q 4 p) ⇒ (I(p) = I(q)) (Def. 10). Then, Th. 23 implies that q Z2 q p p connected components of the initial and transformed images. ∀ ∈ ( 8 ) ⇒ (I( ) = k k I(q)), i.e., {p} ∈ C(kk)[I]. From Prop. 32 (Eq. (50)), there Proposition 35: Let I ∈ RegB (resp. RegB, resp. RegB). (48) (84) wc 2 2 exists T ∈ RigZ2 such that p ∈ T (Z ). Such a transfor- Let T ∈ RigZ . Then TI (resp. TI , resp. TI ) is a mation T does not induce a bijection between C(kk)[I] and bijection. ⋆ C(kk)[I ◦T ], and a fortiori an isomorphism between T(kk)(I) Proof Let C ∈ C [I] and p ∈ C. Since I∈ NSB, we can choose q ∈ C such that p q. Then, from Prop. 32 and T(kk)(I ◦T ), and thus we have I∈ Inv(kk) (Def. 7). By 4 B (Eq. (50)), there exists p′ Z2 such that p′ p q . (kk) ∈ T ( ) ∈ { } ⊆ C contraposition, we have (InvB ∩ WCB) ⊆ NSB. Finally, ⋆ Thus, TI is a surjection. wc (kk) ′ ′ −1 InvB ⊆ InvB is a straightforward consequence of Defs. 3, We assume that I ∈ RegB. Let p q ∈ (I ◦ T ) ({1}). 7. Let p = T (p′), q = T (q′). Let us suppose that p q ∈ C ∈ −1 k I ({1})∼4. We have p ∼4 q, i.e., there exists a set {pi}i=0 −1 C. Proof of Proposition 26 (k 0) such that p0 = p, pk = q, pi ∈ I ({1}) for any i ∈ k −1 Let I ∈ RegB. Let p ∈ I ({1}). Since I ∈ NSB [[0 k]], and pi 4 pi+1 for any i ∈ [[0 k−1]]. Let i ∈ [[0 k−1]]. −1 Z2 ′ ′ −1 (Def. 12), there exists q ∈ I ({1}) such that p 4 q. Then If pi pi+1 ∈ T ( ), we set pi pi+1 ∈ (I ◦ T ) ({1}) such ′ ′ Eq. (18) forbids Eqs. (39)–(40). that T (pi) = pi and T (pi+1) = pi+1; it then derives from −1 ′ ′ Let us suppose that for all p ∈ I ({1}) Eqs. (39)–(40) Prop. 33 and Def. 12 that pi ∼4 pi+1. Let us now suppose that −1 2 2 are not verified. Let p ∈ I ({1}). As p does not verify pi or pi+1 ∈ T (Z ), for instance pi+1 ∈ T (Z ). It derives −1 Z2 Eq. (39), we choose q ∈ I ({1}) such that p 4 q. Up to from Prop. 32 (Eq. (51)) that pi+2 ∈ T ( ) (for the same Z2 ′ ′ π2 rotations, we can set q = p + (0 1). Since p does not reasons, we cannot have pi pi+1 ∈ T ( )). We set pi pi+2 ∈ −1 −1 ′ ′ verify Eq. (39), we have p+(1 0) or p−(1 0) ∈ I ({1}). Up (I ◦ T ) ({1}) such that T (pi) = pi and T (pi+2) = pi+2. −1 ′ ′ to symmetries, we can set p+(1 0) ∈ I ({1}). If p+(1 1) ∈ From Prop. 32 (Eq. (51)), we then have pi ∼4 pi+2. Then −1 −1 k ′ ′ −1 I ({1}), then, p q satisfy the RHS of Eq. (18). Let us now Π = T ({pi}i=0) is such that p q ∈ Π ⊆ (I ◦ T ) ({1}) −1 −1 suppose that p + (1 1) ∈ I ({0}). Since q does not verify and that there exists CT ∈ (I ◦ T ) ({1})∼4 such that Π ⊆ −1 −1 Eq. (39), we have p + (−1 1) ∈ I ({1}). But Eq. (40) CT . The same reasonning holds for RegB and (I ◦T ) ({0}); −1 k −1 k −1 implies p − (1 0) ∈ I ({1}), and p q then satisfy the RHS RegB and (I ◦ T ) ({1}); and RegB and (I ◦ T ) ({0}). k k ′ ′ −1 of Eq. (18). Then, I ∈ RegB. We now assume that I ∈ RegB. Let p q ∈ (I◦T ) ({0}). The result follows by contraposition. The same reasonning Let p = T (p′), q = T (q′). Let us suppose that p q ∈ k −1 holds for RegB. C ∈ I ({0})∼8. As I ∈ WCB, we actually have C ∈ JOURNAL OF LATEX CLASS FILES, VOL. X, NO. X, JANUARY 20XX 9

−1 ′ ′ ′ I ({0})∼4. Then, we have p ∼4 q, i.e., there exists a set exist p ∈ C1 such that T (p ) = p, and q ∈ C2 such that k −1 ′ {pi}i=0 (k 0) such that p0 = p, pk = q, pi ∈ I ({0}) T (q ) = q. From Eq. (13), three possibilities can occur: (i) ′ ′ ⋆ ′ ′ ′ ′ for any i ∈ [[0 k]], and pi 4 pi+1 for any i ∈ [[0 k − 1]]. p 4 q and then C1 I C2; (ii) p 8 q and p 4 q , and Z2 ′ ′ ′ Z2 ′ ′ ′ Let i ∈ [[0 k − 1]]. If pi pi+1 ∈ T ( ), we set pi pi+1 by choosing r ∈ such that p 4 r 4 q , we have either ′ ′ ′ ⋆ ′ ′ such that T (pi) = pi and T (pi+1) = pi+1; it then derives r ∈ C1 or C2, and then C1 I C2; (iii) q = p + (2 0), up ′ ′ ′ ′ from Eq. (13) that pi ∼8 pi+1. Let us now suppose that pi to π2 rotations, and by choosing r = p + (1 0), we have Z2 Z2 ′ ⋆ Z2 or pi+1 ∈ T ( ), for instance pi+1 ∈ T ( ). It derives either r ∈ C1 or C2, and then C1 I C2. Case 2: p ∈ T ( ) 2 2 from Prop. 32 (Eq. (51)) that pi+2 ∈ T (Z ) (for the same (the same holds for q ∈ T (Z )). Since I ∈ NSB, there exists Z2 ′ ′ ⋆ ⋆ reasons, we cannot have pi pi+1 ∈ T ( )). We set pi pi+2 r ∈ TI (C1) and s ∈ TI (C2) such that p 4 r 8 s 4 p. ′ ′ ′ such that T (pi) = pi and T (pi+2) = pi+2. From Prop. 32 Then, from Prop. 32 (Eq. (51)), there exists r ∈ C1 such that ′ ′ −1 k ′ ′ ′ ′ ′ (Eq. (51)), we then have pi ∼4 pi+2. Then Π = T ({pi}i=0) T (r ) = r, and s ∈ C2 such that T (s ) = s, and r 4 s , ′ ′ −1 ⋆ is such that p q ∈ Π ⊆ (I ◦ T ) ({0}) and that there and then C1 I C2. −1 exists CT ∈ (I ◦ T ) ({0})∼8 such that Π ⊆ CT . The By gathering Props. 35–37, we obtain Th. 14. k −1 same reasonning holds for RegB and (I ◦ T ) ({1}). It straightforwardly follows from these two sub-reasonnings REFERENCES ⋆ [1] D. L. Pham, P.-L. Bazin, and J. L. Prince, “Digital topology in brain that TI is indeed an injection. imaging,” IEEE Signal Proc. Mag., vol. 27, no. 4, pp. 51–59, 2010. The following proposition is a consequence of this result. [2] P. Soille and M. Pesaresi, “Advances in mathematical morphology k k Proposition 36: Let I ∈ RegB (resp. RegB, resp. RegB). applied to geoscience and remote sensing,” IEEE T. Geosci. Remote, vol. 40, no. 9, pp. 2042–2055, 2002. Let T ∈ RigZ2 . We have I ◦ T ∈ ImB (resp. ImB, resp. ⋆ ⋆ ⋆ [3] A. Rosenfeld and J. L. Pfaltz, “Sequential operations in digital picture WCB). Moreover, we have TI (BI◦T ) = BI . processing,” J. ACM, vol. 13, no. 4, pp. 471–494, 1966. Proof The fact that I ◦ T ∈ ImB straightforwardly derives [4] O. Duda, P. E. Hart, and J. H. Munson, “Graphical data processing from the fact that ⋆ is a bijection, and from the definition research study and experimental investigation,” Stanford Research Insti- TI tute, Tech. Rep. AD650926, 1967. 2 −1 of T (Eq. (13)), that implies that for any p ∈ Z , T ({p}) [5] P.-L. Bazin, L. M. Ellingsen, and D. L. Pham, “Digital homeomorphisms ⋆ ⋆ ⋆ in deformable registration,” in IPMI, Proc., ser. LNCS, vol. 4584. is finite. We have TI (BI◦T ) = BI for the very same reasons. Springer, 2007, pp. 211–222. Let us now consider that WCB. Then, from Th. 23, I ◦ T∈ [6] S. Faisan, N. Passat, V. Noblet, R. Chabrier, and C. Meyer, “Topology- 2 there exist distinct points n e s w ∈ Z , with n 4 e 4 preserving warping of binary images according to one-to-one mappings,” s 4 w 4 n, that verify Eq. (36). From Eq. (13), we then IEEE T. Image Process., vol. 20, no. 8, pp. 2135–2145, 2011. derive that there exist distinct points n′ e′ s′ w′ Z2 such [7] V. Noblet, C. Heinrich, F. Heitz, and J.-P. Armspach, “3-D deformable ∈ image registration: A topology preservation scheme based on hierar- ′ ′ ′ ′ that T (n) = n , T (e) = e , T (s) = s , T (w) = w . Still chical deformation models and interval analysis optimization,” IEEE T. ′ ′ ′ ′ from Eq. (13), we have moreover n 8 e 8 s 8 w 8 Image Process., vol. 14, no. 5, pp. 553–566, 2005. n′. These equalities authorise only three configurations, up [8] P. Ngo, Y. Kenmochi, N. Passat, and H. Talbot, “Combinatorial structure for rigid transformations in 2D digital images,” Comput. Vis. Image ′ ′ ′ to π2 rotations and symmetries: (i) e = n + (1 0), s = Und., In Press, DOI: 10.1016/j.cviu.2012.08.014. n′ + (2 −1), w′ = n′ + (1 −1); (ii) e′ = n′ + (1 0), s′ = [9] E. Andres, “The quasi-shear rotation,” in DGCI, Proc., ser. LNCS, vol. n′ + (1 −1), w′ = n′ + (0 −1); (iii) e′ = n′ + (1 −1), s′ = 1176. Springer, 1996, pp. 307–314. [10] J.-P. Reveill`es, “G´eom´etrie discr`ete, calcul en nombres entiers et algo- ′ ′ ′ n − (2 0), w = n − (1 1). Configuration (i) corresponds rithmique,” Th`ese d’Etat,´ Universit´eStrasbourg 1, 1991. to Eq. (40), configuration (ii) corresponds to Eq. (36), and [11] M. S. Richman, “Understanding discrete rotations,” in IEEE ICASSP, configuration (iii) corresponds to Eq. (39); in each case, we Proc., vol. 3, 1997, pp. 2057–2060. [12] B. Nouvel and E. R´emila, “Incremental and transitive discrete rotations,” have I∈ RegB. By contrapotision, I∈ RegB implies that in IWCIA, Proc., ser. LNCS, vol. 4040. Springer, 2006, pp. 199–213. I ◦ T ∈ WCB. [13] Y. Thibault, Y. Kenmochi, and A. Sugimoto, “Computing upper and We are now ready to establish the last part of the isomor- lower bounds of rotation angles from digital images,” Pattern Recogn., vol. 42, no. 8, pp. 1708–1717, 2009. phism, namely the preservation of the adjacency relation. [14] B. Nouvel and E. R´emila, “Configurations induced by discrete rotations: k k Periodicity and quasi-periodicity properties,” Discrete Appl. Math., vol. Proposition 37: Let I ∈ RegB (resp. RegB, resp. RegB). ⋆ 147, no. 2–3, pp. 325–343, 2005. Let T ∈ RigZ2 . Let C1 C2 ∈ C [I ◦ T ] with ⋆ = (4 8) (resp. [15] P. Ngo, Y. Kenmochi, N. Passat, and H. Talbot, “Sufficient conditions for (8 4), resp. wc). We have topological invariance of 2D digital images under rigid transformations,” in DGCI, Proc., ser. LNCS, vol. 7749. Springer., 2013, pp. 155–168. ⋆ ⋆ ⋆ ⋆ [16] T. Y. Kong and A. Rosenfeld, “Digital topology: Introduction and C1 C2 ⇐⇒ T (C1) T (C2) (53) I◦T I I I survey,” Comput. Vision Graph., vol. 48, no. 3, pp. 357–393, 1989. ⋆   [17] L. Mazo, N. Passat, M. Couprie, and C. Ronse, “Digital imaging: A Proof Let C1 I◦T C2. Up to reindexing, we have C1 ⊆ unified topological framework,” J. Math. Imaging Vis., vol. 44, no. 1, −1 −1 ′ (I ◦ T ) ({0}) and C2 ⊆ (I ◦ T ) ({1}). Let p ∈ C1, pp. 19–37, 2012. ′ ′ ′ ′ ⋆ [18] E. Khalimsky, “Topological structures in computer science,” J. Appl. q ∈ C2 be such that p 4 q . Let p = T (p ) ∈ TI (C1), ′ ⋆ Math. Sim., vol. 1, no. 1, pp. 25–40, 1987. q = T (q ) ∈ TI (C1). From Eq. (13), we can have: (i) p 4 q [19] V. A. Kovalevsky, “Finite topology as applied to image analysis,” ⋆ ⋆ ⋆ and then TI (C1) I TI (C2); or (ii) p 8 q and p 4 q. Comput. Vision Graph., vol. 46, no. 2, pp. 141–161, 1989. 2 [20] L. Mazo, N. Passat, M. Couprie, and C. Ronse, “Paths, homotopy and In that second case, let r ∈ Z be such that p 4 r 4 q. ⋆ ⋆ ⋆ ⋆ reduction in digital images,” Acta Appl. Math., vol. 113, no. 2, pp. 167– We have either r ∈ TI (C1) or TI (C2), and then TI (C1) I 193, 2011. ⋆ TI (C2). [21] C. R. F. Maunder, Algebraic Topology. Dover, New York, 1996. ⋆ ⋆ ⋆ [22] A. Rosenfeld, “Digital topology,” Am. Math. Mon., vol. 86, no. 8, pp. Let TI (C1) I TI (C2). Up to reindexing, we have ⋆ −1 ⋆ −1 621–630, 1979. TI (C1) ⊆ T ({0}) and TI (C2) ⊆ T ({1}). Let p ∈ [23] L. J. Latecki, U. Eckhardt, and A. Rosenfeld, “Well-composed sets,” ⋆ ⋆ TI (C1), q ∈ TI (C2) be such that p 4 q. Case 1: there Comput. Vis. Image Und., vol. 61, no. 1, pp. 70–83, 1995. JOURNAL OF LATEX CLASS FILES, VOL. X, NO. X, JANUARY 20XX 10

[24] T. Y. Kong, “A digital fundamental group,” Comput. Graph., vol. 13, no. 2, pp. 159–166, 1989. [25] C. Ronse, “A topological characterization of thinning,” Theor. Comput. Sci., vol. 43, no. 1, pp. 31–41, 2007. [26] G. Bertrand and G. Malandain, “A new characterization of three- dimensional simple points,” Pattern Recogn. Lett., vol. 15, no. 2, pp. 169–175, 1994. [27] G. Bertrand, “On P-simple points,” C.R. Acad. Sci. I-Math., vol. I, no. 321, pp. 1077–1084, 1995. [28] N. Passat and L. Mazo, “An introduction to simple sets,” Pattern Recogn. Lett., vol. 30, no. 15, pp. 1366–1377, 2009. [29] A. Rosenfeld, “Adjacency in digital pictures,” Inform. Control, vol. 26, no. 1, pp. 24–33, 1974. [30] G. Bertrand, M. Couprie, and N. Passat, “A note on 3-D simple points and simple-equivalence,” Inform. Process. Lett., vol. 109, no. 13, pp. 700–704, 2009. [31] A. Rosenfeld, T. Y. Kong, and A. Nakamura, “Topology-preserving deformations of two-valued digital pictures,” Graph. Model. Im. Proc., vol. 60, no. 1, pp. 24–34, 1998. [32] L. Najman and H. Talbot, Eds., Mathematical Morphology: From Theory to Applications. ISTE/J. Wiley & Sons, 2010. [33] J. Marchadier, D. Arqu`es, and S. Michelin, “Thinning grayscale well- composed images,” Pattern Recogn. Lett., vol. 25, no. 5, pp. 581–590, 2004. [34] P. Salembier, A. Oliveras, and L. Garrido, “Anti-extensive connected operators for image and sequence processing,” IEEE T. Image Process., vol. 7, no. 4, pp. 555–570, 1998. [35] P. Salembier and M. H. F. Wilkinson, “Connected operators: A review of region-based morphological image processing techniques,” IEEE Signal Proc. Mag., vol. 26, no. 6, pp. 136–157, 2009. [36] L. J. Latecki, “Multicolor well-composed pictures,” Pattern Recogn. Lett., vol. 16, no. 4, pp. 425–431, 1995. [37] Y. Cointepas, I. Bloch, and L. Garnero, “A cellular model for multi- objects multi-dimensional homotopic deformations,” Pattern Recogn., vol. 34, no. 9, pp. 1785–1798, 2001. [38] G. Damiand, A. Dupas, and J.-O. Lachaud, “Fully deformable 3D digital partition model with topological control,” Pattern Recogn. Lett., vol. 32, no. 9, pp. 1374–1383, 2011. [39] L. Mazo, N. Passat, M. Couprie, and C. Ronse, “Topology on digital label images,” J. Math. Imaging Vis., vol. 44, no. 3, pp. 254–281, 2012. [40] L. Mazo, “A framework for label images,” in CTIC, Proc., ser. LNCS, vol. 7309. Springer, 2012, pp. 1–12. [41] E. R. Davies and A. P. Plummer, “Thinning algorithms: A critique and a new methodology,” Pattern Recogn., vol. 14, no. 16, pp. 53–63, 1981. [42] J.-F. Mangin, V. Frouin, I. Bloch, J. R´egis, and J. L´opez-Krahe, “From 3D magnetic resonance images to structural representations of the cortex topography using topology preserving deformations,” J. Math. Imaging Vis., vol. 5, no. 4, pp. 297–318, 1995. [43] X. Han, C. Xu, and J. L. Prince, “A topology preserving level set method for geometric deformable models,” IEEE T. Pattern Anal., vol. 25, no. 6, pp. 755–768, 2003. [44] M. Couprie and G. Bertrand, “New characterizations of simple points in 2D, 3D, and 4D discrete spaces,” IEEE T. Pattern Anal., vol. 31, no. 4, pp. 637–648, 2009. [45] M. Couprie, F. N. Bezerra, and G. Bertrand, “Topological operators for grayscale image processing,” J. Electron. Imaging, vol. 10, no. 4, pp. 1003–1015, 2001. [46] M. Siqueira, L. J. Latecki, N. J. Tustison, J. H. Gallier, and J. C. Gee, “Topological repairing of 3D digital images,” J. Math. Imaging Vis., vol. 30, no. 3, pp. 249–274, 2008. [47] A. Gross and L. Latecki, “Digitizations preserving topological and differential geometric properties,” Comput. Vis. Image Und., vol. 62, no. 3, pp. 370–381, 1995. [48] L. J. Latecki, C. Conrad, and A. Gross, “Preserving topology by a digitization process,” J. Math. Imaging Vis., vol. 8, no. 2, pp. 131–159, 1998. [49] L. J. Latecki, “3D well-composed pictures,” Comput. Vision Graph., vol. 59, no. 3, pp. 164–172, 1997. [50] C. Ronse, “Set-theoretical algebraic approaches to connectivity in con- tinuous or digital spaces,” J. Math. Imaging Vis., vol. 8, no. 1, pp. 41–58, 1998. [51] J. Serra, “Connectivity on complete lattices,” J. Math. Imaging Vis., vol. 9, no. 3, pp. 231–251, 1998. [52] U. Braga-Neto and J. K. Goutsias, “A theoretical tour of connectivity in image processing and analysis,” J. Math. Imaging Vis., vol. 19, no. 1, pp. 5–31, 2003.