Abstract
We define morphological operators and filters for directional images whose pixel values are unit vectors. This requires an ordering relation for unit vectors which is obtained by using depth functions. They provide a centre-outward ordering with respect to a specified centre vector. We apply our operators on synthetic directional images and compare them with classical morphological operators for grey-scale images. As application examples, we enhance the fault region in a compressed glass foam and segment misaligned fibre regions of glass fibre-reinforced polymers.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
Mathematical morphology combines nonlinear image processing and filtering techniques based on ideas from (random) set theory, topology, and stochastic geometry. It is widely applied for the analysis of spatial structures, e.g. from geology, biology, or materials science. The foundations of mathematical morphology are laid in the books by Matheron [1], Serra [2, 3], and Soille [4]. Sternberg [5] generalised mathematical morphology to numerical functions via the umbra method, i.e. the application of set morphology to the graph of the function. Ronse [6] and Goutsias et al. [7] derived a further generalisation to complete lattices, that is, partially ordered sets with the property that all subsets have a supremum and an infimum.
The progress of imaging methods from binary via grey-scale images to vector-valued images, such as colour or ultra-spectral images, requires modified morphological operators. In particular, diffusion tensor imaging (DTI) in neuroimaging [8] results in vector-valued images showing the diffusion of water molecules in the brain. These images can be used to better understand neural diseases as the diffusion in diseased brains is disturbed or altered compared to healthy brains. For instance, Zhang et al. [9] proposed a novel Alzheimer’s disease multi-class classification framework based on multi-modal neuroimaging.
In mathematical morphology, the step from univariate to multivariate pixel values involves the challenging task of ordering vectors to define the notions of minimum and maximum of a set of vectors. An ordering structure for vectors can be derived from the concept of depth [10]. For a set of vectors, depth functions assign to each vector a value that measures its “centrality” within the set. The “centre” is the vector maximising the depth function. Thus, a centre-outward ordering based on the depth values of each vector yields a sound definition of minimum and maximum.
Velasco-Forero et al. [11] defined multivariate mathematical morphological operators via random projection depth. They illustrated their approach on colour and hyperspectral images. Concepts of depth for directional data, i.e. unit vectors in \(\mathbb {R}^d\), have been studied, for instance, by Liu et al. [12] and Pandolfo et al. [13]. Directional statistics [14, 15], which deals with the analysis of directional data, provides the theoretical framework for such studies. Ley et al. [16] introduced quantiles for directional data and the angular Mahalanobis depth.
Based on an ordering on the unit sphere \({\mathcal {S}^{d-1}}\), mathematical morphology was extended to directional images by several authors. Roerdink [17] introduced mathematical morphology on the sphere via generalised Minkowski operations. His motivation is morphological processing of earth pictures under consideration of the curvature. Morphological operators for angle-valued images were introduced by Peters [18] and Hanbury et al. [19]. However, a generalisation of their results to the unit sphere \({\mathcal {S}^{d-1}}\) with \(d> 2\) is not straightforward. Frontera-Pons and Angulo [20] defined morphological operators via a local partial ordering. They used the Fréchet–Karcher barycenter as local origin \(\mu \) on the sphere. The maximum and minimum of a set of vectors are then found via projecting the vectors into the tangent space at \(\mu \). A drawback of their approach is that the minimum and maximum derived this way are not necessarily elements of the given vector set, which seems unnatural. Angulo [21] extended the concept of multi-scale morphological operators, i.e. a scale-dependent morphology and filters, from \(\mathbb {R}\)-valued to \(\mathbb {R}^d\)-valued images. He defined morphological scale space operators on metric Maslov measurable spaces for images supported on point clouds. An application of his operators to RGB-valued point clouds, e.g. for object extraction, showed the usefulness of applying the theory of multi-scale morphological operators to \(\mathbb {R}^d\)-valued images.
In this work, we introduce morphological operators on directional images. Section 2 contains basics about mathematical morphology for grey-scale images and statistical depth functions on \({\mathcal {S}^{d-1}}\). In Sect. 3, we introduce the concept of mathematical morphology on directional data using the directional projection depth. These morphological operators are extended to multi-scale operators in Sect. 4. We illustrate and interpret our findings on synthetic and real-world \(\mathcal {S}^2\)-valued images in Sect. 5. A short conclusion is given in Sect. 6.
2 Basics and Notation
2.1 Images
We denote by \({\mathcal {S}^{d-1}}= \{x\in \mathbb {R}^d: \Vert x \Vert _2 = 1\}\) the \((d-1)\)-dimensional unit sphere and by \(\Vert x \Vert _2 = \sqrt{x^T x}\) the Euclidean norm. An image is a mapping \(I:E \rightarrow S\) that is defined on a q-dimensional domain E with \(E\subset \mathbb {R}^q\) or \(E\subset \mathbb {Z}^q\). The set S is the set of pixel values. We call I a binary image if \(S=\{0,1\}\), a grey-scale image if \(S\subset \mathbb {R}\), a vector-valued image if \(S\subset \mathbb {R}^d\) and a directional (\({\mathcal {S}^{d-1}}\)-valued) image if \(S \subset {\mathcal {S}^{d-1}}\). Usually, \(q,d\in \{2,3\}\). In this paper, we consider examples of q-dimensional \({\mathcal {S}^{d-1}}\)-valued images with \(q=2,3\) and \(d=3\). We denote by
-
\(\max I\) the maximal possible pixel value of an image I. For instance, \(\max I=1\) if I is a binary image or \(\max I=255\) if I is an 8-bit grey-scale image.
-
\(\overline{\mathbb {R}}= \mathbb {R}\cup \{-\infty , \infty \}\) the extended real numbers.
-
SO(d) the rotation group on \(\mathbb {R}^d\).
-
\(x\times y\) the cross product between two vectors \(x,y\in \mathbb {R}^d\).
-
\(\mathcal{G}\mathcal{C}_{\mu ,x}= \{y\in \mathbb {R}^d: (x\times \mu )^Ty=0\} \cap {\mathcal {S}^{d-1}}\) the great circle containing the vectors \(\mu \) and \(x\in {\mathcal {S}^{d-1}}\). For \(d=3\), the great circle \(\mathcal{G}\mathcal{C}_{\mu ,x}\) corresponds to a closed curve on the surface of \(\mathcal {S}^2\) created by the intersection of \(\mathcal {S}^2\) and a 2-dimensional hyperplane H passing through the origin \(0_3\) [22].
-
\(\check{b}\) the reflection of a function \(b:\mathbb {R}^q\rightarrow \overline{\mathbb {R}}\), i.e. \(\check{b}(i) = b(-i)\) for all \(i\in \mathbb {R}^q\), and by \(\check{B}\) the reflection of a set \(B\subset \mathbb {R}^q\), i.e. \(\check{B} = -B\). A function b is called symmetric if \(b=\check{b}\) and a set B is symmetric if \(B=\check{B}\).
2.2 Mathematical Morphology
We first define morphological operators on grey-scale images I. See [1, 2, 4] for a detailed introduction. The two fundamental operations of mathematical morphology are erosion \(\tilde{\varepsilon }_b\) and dilation \(\tilde{\delta }_b\). They depend on a structuring function \(b:\mathbb {R}^q\rightarrow \overline{\mathbb {R}}\) and are defined as
In the discrete case, supremum and infimum can be replaced by maximum and minimum. We will not discuss edge effects here (see [23]). Throughout the paper, we assume that b is symmetric.
A well-known and widely used example for b is the flat structuring function. Given a structuring element \(B\subset \mathbb {R}^q\), it is defined as
We assume that B is centred at the origin and symmetric. Morphological operators with flat structuring functions are called flat operators. Symbols for flat operators will be written with index B rather than b, e.g., a flat erosion with structuring element B is denoted by \(\tilde{\varepsilon }_B\). On the binary image I given in Fig. 1a, we illustrate the flat erosion \(\tilde{\varepsilon }_B\) and dilation \(\tilde{\delta }_B\), where B is a square, in Fig. 1b, c, respectively. Illustrations for a grey-scale image are shown in Fig. 2.
Non-flat or volumic structuring functions assign non-constant weights to the pixel values [2]. For instance,
is a non-flat structuring function. Note that the grey-scale ranges of images dilated or eroded by non-flat structuring functions are not bounded [4]. For instance, an erosion with a non-flat structuring function of an image with non-negative pixel values can result in negative pixel values. Flat structuring functions do not suffer from that problem. The output of a flat erosion or dilation is bounded by the grey-scale range of the input image.
The composition of erosion and dilation yields the morphological operators opening \(\tilde{\gamma }_b\) and closing \(\tilde{\varphi }_b\)
For the binary image I given in Fig. 1a, we illustrate the flat opening \(\tilde{\gamma }_B\) and closing \(\tilde{\varphi }_B\) with B a square in Fig. 1b, c, respectively. Illustrations for a grey-scale image are shown in Fig. 2. In applications, the opening is used to remove bright noise and the closing to remove dark noise.
Some properties of the morphological operators are summarised in the following, see also [1, 2, 23]. Let \(i\in E\), \(I,I'\) grey-scale images, and \(\{I_l\}_{l\in \mathbb {N}}\) a family of grey-scale images. We write \(I \le I'\) if \(I(i) \le I'(i)\) for all \(i\in E\). Furthermore, \(\bigvee \) denotes the point-wise maximum operator and \(\bigwedge \) the point-wise minimum operator.
-
1.
All the morphological operators are nonlinear, i.e. in general
$$\begin{aligned} \tilde{\Psi }(aI+bI') \not = a\tilde{\Psi }(I)+b\tilde{\Psi }(I'), \end{aligned}$$where \(a,b\in \mathbb {R}\) and \(\tilde{\Psi }=\tilde{\delta }_b, \tilde{\varepsilon }_b, \tilde{\gamma }_b\), or \(\tilde{\varphi }_b\).
-
2.
Dilation and erosion are dual w.r.t. complementation \(\tilde{{\,\textrm{C}\,}}\) with \(\tilde{{\,\textrm{C}\,}}I(i)=\max I -I(i)\), i.e.
$$\begin{aligned} \tilde{\delta }_b (I) = \tilde{{\,\textrm{C}\,}}\tilde{\varepsilon }_b( \tilde{{\,\textrm{C}\,}}I) \end{aligned}$$with \(b(i) = b(-i)\) due to symmetry.
-
3.
Opening and closing are dual w.r.t. complementation \(\tilde{{\,\textrm{C}\,}}\), i.e.
$$\begin{aligned} \tilde{\gamma }_b (I) = \tilde{{\,\textrm{C}\,}}\tilde{\varphi }_b( \tilde{{\,\textrm{C}\,}}I) \end{aligned}$$ -
4.
Opening and closing are idempotent, i.e.
$$\begin{aligned} \tilde{\gamma }_b (\tilde{\gamma }_b (I))&= \tilde{\gamma }_b (I), \\ \tilde{\varphi }_b (\tilde{\varphi }_b (I))&= \tilde{\varphi }_b (I). \end{aligned}$$ -
5.
The following distribution laws hold
$$\begin{aligned} \tilde{\delta }_b \left( \bigvee _l I_l\right)&= \bigvee _l \tilde{\delta }_b (I_l), \\ \tilde{\varepsilon }_b \left( \bigwedge _l I_l\right)&= \bigwedge _l \tilde{\varepsilon }_b (I_l). \end{aligned}$$ -
6.
Dilation is associative and erosion fulfils the chain rule, i.e.
$$\begin{aligned} \tilde{\delta }_b (\tilde{\delta }_{b'} (I))&= \tilde{\delta }_{\tilde{\delta }_{\check{b}}(b')} (I) , \\ \tilde{\varepsilon }_b (\tilde{\varepsilon }_{b'} (I))&= \tilde{\varepsilon }_{\tilde{\delta }_{\check{b}}(b')} (I) . \end{aligned}$$ -
7.
All morphological operators are increasing, i.e.
$$\begin{aligned} I \le I' \Rightarrow \tilde{\Psi }(I) \le \tilde{\Psi }(I') , \end{aligned}$$where \(\tilde{\Psi }=\tilde{\delta }_b, \tilde{\varepsilon }_b, \tilde{\gamma }_b\), or \(\tilde{\varphi }_b\).
-
8.
If b is defined at the origin and \(b(0)\ge 0\), dilation is extensive and erosion is anti-extensive, i.e.
$$\begin{aligned} \tilde{\varepsilon }_b (I) \le I \le \tilde{\delta }_b (I). \end{aligned}$$ -
9.
Closing is extensive and opening is anti-extensive, i.e.
$$\begin{aligned} \tilde{\gamma }_b (I) \le I \le \tilde{\varphi }_b (I). \end{aligned}$$
The latter two properties can be combined to give the ordering relation
2.3 Morphological Scale Space
In the context of mathematical morphology for grey-scale images, erosion and dilation can be written as scale-space operators [2, 24]
with a scaled structuring function
with scale parameter t. Following [23, p.15], we assume \({b_{t}}\) to have the following properties:
-
1.
\(\{{b_{t}}\}_t\) is a one-parametric family of convex, continuous, symmetric functions and fulfils the semi-group property, i.e.
$$\begin{aligned} {b_{t}}\dot{+}{b_{s}}&={b_{t+s}}\qquad t,s \ge 0, \end{aligned}$$(6)where \(\dot{+}\), \(+\) are group operations [24]. For instance, when choosing \(b_t\) to be a flat structuring function with structuring element tB, the group operations are the Minkowski addition and the standard addition in \(\mathbb {R}\):
$$\begin{aligned} tB\oplus sB&=(t+s)B \quad t,s \ge 0. \end{aligned}$$ -
2.
\({b_{t}}\) is non-positive and monotonically decreasing with a global maximum at the origin of value zero, i.e.
$$\begin{aligned} {b_{t}}(i)&\le 0 \qquad ~~\forall ~t \ge 0, i\in \mathbb {R}^q, \end{aligned}$$(7)$$\begin{aligned} {b_{t}}(i)&\ge {b_{t}}(j) \quad \Vert i \Vert _2 < \Vert j \Vert _2, \end{aligned}$$(8)$$\begin{aligned} {b_{t}}(0)&=0. \end{aligned}$$(9)
An example of a non-flat scaled structuring function is the Poweroid structuring function [23, p.14, Def. 5]
2.4 Directional Data
Directional data appear across a variety of fields, including astronomy, biology, and engineering. Instances range from the arrival direction of cosmic rays [22] to the flight direction of migratory birds [14], or to the alignment of steel fibres within fibre-reinforced concrete [25].
Directional data are given as a set of vectors on the unit sphere \({\mathcal {S}^{d-1}}\) for some \(d\ge 2\). The vector \(x=(x_1,\dots ,x_d)^T\in {\mathcal {S}^{d-1}}\) can be represented as a point on the surface of \({\mathcal {S}^{d-1}}\). For x in Cartesian coordinates, a representation in angular coordinates for arbitrary d is given in [26].
For \(d=3\), we use the usual notation for spherical coordinates
with co-latitude \(\theta \in [0,\pi ]\) and longitude \(\phi \in [0,2\pi )\). A random vector \(X\in \mathcal {S}^2\) can be represented in spherical coordinates by random variables \(\Theta \) and \(\Phi \) with realisations \(\theta \) and \(\phi \).
2.5 Statistical Depth Functions
Depth functions are applied in multidimensional non-parametric robust data analysis and establish an ordering relation between vectors. See [10] for a detailed introduction.
The literature gives several depth functions, for instance, halfspace depth [27], simplicial depth [28], projection depth [29], spatial depth [30], or the Mahalanobis depth [10]. For defining a depth for directional data, we initially restrict attention to the class \(\mathcal {F}_\mu \) of distributions on \({\mathcal {S}^{d-1}}\) with a bounded density that admits a unique modal direction \(\mu \). Examples of distributions in \(\mathcal {F}_\mu \) are the von Mises–Fisher distribution, the Kent distribution, or the Bingham distribution [22]. We further assume that \(\mu \) coincides with the Fisher spherical median [31], that is,
Ley et al. [16] adapted the definition of a depth function given in [10, Definition 2.1] for directional data as follows.
Definition 1
A statistical depth function on \({\mathcal {S}^{d-1}}\) is a bounded, non-negative mapping \(\mathcal {D}_\cdot (\cdot ): \mathcal {F}_\mu \times {\mathcal {S}^{d-1}}\rightarrow \mathbb {R}\) satisfying
-
1.
\(\mathcal {D}_{F_{AX}}(AX)=\mathcal {D}_{F_{X}}(X)\) holds for any random vector \(X\in {\mathcal {S}^{d-1}}\) and any rotation matrix \(A\in \mathbb {R}^{d\times d}\).
-
2.
\(\mathcal {D}_F(\mu )=\sup _{y\in {\mathcal {S}^{d-1}}}\mathcal {D}_F(y)\) holds for any \(F\in \mathcal {F}_\mu \).
-
3.
For any \(F\in \mathcal {F}_\mu \), \(\mathcal {D}_F(x)\le \mathcal {D}_F(c(\alpha ))\) for the unique geodesic \(c:[0,1]\rightarrow {\mathcal {S}^{d-1}}\) with \(c(0)=\mu \), \(c(1)=x\) and \(\alpha \in [0,1]\).
-
4.
\(\mathcal {D}_F(-\mu ) = 0\) for each \(F\in \mathcal {F}_\mu \) where \(-\mu \) is the antipodal point of the centre \(\mu \).
Property 1 implies that the depth of a vector should be independent of the underlying coordinate system. Property 2 means that for any F with unique centre \(\mu \), the depth function is maximal at \(\mu \). Property 3 indicates that for any point X moving away from the centre \(\mu \) along any geodesic starting at \(\mu \), the depth of X decreases monotonically. Property 4 implies that the depth value of X is zero at \(-\mu \) since \(-\mu \) is at maximal distance from \(\mu \) on \({\mathcal {S}^{d-1}}\).
Depth functions for directional data are, for instance, directional distance-based depths [13] or the angular Mahalanobis depth [16]. The ordering property (3) for morphological operators can be violated if \(\mu \) is not fixed (see Appendix A). We use a re-scaled version of the cosine distance depth from [13] as defined in the following section and select \(\mu \) as a global parameter as described in Sect. 3.
2.6 The Angular Projection Depth
Let \(X\in {\mathcal {S}^{d-1}}\) be a random vector with \(X\sim F\in \mathcal {F}_\mu \). We define a depth for directional data by
\(D^{proj}_F(X)\) provides a centre-outward ordering with \(D^{proj}_F(\mu ) = 1\), \(D^{proj}_F(-\mu ) = 0\) and is decreasing on a geodesic from \(\mu \) to \(-\mu \). Let \(A\in \mathbb {R}^{d\times d}\) be any rotation matrix. Then the distribution of the transformed vector AX has centre \(A\mu \). It follows that
Thus, the properties of a directional depth function given in Definition 1 are fulfilled.
The empirical angular projection depth reads
where \(\hat{\mu }\) is the empirical Fisher spherical median [31]
obtained from an i.i.d. sample \(X_1,\dots ,X_n\) with distribution F.
3 Mathematical Morphology on Directional Images Using Directional Projection Depth
The definition of the standard operators of mathematical morphology requires an ordering relation between pixel values, see (1) and (2). Multivariate extensions of ordering and mathematical morphology were subject to several studies [7, 32,33,34,35]. In particular, orderings can be derived from depth functions.
For \({\mathcal {S}^{d-1}}\) valued images, we use the projection depth \(D^{proj}\) to define an ordering relation between unit vectors. See Fig. 3 for an illustration. This allows for a definition of erosion, dilation, and the morphological operators derived from them as described below. For simplicity, we concentrate on flat morphological operators with structuring element B.
In a given application, the assumption \(I(i)\sim F \in \mathcal {F}_\mu \) may not be fulfilled. Nevertheless, a suitable central direction \(\mu \) may be derived from the experimental setup. Hence, \(\mu \) will be interpreted as a parameter in the following. We will write \(D_\mu ^{proj}\) for the projection depth using \(\mu \in {\mathcal {S}^{d-1}}\) as the centre. The parameter \(\mu \) can be selected globally for the whole image or in a locally adaptive manner for parts of the image. The latter is not considered here.
The erosion \(\varepsilon _B\) of a directional image \(I\) at pixel position \(i\in E\) is (implicitly) defined by
where \(\tilde{\varepsilon }\) is the flat erosion of a grey-scale image. Analogously, the dilation \(\delta _B\) of a directional image \(I\) at pixel position \(i\in E\) is (implicitly) defined by
where \(\tilde{\delta }\) is the flat dilation of a grey-scale image. Hence, a dilation will select the most central direction covered by the structuring element while an erosion selects the most outlying direction.
The explicit definition reads
where \({D_\mu ^{proj}}^{-1}\) refers to the preimage under \({D_\mu ^{proj}}\).
As \(D_\mu ^{proj}\) is not injective, the preimage may consist of more than one element. Consider vectors \(x_1,x_2\in {\mathcal {S}^{d-1}}\) with \(x_1^T\mu =x_2^T\mu \). Then, \(D_\mu ^{proj}(x_1)=D_\mu ^{proj}(x_2)\) but \(x_1=x_2\) is not necessarily the case. To resolve this issue, we use a lexicographic order for vectors of the same depth value which yields a total ordering [11]. Rotate the vectors such that \(\mu =(0,0,1)^T\). Among the (pairwise different) vectors \(\{x_i\}_{i=1,\dots ,n}\) with \(D_\mu ^{proj}(x_i)=D_\mu ^{proj}(x_j)\), we choose the vector \(x^*\) with the smallest longitude angle, i.e. \(x^*=\arg \min \limits _{x_i}\phi _i\) with \((\theta _i,\phi _i)\) spherical coordinates of \(x_i\), \(i=1,\dots ,n\). Then rotate \(x^*\) back.
Opening and closing are defined by
The theory of h-orderings [7] immediately implies that the operators defined above fulfil the properties of morphological operators stated in Sect. 2.2, see [32]. In this theory, h is a map from \({\mathcal {S}^{d-1}}\) into a space with a partial order. Here we choose \(h=D^{proj}\).
Of course, further morphological filters have their depth analogy. For instance, the scalar difference between the depth of dilation and erosion defines the morphological gradient
The morphological Laplacian is defined by
with \(\Delta _\delta (i) = D_\mu ^{proj}\left( \delta _B(I)(i)\right) - D_\mu ^{proj}(I)(i)\) and \(\Delta _\varepsilon (i) = D_\mu ^{proj}(I)(i) - D_\mu ^{proj}\left( \varepsilon _B(I)(i)\right) \). The shock filter (also known as Toggle Mapping) is defined in [3]
Shock filtering is used to enhance edges. For grey-scale images, the idea is to dilate near local maxima and erode near local minima. This way, the contrast between regions of pixel values with high and low depth is enhanced. If we apply this to our depth approach, we can contrast between regions with different orientations (depending on \(\mu \)).
4 Pseudo-Morphological Multi-scale Operators for Directional Images
In the next step, we want to extend morphological operators to a multi-scale setting, leading to a morphological scale space (see [21]). A very simple approach to scaling is scaling of a flat structuring element B by a factor t. Here, we will consider an alternative approach which yields a structuring function which has a meaningful interpretation, fulfils the semi-group property (at least partially), and results in bounded non-flat operators. We call them pseudo-morphological operators since their behaviour reminds of erosion and dilation as demonstrated in Sect. 5 while some properties of morphological operators are lost (see Remark 1).
4.1 Structuring Function for Directional Images
In general, structuring functions \({b_{t}}:E\rightarrow \overline{\mathbb {R}}\) are unbounded. Thus, multi-scale dilation and erosion inherit this unboundedness if we use \(D_\mu ^{proj}(I(j))+{b_{t}}(j-i)\) and \(D_\mu ^{proj}(I(j))-{b_{t}}(j-i)\), respectively, \(i,j\in E\). However, we cannot associate a vector with a depth value outside [0, 1] since no unit vector could be found as preimage. In our approach, we therefore use structuring functions \({b_{t}}:E\rightarrow SO(d)\). We will define the operation \(I(j)+{b_{t}}(j-i)\) and \(I(j)-{b_{t}}(j-i)\) to be a vector rotation of \(I(j)\) where the rotation angle depends on the scale t. Therefore, the depths of \(I(j)+{b_{t}}(j-i)\) and \(I(j)-{b_{t}}(j-i)\) are both bounded.
The main idea is to rotate a pixel value \(x=I(i)\), \(i\in E\), about \(x\times \mu \) towards \(\mu \) or away from \(\mu \) on a great circle \(\mathcal{G}\mathcal{C}_{\mu ,x}\). This increases or decreases the depth value of the rotated x which gives our approach also a meaningful interpretation. Note that \(I(j)+{b_{t}}(j-i)\) and \(I(j)-{b_{t}}(j-i)\), \(i\in E\), result again in directional images which seem natural.
For a formal definition, let \(\mu \in {\mathcal {S}^{d-1}}\), \(i\in E\), \(x=I(i)\in {\mathcal {S}^{d-1}}\) with \(x^T\mu = \cos (\theta )\) and \(R_{\mu ,x}(\alpha )\in SO(d)\) be a rotation matrix which rotates x about the cross product \(\mu \times x\) and \(R_{\mu ,x}(\theta )x=\mu \). We define a structuring function \({b_{t}}\) for directional images by a mapping
with rotation angle \({\alpha _t(i)}\), \(t\ge 0\).
Since \(R_{\mu ,x}\) depends on x, the structuring function is locally adaptive. We choose
where the truncation at \(\pi \) is discussed in more detail in Remark 1. Note the similarity of \(\alpha _t\) with quadratic scaling as discussed in [36].
Let \(f\Box g\) be the infimal convolution of two functions \(f,g: \mathbb {R}^q\rightarrow \mathbb {R}\) [37], i.e.
Define
The structuring element \({b_{t}}\) fulfils the semi-group property (6), i.e. \({b_{t}}(i) \dot{+} {b_{s}}(i) = {b_{t+s}}(i)\), for \(\Vert i \Vert _2^2 / (t+s) < \pi \) as shown in Appendix B.
We illustrate the construction for \(d=3\) and \(x=x(\phi ,\theta )\) in spherical coordinates as given in (11): The rotation matrix \(R_{\mu ,x}\) rotates x on the great circle \(\mathcal{G}\mathcal{C}_{\mu ,x}\). We use \(R_{\mu ,x}\) to move a pixel value \(x\in \mathcal {S}^2\) towards \(\mu \) or away from \(\mu \) on \(\mathcal{G}\mathcal{C}_{\mu ,x}\). Thus, the rotation matrix \(R_{\mu ,x}\) causes a change of the angle between x and \(\mu \), here the co-latitudinal angle \(\theta \). The longitude angle \(\phi \) is not changed. Therefore, we define a rotation of the vector x depending on the structuring function \({b_{t}}\) to this change of \(\theta \) as follows (see Fig. 4):
with
with
\(x - {b_{t}}\) has a smaller geodesic distance to \(\mu \) than x and \(x + {b_{t}}\) has a larger geodesic distance to \(\mu \) than x.
Remark 1
(Truncation of rotation) The restriction of \(\alpha _-\) to \(\theta \) and of \(\alpha _+\) to \(\pi -\theta \) is necessary to achieve an analogous ordering relation as in (3). Otherwise, x can be rotated beyond \(\mu \) which would decrease \(D_\mu ^{proj}(x - {b_{t}}(i))\). Analogously, x can be rotated beyond \(-\mu \) which would increase \(D_\mu ^{proj}(x + {b_{t}}(i))\). To avoid this, we fix the vector at \(\mu \) or \(-\mu \), respectively, such that no rotation beyond is possible.
With truncation, the semi-group property is no longer valid. However, truncation ensures that
We obtain (in some sense) analogue properties to (7)–(9):
-
1.
\({b_{t}}\) is non-positive w.r.t. \(D_\mu ^{proj}\) in the sense that for rotations of x away from \(\mu \) its depth decreases, i.e.
$$\begin{aligned} D_\mu ^{proj}(x + {b_{t}}(i)) - D_\mu ^{proj}(x)&\le 0. \end{aligned}$$ -
2.
\({b_{t}}\) is monotonically decreasing w.r.t. \(D_\mu ^{proj}\) in the sense that for increasing distance between pixel positions the depth decreases, i.e.
$$\begin{aligned} D_\mu ^{proj}(x + {b_{t}}(i))&\ge D_\mu ^{proj}(x + {b_{t}}(j)) \end{aligned}$$for \(\Vert i \Vert _2 < \Vert j \Vert _2.\)
-
3.
\({b_{t}}\) has a global maximum at the origin \(o\in \mathbb {R}^q\) w.r.t. \(D_\mu ^{proj}\) with
$$\begin{aligned} D_\mu ^{proj}(x + {b_{t}}(o)) =D_\mu ^{proj}(x) \end{aligned}$$
4.2 Pseudo-Morphological Multi-scale Operators for Directional Images
Let \({b_{t}}\) be as in Eq. (14). The multi-scale erosion \(\varepsilon _{b_{t}}\) of a directional image \(I\) at pixel position \(i\in E\) is (implicitly) defined by
where \(I(j) -{b_{t}}(j-i)\) is defined in Eq. (18). Analogously, the multi-scale dilation \(\delta _{b_{t}}\) of a directional image \(I\) at pixel position \(i\in E\) is (implicitly) defined by
where \(I(j) +{b_{t}}(j-i)\) is defined in Eq. (19). The interpretation of the multi-scale operators is as follows: We want to rotate the vector \(I(j)\) depending on \(||i-j||_2\) and the scale t towards \(\mu \) (\(D_\mu ^{proj}\) increases) or towards \(-\mu \) (\(D_\mu ^{proj}\) decreases).
Multi-scale opening, closing, morphological gradient, and shock filter can be defined as analogues to their flat counterparts.
5 Examples
In this section, we investigate the effect of the morphological operators on synthetic \(\mathcal {S}^2\)-valued images and compare them to their standard grey-scale counterparts. As real application examples, we detect misaligned regions in a glass fibre reinforced composite and enhance changes in the displacement field of a compressed glass foam.
5.1 Flat Morphological Operators
To investigate the newly defined flat morphological operators, we generate a 2-dimensional \(\mathcal {S}^2\)-valued image \({I}\) mimicking direction vectors obtained from two fibres on a homogeneous background. That is, we assume that the image contains two objects consisting of vectors with a small angular deviation from \(\mu \), see Fig. 5. In the following, we will interpret those as foreground. The background is formed by vectors directed along a plane perpendicular to \(\mu \). Flat dilation and flat erosion (Fig. 6) show similar behaviour as their standard grey-scale counterparts. Dilation expands objects directed along \(\mu \). That is, the directions of background pixels that are close to the edge of these objects are rotated towards \(\mu \). An erosion shrinks objects, i.e. object vectors at the edge are rotated so that they are assigned to the image background.
In a similar manner, the flat opening removes foreground objects that are smaller than the structuring element. Figure 6 reveals that object vectors in an object of size smaller than the structuring element B are rotated such that we assign them to the image background. The flat closing removes small holes in the foreground. Vectors with large angular deviation from \(\mu \) within a background object of size smaller than B are rotated to become part of the image foreground.
The results of shock filtering of \({I}\) are shown in Fig. 7. The edges between the two objects and the background pixels are enhanced.
5.2 Pseudo-Morphological Multi-scale Operators
We illustrate the multi-scale dilation and erosion on a directional image \({I}\). \(\delta _{b_{t}}({I})\) and \(\varepsilon _{b_{t}}({I})\) behave like their grey-scale counterparts: Fig. 8 shows that \(\delta _{b_{t}}({I})\) enlarges objects in the foreground and Fig. 9 shows that \(\varepsilon _{b_{t}}({I})\) shrinks objects in the foreground. Of course, the enlargement and shrinkage depend on the continuous scale parameter t.
5.3 Segmentation of Aligned and Misaligned Fibre Regions of Glass Fibre Reinforced Polymers
Glass fibre reinforced polymers (GFRP) are frequently used in lightweight construction of, e.g., cars, planes, and wind power plants. In civil engineering, they have emerged as an alternative to steel reinforcement as they do not corrode in aggressive conditions such as marine environments [38]. GFRP materials are anisotropic and characterised by high tensile strength in the direction of the reinforcing fibres. When manufactured by injection moulding, the fibres follow the injection direction. However, the fibre orientation in a central layer differs depending on the production parameters. Analysing fibre orientation and quantifying misalignment, for instance by directional filtering [39], may help to optimise the production process and to improve GFRP.
We examine a \(\mu \)CT image of GFRP produced and imaged by the Leibniz Institute for Composite Materials (IVW) in Kaiserslautern (Germany) and discussed in [40]. See Fig. 10a for an illustration. Pixel-wise fibre orientations can be determined by using partial second derivatives as described in [41] resulting in an \(\mathcal {S}^2\)-valued image.
Our goal is to segment the region aligned along the injection direction, as desired, and the misaligned fibre region. Figure 10b shows a grey value encoding of the scalar product between the pixelwise fibre directions and \(\mu \). The correctly aligned regions are at the left and right borders while fibres in the central part are misaligned. The higher the value (brighter the image pixel), the more aligned the vectors are along \(\mu \). Simply thresholding this image results in a very noisy segmentation. Therefore, the directional image is smoothed prior to the segmentation by a morphological closing along \(\mu =(0,1,0)\) with B a \(7\times 7\times 7\) cube.
We choose a threshold value of 1.5 to segment areas aligned along \(\mu \), see Fig. 10b.
5.4 Enhancement of Fault Zones in Compressed Glass Foam
To characterise the structural behaviour of complex materials during loading, mechanical tests and simultaneous \(\mu \)CT imaging (in situ CT) can be used to estimate local displacements of the material on the micro-scale. We analyse a glass foam which consists of very thin struts.
The \(\mu \)CT images were recorded while the glass foam was compressed in the z-direction. The foam is expected to fail very suddenly due to its thin struts. Nogatz et al. [42] computed the displacement field for the transition from strain level 1–3.8% which is shown in Fig. 11a. During compression, a fault zone forms which is now post-processed by directional morphology. To this end, our operators are applied to the directional component of the displacement vectors. That is, the vectors were normalised for the calculation of the morphological operators and were subsequently scaled back to their original length. As we mostly expect compression along the loading direction, we choose \(\mu =(0,0,1)\).
We enhance the fault zone with the morphological gradient, see Fig. 11b. If motion estimation algorithms fail to reconstruct these sharp edges, we can enhance them by erosion, as shown in Fig. 11c. Some other materials, however, are known to show creep before failure. Here, a smoother transition seems more reasonable, which is obtained by a dilation, see Fig. 11d.
Closing (Fig. 11e) and opening (Fig. 11f) remove misalignment in the transition between the two regions.
6 Conclusion
We have defined morphological operators for \({\mathcal {S}^{d-1}}\)-valued images. The required ordering for unit vectors is derived from the angular projection depth which enables a sound definition of \({\mathcal {S}^{d-1}}\)-valued morphological operators and filters. Relations of these morphological operators to their grey-scale counterparts are emphasised. Additionally, we segmented misaligned fibre regions of glass fibre reinforced polymers and enhanced the fault region in a compressed glass foam.
Future work could address the removal of disturbances or the highlighting of directional changes in DTI images by morphological operations [8, 9].
Data Availability
No datasets were generated or analysed during the current study.
References
Matheron, G.: Random Sets and Integral Geometry [by] G. Matheron. Wiley, New York (1974)
Serra, J.: Image Analysis and Mathematical Morphology. Academic Press Inc, Cambridge (1983)
Serra, J.: Image Analysis and Mathematical Morphology. Volume 2: Theoretical Advances. Academic Press Inc, Cambridge (1988)
Soille, P.: Morphological Image Analysis: Principles and Applications, 2nd edn. Springer, Berlin (2003)
Sternberg, S.: Grayscale morphology. Comput. Vis. Gr. Image Process. 35(3), 333–355 (1986). https://doi.org/10.1016/0734-189X(86)90004-6
Ronse, C.: Why mathematical morphology needs complete lattices. Signal Process. 21(2), 129–154 (1990). https://doi.org/10.1016/0165-1684(90)90046-2
Goutsias, J., Heijmans, H., Sivakumar, K.: Morphological operators for image sequences. Comput. Vis. Image Underst. 62, 326–346 (1995)
Zhang, Y.-D., Dong, Z., Wang, S.-H., Yu, X., Yao, X., Zhou, Q., Hu, H., Li, M., Jiménez-Mesa, C., Ramirez, J., Martinez, F., Gorriz, J.: Advances in multimodal data fusion in neuroimaging: overview, challenges, and novel orientation. Inf. Fusion 64, 149–187 (2020). https://doi.org/10.1016/j.inffus.2020.07.006
Zhang, Y., Wang, S., Xia, K., Jiang, Y., Qian, P.: Alzheimer’s disease multiclass diagnosis via multimodal neuroimaging embedding feature selection and fusion. Inf. Fusion 66, 170–183 (2021). https://doi.org/10.1016/j.inffus.2020.09.002
Zuo, Y., Serfling, R.: General notions of statistical depth function. Ann. Stat. 28(2), 461–482 (2000). https://doi.org/10.1214/aos/1016218226
Velasco-Forero, S., Angulo, J.: Random projection depth for multivariate mathematical morphology. IEEE J. Sel. Top. Signal Process. 6(7), 753–763 (2012). https://doi.org/10.1109/JSTSP.2012.2211336
Liu, R.Y., Singh, K.: Ordering directional data: concepts of data depth on circles and spheres. Ann. Stat. 20(3), 1468–1484 (1992). https://doi.org/10.1214/aos/1176348779
Pandolfo, G., Paindaveine, D., Porzio, G.: Distance-based depths for directional data. Can. J. Stat. 46, 593 (2017). https://doi.org/10.1002/cjs.11479
Mardia, K.V., Jupp, P.E.: Directional Statistics. Wiley, New York (2000)
Ley, C., Verdebout, T.: Modern Directional Statistics. Chapman & Hall/CRC Interdisciplinary Statistics, CRC Press, Boca Raton (2017)
Ley, C., Sabbah, C., Verdebout, T.: A new concept of quantiles for directional data and the angular Mahalanobis depth. Electron. J. Stat. 8(1), 795–816 (2014). https://doi.org/10.1214/14-EJS904
Roerdink, J.: Mathematical morphology on the sphere. In: Kunt, M. (ed.), Visual Communications and Image Processing’90: Fifth in a Series, vol. 1360, pp. 263 – 271. International Society for Optics and Photonics, SPIE (1990). https://doi.org/10.1117/12.24213
Peters II, R. A.: Mathematical morphology for angle-valued images. In: Dougherty, E.R., Astola, J.T. (eds.), Nonlinear Image Processing VIII, vol. 3026, pp. 84–94. International Society for Optics and Photonics, SPIE (1997). https://doi.org/10.1117/12.271144
Hanbury, A., Serra, J.: Morphological operators on the unit circle. IEEE Trans. Image Process. 10(12), 1842–1850 (2001). https://doi.org/10.1109/83.974569
Frontera-Pons, J., Angulo, J.: Morphological operators for images valued on the sphere. In: 2012 19th IEEE International Conference on Image Processing, pp. 113–116 (2012). https://doi.org/10.1109/ICIP.2012.6466808
Angulo, J.: Morphological Scale-Space Operators for Images Supported on Point Clouds. In: Heidelberg, S.-V.B. (ed.), 5th International Conference on Scale Space and Variational Methods in Computer Vision, Volume LNCS 9087 of Proceedings of the SSVM’15 (5th International Conference on Scale Space and Variational Methods in Computer Vision), Lège-Cap Ferret, France. (2015). https://doi.org/10.1007/978-3-319-18461-6_7
Fisher, N., Lewis, T., Embleton, B.: Statistical Analysis of Spherical Data. Cambridge University Press, Cambridge (1987)
Jackway, P.: Morphological scale-spaces. In: Hawkes, P.W. (ed.) Morphological Scale-Spaces, Vol. 99 of Advances in Imaging and Electron Physics, pp. 1–64. Elsevier (1997). https://doi.org/10.1016/S1076-5670(08)70240-4
Heijmans, H.: Morphological Image Operators, Advances in Electronics and Electron Physics: Supplement. Academic Press, Cambridge (1994)
Maryamh, K., Hauch, K., Redenbach, C., Schnell, J.: Influence of specimen size on the fibre geometry and tensile strength of ultra-high-performance fibre-reinforced concrete. Struct. Concrete (2021). https://doi.org/10.1002/suco.202000753
Blumenson, L.E.: A derivation of n-dimensional spherical coordinates. Am. Math. Mon. 67(1), 63–66 (1960)
Tukey, J.W.: Mathematics and the picturing of data. In: Proceedings of the International Congress of Mathematicians (Vancouver, B.C., 1974), vol. 2, pp. 523–531 (1975)
Liu, R.: On a notion of data depth based on random simplices. Ann. Stat. 18(1), 405–414 (1990). https://doi.org/10.1214/aos/1176347507
Donoho, D., Gasko, M.: Breakdown properties of location estimates based on halfspace depth and projected outlyingness. Ann. Stat. (1992). https://doi.org/10.1214/aos/1176348890
Vardi, Y., Zhang, C.: The multivariate L1-median and associated data depth. Proc. Natl. Acad. Sci. USA 97, 1423–6 (2000). https://doi.org/10.1073/pnas.97.4.1423
Fisher, N.I.: Spherical medians. J. R. Stat. Soc. Ser. B (Methodol.) 47(2), 342–348 (1985)
Angulo, J.: Morphological colour operators in totally ordered lattices based on distances: application to image filtering, enhancement and analysis. Comput. Vis. Image Underst. 107, 56–73 (2007). https://doi.org/10.1016/j.cviu.2006.11.008
Aptoula, E., Lefèvre, S.: A comparative study on multivariate mathematical morphology. Pattern Recognit. 40(11), 2914–2929 (2007). https://doi.org/10.1016/j.patcog.2007.02.004
Barnett, V.: The ordering of multivariate data. J. R. Stat. Soc. Ser. A (Gen.) 139(3), 318–355 (1976)
Najman, L., Talbot, H.: Mathematical Morphology: From Theory to Applications, p. 520. ISTE-Wiley, London (2010). https://doi.org/10.1002/9781118600788 . (ISBN: 9781848212152)
Heijmans, H., van den Boomgaard, R.: Algebraic framework for linear and morphological scale-spaces. J. Vis. Commun. Image Represent. 13(1), 269–301 (2002). https://doi.org/10.1006/jvci.2001.0480
Strömberg, T.: The Operation of Infimal Convolution. Instytut Matematyczny Polskiej Akademi Nauk, Warszawa (1996)
Kappenthuler, S., Seeger, S.: Assessing the long-term potential of fiber reinforced polymer composites for sustainable marine construction. J. Ocean Eng. Mar. Energy (2021). https://doi.org/10.1007/s40722-021-00187-x
Barišin, T., Schladitz, K., Redenbach, C., Godehardt, M.: Adaptive morphological framework for 3d directional filtering. Image Anal. Stereol. (2022). https://doi.org/10.5566/ias.2639
Wirjadi, O., Godehardt, M., Schladitz, K., Wagner, B., Rack, A., Gurka, M., Nissle, S., Noll, A.: Characterization of multilayer structures in fiber reinforced polymer employing synchrotron and laboratory X-ray CT. Int. J. Mater. Res. 105(7), 645–654 (2014). https://doi.org/10.3139/146.111082
Wirjadi, O., Schladitz, K., Easwaran, P., Ohser, J.: Estimating fibre direction distributions of reinforced composites from tomographic images. Image Anal. Stereol 35(3), 167–179 (2016). https://doi.org/10.5566/ias.1489
Nogatz, T., Redenbach, C., Schladitz, K.: 3d optical flow for large CT data of materials microstructures. Strain (2021). https://doi.org/10.1111/str.12412
Acknowledgements
We thank Tessa Nogatz for providing the displacement field of the glass foam and Tin Barišin for providing the glass fibre reinforced polymers images.
Funding
Open Access funding enabled and organized by Projekt DEAL.
Author information
Authors and Affiliations
Contributions
K.H. wrote the main manuscript. C.R. revised the manuscript.
Corresponding author
Ethics declarations
Competing interests
The authors declare no competing interests.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendices
Appendix A
Let \(\frac{N}{3}\in \mathbb {N}\). Choose a distribution \(X\sim F\in \mathcal {F}_\mu \) which is rotationally symmetric around \(\mu = (0,0,1)^T\) such that the spherical coordinates \((\theta _1, \phi _1), \ldots , (\theta _N, \phi _N)\) of a sample \(x_1, \ldots , x_N\) fulfil
-
\(\theta _l = \frac{7\pi }{8}, l=1,\dots ,\frac{N}{3}\), i.e. \(x_l\) are on the lower hemisphere,
-
\(\theta _u = \frac{\pi }{4}, u=\frac{2N}{3}+1,\dots ,N\), i.e. \(x_u\) are on the upper hemissphere.
Thus, \(D_F(x_l) < D_F(x_u)\) with \(D_F\) the angular Mahalanobis depth given in [16, Eq.(2.3)] or the projection depth. Let I be a directional image such that for each pixel with \(I(i)=x_l\) there is a pixel \(i'\) with \(I(i')=x_u\) and \(||i-i'||_2^2 < b\) and vice versa. Choose the structuring element B as square with side length b. Calculating the minimum (erosion) based on the depth value as suggested in Sect. 3 results in \(\varepsilon _B(I)(i) = x_l\) for all \(i\in E\). The resulting image \(\varepsilon _B(I)\) has only vectors on the lower hemisphere. Especially, the new median direction is located on the lower hemisphere and should be close to \(-\mu \) for large enough N. The angle between \(\varepsilon _B(I)(i)\) and \(-\mu \) is
Calculating the maximum (dilation) results in \(\delta _B(I)(i) = x_u\) for all \(i\in E\). The resulting image \(\delta _B(I)\) has only vectors on the upper hemisphere. The median direction of \(\delta _B(I)\) is still close to \(\mu \). The angle between \(\delta _B(I)(i)=x_u\) and \(\mu \) corresponds to
Since (A1) is less than (A2) the depth of \(\varepsilon _B(I)(i)\) is larger than the depth of \(\delta _B(I)(i)\). This contradicts the ordering property (3).
Appendix B
We show that given (17) the structuring element \({b_{t}}\) fulfils the semi-group property (6) for
We have to investigate
Assume for a moment that
such that we have to minimise
Setting the gradient
equal to 0 yields the solution
Furthermore,
with \(I_{q\times q}\) the identity matrix, is positive definite such that we indeed have a point of minimum.
Equation (B6) yields
Skipping (B4) results in \(\alpha _t(i-j) + \alpha _s(j) \ge \pi \), such that we indeed found the global point of minimum.
Thus,
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Hauch, K., Redenbach, C. Mathematical Morphology on Directional Data. J Math Imaging Vis 66, 1019–1032 (2024). https://doi.org/10.1007/s10851-024-01210-0
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10851-024-01210-0