Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Context, Aim and State-of-the-Art

Mathematical morphology is a nonlinear image processing methodology originally developed for binary and greyscale images [13]. It is based on the computation of maximum \(\bigwedge\) (dilation operator) and minimum \(\bigvee\) (erosion operator) in local neighborhoods called structuring elements [14]. That means that the definition of morphological operators needs a partial ordering relationship ≤ between the points to be processed. More precisely, for a real valued image \(f: E \rightarrow \mathbb{R}\), the flat dilation and erosion of image f by structuring element B are defined respectively by \(\delta _{B}(f)(\mathbf{x}) = \left \{f(\mathbf{y}): f(\mathbf{y}) =\bigwedge _{\mathbf{z}}[f(\mathbf{z})],\mathbf{z} \in B_{\mathbf{x}}\right \}\) and \(\varepsilon _{B}(f)(\mathbf{x}) = \left \{f(\mathbf{y}): f(\mathbf{y}) =\bigvee _{\mathbf{z}}[f(\mathbf{z})],\mathbf{z} \in \check{ B}_{\mathbf{x}}\right \}\), where \(B_{\mathbf{x}} \subset E\) is the structuring element centered at point x ∈ E, and \(\check{B}\) is the reflection of structuring element with respect to the origin.

Theory of morphological operators has been formulated in the general framework of complete lattices [11]: a complete lattice \((\mathcal{L},\leq )\) is a partially ordered set \(\mathcal{L}\) with order relation ≤ , a supremum written \(\bigvee\), and an infimum written \(\bigwedge\), such that every subset of \(\mathcal{L}\) has a supremum (smallest upper bound) and an infimum (greatest lower bound). Let \(\mathcal{L}\) be a complete lattice. A dilation \(\delta: \mathcal{L}\rightarrow \mathcal{L}\) is a mapping commuting with suprema, i.e., \(\delta \left (\bigvee _{i}X_{i}\right ) =\bigvee _{i}\delta \left (X_{i}\right )\). An erosion \(\varepsilon: \mathcal{L}\rightarrow \mathcal{L}\) commutes with infima, i.e., \(\delta \left (\bigwedge _{i}X_{i}\right ) =\bigwedge _{i}\delta \left (X_{i}\right )\). Then the pair \((\varepsilon,\delta )\) is called an adjunction on \(\mathcal{L}\) if for very \(X,Y \in \mathcal{L}\), it holds: \(\delta (X) \leq Y \Leftrightarrow X \leq \varepsilon (Y )\).

Matrix and tensor valued images appear nowadays in various image processing fields and applications [15]: structure tensor images representing the local orientation and edge information [10]; diffusion tensor magnetic resonance imaging (DT-MRI) [5]; covariance matrices in different modalities of radar imaging [4]; etc. In this paper we are interested in matrix-valued images considered as a spatial structured matrix field \(f(\mathbf{x})\) such that \(f: E \subset {\mathbb{Z}}^{2},\: {\mathbb{Z}}^{3}\longrightarrow \mathrm{SPD}(n)\), where E is the support space of pixels and, in particular, we focuss on (real) symmetric positive definite n × n matrices \(\mathrm{SPD}(n)\). The reader interested in positive definite matrices is referred to the excellent monograph [6]. More precisely, let \(\mathfrak{A} =\{ A_{i}\}_{i=1}^{N}\) be a finite set of N matrices, where \(A_{i} \in \mathrm{SPD}(n)\), we are aiming at computing the supremum \(\sup \left (\mathfrak{A}\right ) = A_{\vee }\) and the infimum \(\inf \left (\mathfrak{A}\right ) = A_{\wedge }\) matrices, such that A , \(A_{\wedge }\in \mathrm{SPD}(n)\). As mentioned above, if the operators \(\sup \left (\mathfrak{A}\right )\) and \(\inf \left (\mathfrak{A}\right )\) are defined, dilation and erosion operators are stated for any image \(f \in \mathcal{F}(E,\mathrm{SPD(n)})\) and any structuring element.

Extension of mathematical morphology to matrix-valued images has been previously addressed according to two different approaches. The first one [9] is based on the Löwner partial ordering \({\leq }^{L}\): \(\forall A,B \in \text{SPD}(n)\), \(A {\leq }^{L}B \Leftrightarrow B - A \in \text{SPD}(n)\), and where the supremum and infimum of a set of matrices are computed using convex matrix analysis tools (penumbral cones of each matrix, minimal enclosing circle of basis, computation of vertex of associated penumbra matrix). There is a geometrical interpretation viewing the tensors SPD(n) as ellipsoids: the supremum of a set of tensors is the smallest ellipsoid enclosing the ellipsoids associated to all the tensors; the infimum is the largest ellipsoid which is contained in all the ellipsoids. The second approach [8] corresponds to the generalization of a morphological PDE to matrix data. Finding the unique smallest enclosing ball of a set of points in a particular space (also known as the minimum enclosing ball or the one-center problem) is related to the Löwner ordering in the case of \(\mathrm{SPD}(n)\) matrices [1, 3].

We have recently shown in [2] how the counter-harmonic mean [7] can be used to introduce nonlinear operators which asymptotically mimic dilation and erosion. In particular, we have proved in [2] the advantages of the counter-harmonic mean against the classical P-mean to approximate supremum and infimum. The extension of P-mean to SPD(n) matrices was considered in [12] for diffusion tensor imaging. We introduce in this paper how the extension of counter-harmonic mean to SPD(n) matrices is very natural and leads to an efficient operator to robustly approximate the supremum/infimum of a set of matrices.

2 Counter-Harmonic Mean for SPD Matrices

The counter-harmonic mean (CHM) belongs to the family of the power means [7]. We propose a straightforward generalization of CHM for SPD(n) matrices.

Definition 1.

Given \(\mathfrak{A} =\{ A_{i}\}_{i=1}^{N}\), a finite set of N matrices, where \(A_{i} \in \mathrm{SPD}(n)\), the symmetrized counter-harmonic matrix mean (CHMM) of order P, \(P \in \mathbb{R}\), is defined by

$$\displaystyle{{ \kappa }^{P}\left (\mathfrak{A}\right ) ={ \left (\sum _{ i=1}^{N}A_{ i}^{P}\right )}^{-1/2}\left (\sum _{ i=1}^{N}A_{ i}^{P+1}\right ){\left (\sum _{ i=1}^{N}A_{ i}^{P}\right )}^{-1/2} }$$
(1)

The asymptotic values of the CHMM with P → + and P → − can be used to define approximations to the supremum and infimum of a set of matrices.

Definition 2.

The supremum and the infimum of a set \(\mathfrak{A} =\{ A_{i}\}_{i=1}^{N}\) of SPD(n) matrices are defined respectively as

$$\displaystyle{ A_{\vee } =\sup \left (\mathfrak{A}\right ) =\lim { _{P\rightarrow +\infty }\kappa }^{P}\left (\mathfrak{A}\right ), }$$
(2)

and

$$\displaystyle{ A_{\wedge } =\inf \left (\mathfrak{A}\right ) =\lim { _{P\rightarrow -\infty }\kappa }^{P}\left (\mathfrak{A}\right ), }$$
(3)

Proposition 1.

Given a set \(\mathfrak{A}\) of SPD(n) matrices, the following properties hold.

  1. (i)

    CHMM of \(\mathfrak{A}\) is a rotationally invariant operation for any value of P (including P →±∞).

  2. (ii)

    CHMM of \(\mathfrak{A}\) is for any value of P (including P →±∞) invariant to scaling transformations, i.e., multiplication by a real constant \(\alpha \in \mathbb{R}\) .

  3. (iii)

    CHMM of \(\mathfrak{A}\) produces a symmetric positive definite matrix for any value of P (including P →±∞).

  4. (iv)

    Due to the fact that the CHMM is not associative, \(\sup (\mathfrak{A})\) and \(\inf (\mathfrak{A})\) do not yield dilation and erosion operators over SPD(n) (they do not commute with the “union” and the “intersection”).

Proof.

  1. (i)

    Let us consider that the rotation is given by the matrix O ∈ SO(n). We know from linear algebra that the P-th power A P of a diagonalized matrix is achieved by taking the P-th power of the eigenvalues:

    $$\displaystyle{{A}^{P} = V \text{diag}\left ({(\lambda _{ 1}(A_{i}))}^{P},\cdots \,,{(\lambda _{ n}(A_{i}))}^{P}\right ){V }^{\text{T}}.}$$

    On the other hand, since \(\sum _{i=1}^{N}A_{i}^{P}\) is positive definite, there exists an orthogonal matrix V P and a diagonal matrix Λ P such that \(\sum _{i=1}^{N}A_{i}^{P} = V _{P}\varLambda _{P}V _{P}^{\text{T}}\). Hence, if we apply the rotation, we have

    $$\displaystyle\begin{array}{rcl} & &{ \left (\sum _{i=1}^{N}{(\mathit{OA}_{ i}{O}^{\text{T}})}^{P}\right )}^{-1/2}\left (\sum _{ i=1}^{N}{(\mathit{OA}_{ i}{O}^{\text{T}})}^{P+1}\right ){\left (\sum _{ i=1}^{N}{(\mathit{OA}_{ i}{O}^{\text{T}})}^{P}\right )}^{-1/2} {}\\ & & ={ \left (\sum _{i=1}^{N}\mathit{OA}_{ i}^{P}{O}^{\text{T}}\right )}^{-1/2}\left (\sum _{ i=1}^{N}\mathit{OA}_{ i}^{P+1}{O}^{\text{T}}\right ){\left (\sum _{ i=1}^{N}\mathit{OA}_{ i}^{P}{O}^{\text{T}}\right )}^{-1/2} {}\\ & & ={ \left (O\left (\sum _{i=1}^{N}A_{ i}^{P}\right ){O}^{\text{T}}\right )}^{-1/2}\left (O\left (\sum _{ i=1}^{N}A_{ i}^{P+1}\right ){O}^{\text{T}}\right ){\left (O\left (\sum _{ i=1}^{N}\right )A_{ i}^{P}{O}^{\text{T}}\right )}^{-1/2} {}\\ & & ={ \left (\mathit{OV }_{P}\varLambda _{P}V _{P}^{\text{T}}{O}^{\text{T}}\right )}^{-1/2}\left (\mathit{OV }_{ P+1}\varLambda _{P+1}V _{P+1}^{\text{T}}{O}^{\text{T}}\right ){\left (\mathit{OV }_{ P}\varLambda _{P}V _{P}^{\text{T}}{O}^{\text{T}}\right )}^{-1/2} {}\\ \end{array}$$

    Considering the fact that \({\mathit{OO}}^{\text{T}} = I\) and that OV P  ∈ SO(3), we can write

    $$\displaystyle{O{\left (\sum _{i=1}^{N}A_{ i}^{P}\right )}^{-1/2}\left (\sum _{ i=1}^{N}A_{ i}^{P+1}\right ){\left (\sum _{ i=1}^{N}A_{ i}^{P}\right )}^{-1/2}{O}^{\text{T}}}$$

    and consequently

    $$\displaystyle{{\kappa }^{P}\left (\{\mathit{OA}_{ i}{O}^{\text{T}\}_{i=1}^{N} }\right ) = {O\kappa }^{P}\left (\{A_{ i}\}_{i=1}^{N}\right ){O}^{\text{T}}}$$
  2. (ii)

    By considering scaling by parameter \(\alpha \in \mathbb{R}\), α ≠ 0, we have

    $$ \displaystyle\begin{array}{rcl} {\kappa }^{P}\left (\{\alpha A_{ i}\}_{i=1}^{N}\right )& =&{ \left (\sum _{ i=1}^{N}{(\alpha A_{ i})}^{P}\right )}^{-1/2}\left (\sum _{ i=1}^{N}{(\alpha A_{ i})}^{P+1}\right ){\left (\sum _{ i=1}^{N}{(\alpha A_{ i})}^{P}\right )}^{-1/2} {}\\ & =& {\alpha }^{-P/2}{\left (\sum _{ i=1}^{N}A_{ i}^{P}\right ){}^{-1/2}\alpha }^{P+1}{\left (\sum _{ i=1}^{N}A_{ i}^{P+1}\right )\alpha }^{-P/2}{\left (\sum _{ i=1}^{N}A_{ i}^{P}\right )}^{-1/2} {}\\ & =& {\alpha {}^{-P/2}\alpha {}^{P+1}\alpha }^{-P/2}{\left (\sum _{ i=1}^{N}A_{ i}^{P}\right )}^{-1/2}\left (\sum _{ i=1}^{N}A_{ i}^{P+1}\right ){\left (\sum _{ i=1}^{N}A_{ i}^{P}\right )}^{-1/2} {}\\ & =& \alpha {\kappa }^{P}\left (\{A_{ i}\}_{i=1}^{N}\right ) {}\\ \end{array}$$
  3. (iii)

    By construction, the P-th power A P and the inverse square root \({A}^{-1/2}\) have positive eigenvalues whenever A has. Similarly, the sum and the product of positive definite matrices preserves also the positiveness.

  4. (iv)

    Let consider two sets of SPD(n) matrices \(\mathfrak{A} =\{ A_{i}\}_{i=1}^{N}\) and \(\mathfrak{A}^{\prime} =\{ A_{j}\}_{j=N+1}^{M}\). Due to the fact that the counter-harmonic matrix mean is not associative, it cannot be ensured that there exist always a value of P such that

    $$\displaystyle{ \lim {_{P\rightarrow +\infty }\kappa }^{P}\left (\{A_{ k}\}_{k=1}^{M}\right ) }$$

    is equal to

    $$\displaystyle{ \lim {_{P\rightarrow +\infty }\kappa }^{P}\left (\lim {_{ P\rightarrow +\infty }\kappa }^{P}\left (\{A_{ i}\}_{i=1}^{N}\right ),\lim {_{ P\rightarrow +\infty }\kappa }^{P}\left (\{A_{ j}\}_{j=N+1}^{M}\right )\right ) }$$

    and consequently the operators \(\sup (\mathfrak{A})\) do not commute with “supremum”. A similar result is observed for the erosion.

The following result gives a spectral interpretation of asymptotic cases in SPD(2).

Proposition 2.

Given \(\mathfrak{A} =\{ A_{i}\}_{i=1}^{N}\) , a finite set of N matrices, where A i SPD (2). Let Λ(A i ) and λ(A i ) (with \(\varLambda (A_{i}) \geq \lambda (A_{i}) \geq 0\) ) be the two eigenvalues of A i . Then

$$\displaystyle{ A_{\vee } =\sup \left (\mathfrak{A}\right ) =\lim { _{P\rightarrow +\infty }\kappa }^{P}\left (\mathfrak{A}\right ), }$$

is a SPD (2) matrix with eigenvalues Λ(A ) and λ(A ), where Λ(A ) = \(\max \left (\varLambda (A_{1}),\varLambda (A_{2})\cdots \varLambda (A_{N})\right )\) , and its corresponding eigenvector is the eigenvector of A , and the remaining eigenvalue λ(A ) is the second largest eigenvalue from \(\left \{\varLambda (A_{i}),\lambda (A_{i})\right \}\) ; the corresponding eigenvector is the orthogonal to the major one.

A spectral characterization of A is obtained by replacing largest by smallest eigenvalues. We conjecture that this result may be extended to SPD(n), n > 2, but the proof is not straightforward.

Proof.

Let us write each SPD(2) matrix in the form \(A = V _{i}\mathrm{diag}\left (\varLambda _{i}\lambda _{i}\right )V _{i}^{T}\) such that \(\varLambda _{i} \geq \lambda _{i} > 0\) and where the rotation matrix is parameterized by the angle θ i :

$$\displaystyle{V _{i} = \left (\begin{array}{ccc} \cos \theta _{i} && -\sin \theta _{i} \\ -\sin \theta _{i}&& \cos \theta _{i}\\ \end{array} \right ).}$$

Hence we have

$$\displaystyle{\sum _{i=1}^{N}A_{ i}^{P+1}\,=\,\left (\begin{array}{ccc} \sum _{i=1}^{N}\varLambda _{ i}^{P+1}{\cos }^{2}\theta _{ i}\,+\,\lambda _{i}^{P+1}{\sin }^{2}\theta _{ i}& \sum _{i=1}^{N}(\lambda _{ i}^{P+1}\,-\,\varLambda _{ i}^{P+1})\cos \theta _{ i}\sin \theta _{i} \\ \sum _{i=1}^{N}(\lambda _{i}^{P+1}-\varLambda _{i}^{P+1})\cos \theta _{i}\sin \theta _{i} &\sum _{i=1}^{N}\lambda _{i}^{P+1}{\cos }^{2}\theta _{i}+\varLambda _{i}^{P+1}{\sin }^{2}\theta _{i}\\ \end{array} \right ).}$$

The eigenvalues of \(\sum _{i=1}^{N}A_{i}^{P+1}\) are given by

$$\displaystyle\begin{array}{rcl} & & (\varLambda (P + 1),\lambda (P + 1)) {}\\ & & \qquad \qquad = \frac{1} {2}\left [\sum _{i=1}^{N}\varLambda _{ i}^{P+1}{\cos }^{2}\theta _{ i} +\lambda _{ i}^{P+1}{\sin }^{2}\theta _{ i} +\sum _{ i=1}^{N}\lambda _{ i}^{P+1}{\cos }^{2}\theta _{ i} +\varLambda _{ i}^{P+1}{\sin }^{2}\theta _{ i}\right. {}\\ & & \qquad \qquad \pm \Big\{{\left (\sum _{i=1}^{N}\varLambda _{ i}^{P+1}{\cos }^{2}\theta _{ i} +\lambda _{ i}^{P+1}{\sin }^{2}\theta _{ i} -\sum _{i=1}^{N}\lambda _{ i}^{P+1}{\cos }^{2}\theta _{ i} +\varLambda _{ i}^{P+1}{\sin }^{2}\theta _{ i}\right )}^{2} {}\\ & & \qquad \qquad + \left.4{\left (\sum _{i=1}^{N}(\lambda _{ i}^{P+1} -\varLambda _{ i}^{P+1})\cos \theta _{ i}\sin \theta _{i}\right ){}^{2}\Big\}}^{1/2}\right ], {}\\ \end{array}$$

which can be simplified to

$$\displaystyle{ \begin{array}{c} {(2N)}^{-1}\sum _{i=1}^{N}\left (\varLambda _{i}^{P+1} +\lambda _{ i}^{P+1}\right ) \\ \pm {(2N)}^{-1}\sqrt{{\left (\sum _{i=1 }^{N }\left (\varLambda _{i }^{P+1 } -\lambda _{ i }^{P+1 } \right ) \cos (2\theta _{i } ) \right ) }^{2 } +{ \left (\sum _{i=1 }^{N }\left (\varLambda _{i }^{P+1 } -\lambda _{ i }^{P+1 } \right ) \sin (2\theta _{i } ) \right ) }^{2}}.\end{array} }$$

We are interested in the limit case:

$$\displaystyle{\varLambda (A_{\vee })\,=\,\lim _{P\rightarrow +\infty }\varLambda {(P)}^{-1/2}\varLambda (P + 1)\varLambda {(P)}^{-1/2}\,=\,\lim _{ P\rightarrow +\infty }\frac{\varLambda (P + 1)} {\varLambda (P)} \,=\,\max \left \{\varLambda _{i}\right \}.}$$

For the second eigenvalue, we first consider the product

$$\displaystyle\begin{array}{rcl} \varLambda (P + 1)\lambda (P + 1)& =\,& {(4{N}^{2})}^{-1}{\left (\sum _{ i=1}^{N}\left (\varLambda _{ i}^{P+1} +\lambda _{ i}^{P+1}\right )\right )}^{2} {}\\ & -& {(4{N}^{2})}^{-1}{\left (\sum _{ i=1}^{N}\left (\varLambda _{ i}^{P+1} -\lambda _{ i}^{P+1}\right )\cos (2\theta _{ i})\right )}^{2} {}\\ & -& {(4{N}^{2})}^{-1}{\left (\sum _{ i=1}^{N}\left (\varLambda _{ i}^{P+1} -\lambda _{ i}^{P+1}\right )\sin (2\theta _{ i})\right )}^{2}. {}\\ \end{array}$$

By the invariance under scaling, we can consider without loss of generality that \(\varLambda _{1} =\varLambda _{2} = \cdots \varLambda _{n} = 1\) and Λ i  ≤ 1. We also assume \(\theta _{1} =\theta _{2} = \cdots \,,\theta _{n} = 0\) and θ j ≠ 0, \(j = n + 1,n + 2,\cdots \,,N\). As \(\alpha (P + 1) =\sum _{ i=1}^{n}\varLambda _{i}^{P+1}\), with 1 ≤ α(P + 1) ≤ N, is the dominant term, and considering defining the element

$$\displaystyle{M =\max \left (\varLambda _{n+1},\varLambda _{n+2},\cdots \,,\varLambda _{N},\lambda _{1},\cdots \,,\lambda _{N}\right ),}$$

then we can approximate

$$\displaystyle{ \begin{array}{c} \varLambda (P + 1)\lambda (P + 1) = Cte \cdot \alpha (P + 1){M}^{P+1} + {M}^{P+1}\mathrm{O}(1) \end{array} }$$

Finally, we have

$$\displaystyle{\lambda (A_{\vee }) =\lim _{P\rightarrow +\infty }\frac{\alpha (P + 1){M}^{P+1} + {M}^{P+1}\mathrm{O}(1)} {\alpha (P){M}^{P} + {M}^{P}\mathrm{O}(1)} = M.}$$
Fig. 1
figure 1

Counter-harmonic matrix mean based processing of SPD(2) matrix-valued image: (a) initial gray-level image from retina vessels, (b) corresponding structure tensor image, (ce) tensor filtered image by CHMM \({\kappa }^{P}\left (\mathfrak{A}\right )\), for different values of order P. The local neighborhood (structuring element B) is a square of 3 × 3 pixels

Figure 1b depicts an example of SPD(n) matrix-valued image. This image corresponds to the structure tensors obtained from the gray-level image Fig. 1a, representing the local orientation and edge information, which is computed by Gaussian smoothing of the dyadic product ∇uu T of an image u(x, y) [10]. Using the symmetrized counter-harmonic matrix mean operator \({\kappa }^{P}\left (\mathfrak{A}\right )\) computed in local neighborhoods, various values of P are compared. In particular, P = 0 in Fig. 1c which corresponds to the arithmetic mean filtered image, P = 2 and P = 10 in Fig. 1d1, d2 are pseudo-dilations, \(P = -2\) and \(P = -10\) in Fig. 1e1, e2 can be considered as pseudo-erosions. It is natural to consider that the matrices A and A , associated respectively to the limit cases P = 10 and \(P = -10\), can be interpreted geometrically similarly to the supremum/infimum associated to the Löwner ordering: A “tends to be” the smallest ellipsoid enclosing the ellipsoids of \(\mathfrak{A}\) and A “tends to be” the largest ellipsoid which is contained in all the ellipsoids.