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 → R x + t
2 Phuc Ngo, Yukiko Kenmochi and Hugues Talbot are with the ESIEE- where R is a rotation 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 − q 1 = 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 (8 4) −1 −1 assumption is motivated by practical considerations related to C [I] = I ({1}) ∼8 ∪ I ({0}) ∼4 (6) (4 8) −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 group, homotopy-type and/or adjacency-tree while there exist some topological differences between some regions of I and IT that (8 4) (4 8) (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
(8 4) (4 8) 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 invariant, 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 (k k) Let I ∈ ImB (resp. WCB). Let Ω1 Ω2 ∈ C [I] (resp. WCB. (k k) 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 (k k) (resp. wc) is an adjacency relation, boundaries shared by the foreground and background regions I I (k k) −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. (k k) (k k) (k k) 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(k k)[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 (k k) (k k) (k k) (k k) 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- (k k) (k k) 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- (k k) wc (k k) wc tal images preserve their topological properties under any rigid T (I) (resp. T (I)) and T (I ◦ T ) (resp. T (I ◦ T )), (k k) 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 (k k) 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 (8 4) RegB ⊆ InvB (21) k (4 8) 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