Abstract
The basic filters in mathematical morphology are dilation and erosion. They are defined by a structuring element that is usually shifted pixel-wise over an image, together with a comparison process that takes place within the corresponding mask. This comparison is made in the grey value case by means of maximum or minimum formation. Hence, there is easy access to max-plus algebra and, by means of an algebra change, also to the theory of linear algebra. We show that an approximation of the maximum function forms a commutative semifield (with respect to multiplication) and corresponds to the maximum again in the limit case. In this way, we demonstrate a novel access to the logarithmic connection between the Fourier transform and the slope transformation. In addition, we prove that the dilation by means of a fast Fourier transform depends only on the size of the structuring element used. Moreover, we derive a bound above which the Fourier approximation yields results that are exact in terms of grey value quantisation.
Similar content being viewed by others
Avoid common mistakes on your manuscript.
1 Introduction
Max-plus algebra [1] is a class of algebraic systems and is obtained from linear algebra by replacing addition with maximum and multiplication with addition. This results in many analogues in the max-plus algebra to the conventional algebra. Therefore, it is mainly used to cast nonlinear relationships in a linear-like structure. The max-plus algebra emerged from problems in graph theory and operations research [2]. It has subsequently been used in other areas such as discrete event systems [3,4,5], approaches to optimal control [6] and dynamic systems and control [7, 8]. Another area of application for this algebra, to which we will devote particular attention here, is mathematical morphology.
Mathematical morphology is a theory for the analysis of spatial structures in images. It has evolved over decades to a very successful field in image processing, see, for example, [9,10,11] for an overview. There are two main building blocks of usual morphological operators. The first one is the structuring element (SE), characterised by its shape, size and centre location. There are in addition two types of SEs: flat and non-flat [12]. A flat SE basically defines a neighbourhood of the centre pixel where morphological operations take place, whereas a non-flat SE also contains a mask of finite values used as additive offsets. The SE is translated over an image and often implemented as a sliding window. The second building block is a mechanism performing a comparison of values within a SE. The basic operations in mathematical morphology are dilation and erosion, where a pixel value is set to the maximum or minimum of the discrete image function within the SE centred upon it, respectively. Many morphological filtering processes of practical interest, e.g. opening, closing or top hats, can be formulated by combining dilation and erosion. As dilation and erosion are dual operations, it is often sufficient to focus on one of it for algorithm construction.
From the interaction of these two theories, a first fundamental question arises, namely how nonlinear morphological dilation relates to its linear analogue when one makes the transition between max-plus algebra and linear algebra. From this connection arises a relation between the Fourier transform in linear signal processing and the slope transform in morphology. This relation was introduced by Maragos [13] and by Dorst and van den Boomgaard [14]. This suggested a logarithmic relationship between these two transformations, which Burgeth and Weickert, among others, analysed in their work [15]. For this purpose, they naturally identified the convolution in the max-plus algebra with the Laplace transformation and its conjugate with the Cramer transformation. They called the resulting connection the logarithmic connection.
We want to take up the analysis of Burgeth and Weickert and investigate an alternative approach in order to find a direct access to the logarithmic relationship without having to take a diversion via the Laplace and Cramer transformation. To achieve this, we will replace the maximum operator in the dilation by an approximation and show that the max-plus algebra is still a commutative semifield (with respect to multiplication) by this approximation. Further, we will compare the resulting equations with respect to the dilation via the Fourier or slope transformation theorem.
Another question arising from this connection with the approximated max-plus algebra, which is still partly open, relates to the work [16] by Kahra, Sridhar and Breuß. This represents an extension of the work [17] of Tuzikov, Margolin and Grenov, where the calculation of the dilation by means of Fourier transforms for binary images was discussed, to the case of greyscale images. They have adopted the approaches and approximated the dilation by an approximation of the maximum. In doing so, the authors posited that the procedure using the approximated max-plus algebra mentioned above does not depend on the shape or flatness of the SE, but solely on its size. However, an analytical observation supporting this has been missing so far.
We will therefore close this gap here by giving two estimates for it. One in a heuristic sense in the form of an energy estimate and a more direct variant identifying the convolution with the k-norm. Both will demonstrate the presumed independence of the method from the form of the SE. Further, we will also address the question of when this approximation is of sufficiently good quality with respect to the exact calculation in practice.
2 General Definitions
We will first give some basic definition concerning dilation, erosion, Fourier and slope transformations. Here we will use the discrete formulation when switching between the plus-prod and the max-plus algebra and the continuous formulation when referring exclusively to the Fourier transform.
We start by investigating how the morphological dilation and erosion for a greyscale image \(f: {\mathbb {R}}^2 \rightarrow {\mathbb {R}}\) with a (flat) structuring function \(b: {\mathbb {R}}^2 \rightarrow \bar{{\mathbb {R}}}\) according to
behaves. To do this, we consider the generalisation (called “tangential dilation”) used by Dorst and van den Boomgaard [14]
with
where the following connection exists:
Under this premise, one considers the slope transform \({\mathcal {S}}\), which satisfies
as a morphological analogy to the Fourier transform
since \({\mathcal {S}}\) in a certain sense satisfies a convolution theorem similar to the Fourier transform:
For further details regarding the slope transform and corresponding connections to other transformations, please refer to “Appendix A.3” and the references listed there.
3 Approximation of the Max-Plus Algebra
In this section, we will look at the properties of max-plus algebra [4]. To be more precise, we want to investigate to what extent an approximation of the maximum preserves the max-plus algebra properties.
To do this, we first consider a convolution in the plus-prod algebra of f with b from the previous section. If we now switch from the (discrete) convolution in the plus-prod algebra to the max-plus algebra or min-plus algebra, we see that this gives rise to two new convolutions (cf. [15]) for \(x \in {\mathbb {R}}^2\):
where \(\bar{b}(x) = - b(-x)\). Furthermore, we know that we can approximate the dilation by the smooth maximum with Fourier transforms according to [16]:
In particular, the expression in the third line of this equation is important because it is possible to speed up these calculations using a fast Fourier transform (see [16] for greyscale images and [18] for colour images). This was demonstrated by the algorithm cited here, which combines advantageous properties. Most obviously, its complexity does not depend on the size or shape of the structuring element, but only on the size of the input image, which distinguishes it from other fast methods. Therefore, one can assume that it is particularly suitable for large images or filters. In addition, non-flat filters can also be used. However, since this is more indirectly related to our result, we will revisit this topic in Sect. 5.
Remark 1
The last expression in the first line of Eq. (10) is better known as an approach by Maslov [19], who introduced it as a log-sum-exponentiation approximation of the maximum function. However, this approach is now also used in other areas, for example in convex analysis [20] or as a tool in tropical geometry to convert classic polynomials into max-plus polynomials describing geometric objects [21].
This brings us to the idea of creating a new max-plus algebra \({\mathbb {R}}_{\max _n^*}= ({\mathbb {R}} \cup \{-\infty \}, \frac{1}{n} \ln \left( \sum \textrm{e}^{n\cdot (...)} \right) , +, -\infty , 0)\) which resembles the normal max-plus algebra \({\mathbb {R}}_{\max } = ({\mathbb {R}} \cup \{-\infty \}, \max , +, -\infty , 0)\) except for the change that instead of the maximum we use the smooth maximum without the limit transition \(\frac{1}{n} \ln \left( \sum \textrm{e}^{n\cdot (...)} \right) \) for the link \(\tilde{\oplus }\). For better readability, we use \(\,\tilde{\oplus }\,\) and \(\,\tilde{\otimes }\,\) for the general operations of addition and multiplication concerning the field axioms to avoid confusion with the notation of dilation and erosion, respectively. See “Appendix A.2” for more details to max-plus algebras. To check this, we only have to prove that \({\mathbb {R}}_{\max _n^*}\) is an idempotent commutative semifield.
For this purpose, we prove the following theorem, which already appears in [22] but is not explicitly proved there:
Theorem 1
Let the approximated smooth maximum be given by
Then \({\mathbb {R}}_{\max _n^*}= ({\mathbb {R}} \cup \{-\infty \}, \max {}_n^*, +, -\infty , 0)\) represents for all \(n \in {\mathbb {R}}_{> 0}\) a commutative (with respect to multiplication) semifield.
Remark 2
We have used the terms “smooth maximum”, respectively, “approximated smooth maximum” here, depending on whether we have formed the limit, respectively, not. This expression is also called “log-sum-exponentiation” (LSE) in convex analysis or “SoftMax” in tropical geometry and neural networks (see the relevant references from remark 1).
Proof
For this, we calculate for arbitrary \(a,b,c \in {\mathbb {R}} \cup \{-\infty \}\):
Corollary 1
Let the approximated smooth maximum be given as in Theorem 1. Then \(\lim \limits _{n \rightarrow \infty } {\mathbb {R}}_{\max _n^*}\) represents a max-plus algebra.
Proof
For this, we only have to prove the idempotence with respect to addition, since all other properties have already been proved in Theorem 1:
Thus, \({\mathbb {R}}_{\max _n^*}\) does not represent a max-plus algebra, but at least a commutative (with respect to multiplication) semifield. For sufficiently large n, however, we again obtain the property of idempotence (with respect to addition), where in the morphological case the size of n must be considered in relation to \(\ln (k)\). Here \(k \in \mathbb {N}\) represents the size of the mask under consideration.
4 Connection of the Fourier Transform and the Slope Transform
Next, we will deal with the logarithmic connection between morphological and linear systems. To do this, we will use the max-plus algebra (or min-plus algebra) to derive a connection between the Fourier and slope transforms and their analogue from convex analysis, the Legendre transform, in particular on the basis of dilation. See “Appendix A.1” for a short introduction to mathematical morphology and A.2 for a connection with the max-plus algebra.
We first formulate the dilation by means of slope transformations using the smooth maximum:
where \(M := \{ y \in {\mathbb {R}}^2 : \nabla (f(y) + b(x-y)) = 0 \}\). Note that the supremum and the sum over all \(y \in M\) used here are to be understood in a symbolic sense, since the expressions do not depend directly on y but on x. The y is used here in the stat function to ensure that the result is really unique, and thus, Eq. (4) is fulfilled. Due to
we can also write Eq. (11) as
If we now compare Eqs. (10) and (12) by dragging the factor \(\frac{1}{n}\) into the logarithm for both and then dragging the limit transition into the logarithm as well, we find that
This represents the relationship between the Fourier transform and the slope transform using morphological dilation.
In the following, we will examine the case that is often considered in practice, namely that we disregard the limit and instead assume a fixed n. Thus, by now removing the limit transition and subsequently performing an exponentiation with n, we transform Eq. (13) into the form
By applying the Fourier transform on both sides, we get because of the linearity of the Fourier transform
Alternatively, we can completely remove the Fourier transforms again by using the convolution theorem instead of the linearity of the Fourier transform in Eq. (14) and then applying the inverse Fourier transform to it again. This yields
or
We summarise the above considerations into
Theorem 2
Let \(f: {\mathbb {R}}^2 \rightarrow {\mathbb {R}}\) and \(b: {\mathbb {R}}^2 \rightarrow {\mathbb {R}}\) are given. Then the sequences of the functions
and
coincide in every element of the sequence.
Remark 3
Equation (15) in this context reflects the relationship between the convolution theorems of the Fourier and the slope transformation with the dilation terms when the equation is contrasted in the plus-prod algebra
and in the max-plus algebra using the monotonicity of the exponential function
In the plus-prod algebra, we recognise a convolution which we can express by means of Fourier transformations, and which we can now also determine in this context by means of the generalised dilation shown in Eq. (3). In the case of the max-plus algebra, we see that the application of the convolution theorem of the slope transformation leads to an analogue of the well-known dilation.
5 Independence of the Fourier Dilation from the Shape of the Structuring Element
At this point, we would like to take a closer look at the choice of the smooth maximum as a substitute for the ordinary maximum and examine which properties result from the example of a dilation. To do this, we look at the work of Kahra, Sridhar and Breuß on the calculation of a fast dilation by means of Fourier transforms and using the smooth maximum. In their work, Kahra, Sridhar and Breuß describe that their method is independent of the shape of the chosen structuring element and that it does not matter for their method whether it is a flat or non-flat structuring element. Although the corresponding algorithm in [16] has been discussed in detail, they do not give any proof of this property. Instead, they only refer to their observations and results there. For this purpose, we want to present two possible ways, both of which prove the above statement, but which yield slightly different results in the process.
To evaluate this, we estimate the error resulting from the difference between the exact dilation and the approximated one. As a first step, we prove the following lemma:
Lemma 1
Let \(f_{\text {ex}} : {\mathbb {R}}^2 \rightarrow [0,255]\) and \(f_{\text {app}} : {\mathbb {R}}^2 \rightarrow [0,255]\) be the results of the exact dilation and the approximated dilation of the greyscale image \(f : {\mathbb {R}}^2 \rightarrow [0,255]\) with the structuring element \(B \subset {\mathbb {R}}^2\):
where
Then applies
Proof
We first consider
or
Next, we estimate the fraction by proving the following more general inequality:
Without restriction of generality, let the \(b_i\) be ordered such that \(b_i = 0\) \(\forall i \in \{ 1, \dots , l\}\) for a fixed \(l \in \{0, \dots , m\}\). Then it applies
So from this, we get
Due to the monotonicity of the logarithm function, we finally obtain the inequality we are looking for.
The first possibility to carry out the mentioned proof does not represent an exact calculation in the conventional sense, but rather a heuristic, which, however, delivers an expected result. We summarise this calculation as
Lemma 2
Let the conditions from Lemma 1 be fulfilled and be \(f_{\text {ex}}, f_{\text {app}}, f \in L^2({\mathbb {R}}^2)\). Then it holds
where A(B) represents the area of \(B \subset {\mathbb {R}}^2\).
Proof
We begin with
and use the Taylor linearisation of \(\ln (x)\) at \(x_0 = 1\)
Here we almost always have the case that \(\ln (x) \le x-1\) applies, so in the following we write \(\ln (x) \overset{\cdot }{\le }\ x-1\). If we substitute this into the above inequality, we get
Next we estimate the two norms and start with the aid of Parseval’s theorem
To achieve the desired result, we still need to remove the exponential function. For this reason, we reintroduce the logarithm that we previously removed with the Taylor linearisation by performing the said linearisation backwards in an approximate sense (see Remark 2):
For the second norm, we also use Parseval’s theorem to derive
from it. From this, we finally deduce the assertion
which results in the approximate estimate we are looking for.
Remark 4
The backward linearisation may actually break the chain of inequalities in an exact calculation, which is why we spoke of a heuristic. However, on the one hand because we have only used equalities since the linearisation and on the other hand because we get reasonable results in the form of (18), it appears evident that the backward use of the same linearisation may only slightly violate the inequality.
Another way (and not a heuristic) to substantiate the observation of Kahra, Sridhar and Breuß, we summarise as the
Lemma 3
Let the conditions from Lemma 1 be fulfilled. Then it holds
Proof
We start from the inequality (17) and rewrite it as follows:
By applying the logarithm on both sides, we obtain the required result.
Both inequalities (18) and (19) show that the observation that in the approximation of the smooth maximum for the dilation, the shape or flatness of the structuring element used does not matter. This is particularly evident from the fact that the error depends on the area of the structuring element, i.e. its size, and on the original image at the searched position or on the original image in the area given by the structuring element. In both cases, all required values for the searched pixel are constant and thus show the validity of the observation made.
Lemma 4
Let the conditions from Lemma 1 be fulfilled. Then it holds
Proof
We begin by expressing, for a non-negative integrable function h, the inequality
due to the monotonicity of the p-norm and exponentiate it with \(\frac{1}{n}\):
With the help of this inequality we can now estimate as follows:
where we have used the convolution theorem in the last equality. We next form the norm over this inequality and estimate the norm of the first Fourier transform using Parseval’s theorem:
and we estimate the norm of the second Fourier transform, as in the proof of Lemma 1, with \(\sqrt{A(B)}\). By applying Parseval’s theorem again for the backward direction, we get
Furthermore, we can use this inequality to achieve the desired result:
The bound derived above is apparently weaker than the ones from previous result. However, it demonstrates the same kind of independence from shape of the structuring element, and within the proof, one may observe that it is a relatively pessimistic (and thus unsharp) estimate.
6 Practical Error Estimation
From this context, the question automatically arises for which n this error becomes negligible in practice. To answer this question, we evaluate the error range. The largest error is in the case that all considered k pixels have the same value, i.e. we obtain \(\frac{\ln (k)}{n}\) as error, see proof of Corollary 1. Consequently, the smallest error results if we have a single maximum grey value \(x_i\):
The error that occurs here can vary between
and
i.e.
depending on the composition of the remaining (not maximum) grey values.
We consider an error to be negligible in practice if it is smaller than \(\frac{1}{2}\), because we assume natural grey values from the interval [0, 255] and we round up or down the floating point numbers resulting from the calculation according to the usual rounding rules in order to continue calculating with natural numbers. This means that we can estimate the smallest possible scaling factor for which the error can disappear as follows:
and for the largest error
Thus, in practice, it is sufficient to choose a \(n\in \mathbb {N}\) which, depending on the mask and grey value distribution, is larger than the corresponding value from the interval
so that \({\mathbb {R}}_{\max }^*\) behaves like a max-plus algebra. At this point, we would like to point out that the smallest possible value is of a purely theoretical nature and will be significantly larger in practice. We will deal with this in more detail in the following chapter.
In the following, we will test this accuracy criterion using the example of the error observation of the previous section. That means we have to set \(n > 2 \ln |B|\). Let \(p := |B|\) and set \(n := 4 \ln (p)\) for simplicity’s sake. Let the pixels within the structuring element at position \(x \in {\mathbb {R}}^2\) be given by \(x_j\), \(j \in \{ 1, \dots , p\}\). Furthermore, the largest greyscale value in the neighbourhood B of pixel x should be located at position \(x_i\), \(i \in [1,p]\), so that \(f_{\text {ex}}(x) = f(x_i)\). We can then estimate the approximated dilation accordingly with
It therefore follows that \(|(f_{\text {ex}} - f_{\text {app}})(x)| \le \frac{1}{4}\) and we also see that the error, as expected, is less than \(\frac{1}{2}\). Thus, when rounding, it disappears and we get the correct result.
Example 1: Stairs
To illustrate our findings, we consider a greyscale image of size \(40 \times 40\) and perform a dilation with a \(3 \times 3\) SE, see Fig. 1. The comparison of the different scaling factors n for the values 0.05, 0.1, 0.2 and 4.5 shows that the resulting grey value shift becomes smaller and smaller with increasing n and in the case of \(n = 4.5\) even disappears completely. This supports the inequality shown above, since \(2 \ln (9) \approx 4.3944\).
Example 2: Squares
In order to make the effect of the grey value shift and the quantisation, which arises through the now more targeted rounding, even clearer, we consider another example. For this, we again choose a greyscale image of the size \(40 \times 40\) and a SE with \(3 \times 3\), see Fig. 2. The image is created by superimposing smaller centred squares with different brightness levels, where the largest square is \(40 \times 40\) and has the grey value 0 and the smallest in the middle is \(10 \times 10\) and has the grey value 3. The squares in between have corresponding edge lengths of 20 and 30 and grey values of 1 and 2. Here we see in the histograms how the approximated dilation with (grey) and without quantisation (dark grey) relates to the exact dilation (light grey). For relatively small n, such as 0.1 or 0.2, quite large deviations from the correct result occur. The quantised approximation approaches the exact solution more quickly and more accurately than the non-quantised approximation, as we can see in the diagrams for \(n \in \{1, 1.5, 2, 4.5\}\). Here, too, the quantised approximation finally agrees with the exact solution for \(n=4.5\).
7 Supplementary Discussion
In this section, we will discuss again one of our main results, namely that the approximation error that occurs depends only on the size of the SE and how much maximal values are in the neighbourhood of the SE. Therefore, here we will look at what happens when we change the mask size and the meaning for the interval (22) of the scaling factor. Remember, this interval tells us when the error in the grey shift can possibly disappear. To illustrate this, we choose the bridge image and dilate it in a first experiment with a \(3\times 3\) mask for different sizes of n in Fig. 3.
Here we can again see a clear grey value shift for small n such as \(n = 0.05\) or \(n = 0.1\). If we increase the factor further, e.g. to one or higher, it becomes difficult to perceive differences with the human eye. Likewise, with our interval for this case (\(k = 9\)), i.e. for approximately \(n \in [0.0086,4.3944]\), we cannot draw any conclusions as to whether one of these images is necessarily error-prone or error-free, since the values 1 and 2.5 both lie in the interval mentioned.
To create a first comparison, let us look at the same image, but this time dilate it with a larger SE, namely a \(5 \times \)5 mask. According to our previous findings, the approximate interval for the smallest possible error-free scaling factor would be [0.0126, 6.4378]. This would indicate that we must expect to use larger values to obtain comparable results. Therefore, we extend our reference images with an additional image for \(n = 3.5\) and summarise these images in Fig. 4.
In this case, too, we first see clear grey value shifts for low n. In particular, we also see that the grey value shifts are more pronounced than in the previous experiment with the \(3 \times 3\) mask. This indicates that our assessment that we need a larger scaling factor for a larger SE is correct. Larger values such as 1, 2.5 or 3.5, however, do not seem to show a visible grey shift. This would imply that our approximation becomes “accurate” relatively quickly, at least for the human eye. To better measure these possible small differences, we consider the corresponding average error curves for these experiments for \(n \in [0.05,2.5]\), see Fig. 5.
In Fig. 5a for the range [0.05, 0.5], we see what we had already conjectured. The two graphs have a similar shape but the one for the \(5 \times 5\) SE shows a larger difference, respectively, takes longer to reach the same grey value difference as the \(3 \times 3\) graph. In addition, we also see that the differences become very small already at 0.5, so that visually one can hardly recognise them.
By Fig. 5b, we study possible errors in higher detail. We can still see that the curves are relatively similar, as can be seen, for example, at 1.95, where both are almost synchronous. As we can see here, the exactness may be reached, but is not maintained up to a small numerical error. This also continues for larger values of n, which are not shown here. Nevertheless, these errors are so small in magnitude that we conjecture that they can be neglected in practice. This can be illustrated by looking at the comparatively large difference at 2.4, which has an average error of about 0.007, which means that about every 140th pixel has a grey value shift of one, which may be considered as of the same order as a quantisation error.
8 Conclusion
We have shown a short and simple way to demonstrate the logarithmic relationship between the Fourier and slope transforms. In doing so, we have established that a convolution can be calculated by means of a generalised dilation in the plus-prod algebra and that the convolution theorem of the slope transformation in the max-plus algebra yields an ordinary dilation.
We also proved that the dilation by Fourier transforms is independent of the shape of the SE and depends exclusively on its size. In this respect, we gave an estimate for the scaling factor n at which point it leads to the approximated solution not differing from the exact solution by more than half a grey value, in the sense of a grey value scale from 0 to 255. In particular, it becomes obvious that the grey value shift, which arises through the approximation, can be eliminated through appropriate choice of the factor n by means of rounding off.
References
Akian, M., Bapat, R., Gaubert, S.: Max-plus algebra. Handb. Linear Algebra 39 (2006)
Cuninghame-Green, R.A.: Minimax algebra. Lect. Notes Econ. Math. Syst 166 (1979)
Cohen, G., Dubois, D., Quadrat, J., Viot, M.: A linear-system-theoretic view of discrete-event processes and its use for performance evaluation in manufacturing. IEEE Trans. Autom. Control 30(3), 210–220 (1985). https://doi.org/10.1109/TAC.1985.1103925
Baccelli, F., Cohen, G., Olsder, G.J., Quadrat, J.: Synchronization and linearity: an algebra for discrete event systems (1992)
De Schutter, B., van den Boom, T.: Max-plus algebra and max-plus linear discrete event systems: an introduction. In: 2008 9th International Workshop on Discrete Event Systems, pp. 36–42. IEEE (2008). https://doi.org/10.1109/WODES.2008.4605919
Litvinov, G.L., Maslov, V.P., Shpiz, G.B.: Idempotent functional analysis: an algebraic approach. Math. Notes 69(5), 696–729 (2001). https://doi.org/10.1023/A:1010266012029
Adzkiya, D., De Schutter, B., Abate, A.: Computational techniques for reachability analysis of max-plus-linear systems. Automatica 53, 293–302 (2015). https://doi.org/10.1016/j.automatica.2015.01.002
Hardouin, L., Lhommeau, M., Shang, Y.: Towards geometric control of max-plus linear systems with applications to manufacturing systems. In: 2011 50th IEEE Conference on Decision and Control and European Control Conference, pp. 1149–1154. IEEE (2011). https://doi.org/10.1109/CDC.2011.6160489
Serra, J., Soille, P.: Mathematical Morphology and Its Applications to Image Processing, vol. 2. Springer, Dordrecht (2012)
Najman, J., Talbot, H.: Mathematical Morphology: From Theory to Applications. ISTE-Wiley, London (2010). https://doi.org/10.1002/9781118600788
Roerdink, J.B.T.M.: Mathematical morphology in computer graphics, scientific visualization and visual exploration. In: International Symposium on Mathematical Morphology and Its Applications to Signal and Image Processing, pp. 367–380. Springer (2011). https://doi.org/10.1007/978-3-642-21569-8_32
Haralick, R.M., Sternberg, S.R., Zhuang, X.: Image analysis using mathematical morphology. IEEE Trans. Pattern Anal. Mach. Intell. PAMI-9(4), 532–550 (1987). https://doi.org/10.1109/TPAMI.1987.4767941
Maragos, P.: Slope transforms: theory and application to nonlinear signal processing. IEEE Trans. Signal Process. 43(4), 864–877 (1995). https://doi.org/10.1109/78.376839
Dorst, L., Van den Boomgaard, R.: Morphological signal processing and the slope transform. Signal Process. 38(1), 79–98 (1994). https://doi.org/10.1016/0165-1684(94)90058-2
Burgeth, B., Weickert, J.: An explanation for the logarithmic connection between linear and morphological system theory. Int. J. Comput. Vis. 64(2), 157–169 (2005). https://doi.org/10.1007/s11263-005-1841-z
Kahra, M., Sridhar, V., Breuß, M.: Fast morphological dilation and erosion for grey scale images using the fourier transform. In: International Conference on Scale Space and Variational Methods in Computer Vision, pp. 65–77 (2021). https://doi.org/10.1007/978-3-030-75549-2_6.Springer
Tuzikov, A.V., Margolin, G.L., Grenov, A.I.: Convex set symmetry measurement via Minkowski addition. J. Math. Imaging Vis. 7(1), 53–68 (1997). https://doi.org/10.1023/A:1008266024101
Sridhar, V., Breuß, M., Kahra, M.: Fast approximation of color morphology. In: Advances in Visual Computing, pp. 488–499. Springer, Cham (2021). https://doi.org/10.1007/978-3-030-90436-4_39
Maslov, V.P.: On a new superposition principle for optimization problems. Russ. Math. Surv. 42(3), 39–48 (1987)
Boyd, S., Vandenberghe, L.: Convex Optimization. Cambridge University Press, Cambridge (2004)
Maragos, P., Charisopoulos, V., Theodosis, E.: Tropical geometry and machine learning. Proc. IEEE 109(5), 728–755 (2021). https://doi.org/10.1109/JPROC.2021.3065238
Gondran, M., Minoux, M.: Graphs, Dioids and Semirings: New Models and Algorithms, vol. 41. Springer, New York (2008). https://doi.org/10.1007/978-0-387-75450-5
Sharma, G., Bala, R.: Digital Color Imaging Handbook. CRC Press, Boca Raton (2017)
Dorst, L., van den Boomgaard, R.: An analytical theory of mathematical morphology. In: Mathematical Morphology and Its Applications to Signal Processing, Barcelona, pp. 245–250 (1993)
Callen, H.B.: Thermodynamics. Wiley, New York (1985)
Heijmans, H.J.A.M., van den Boomgaard, R.: Algebraic framework for linear and morphological scale-spaces. J. Vis. Commun. Image Represent. 13(1–2), 269–301 (2002). https://doi.org/10.1006/jvci.2001.0480
Jackway, P.T., Deriche, M.: Scale-space properties of the multiscale morphological dilation-erosion. IEEE Trans. Pattern Anal. Mach. Intell. 18(1), 38–51 (1996). https://doi.org/10.1109/34.476009
Acknowledgements
The work of the authors is partially supported by the European Regional Development Fund, EFRE 85037495. On the mathematical side, the authors would like to thank Joachim Weickert for an inspiring remark on the possible logarithmic relation of the approximate Fourier framework and the slope transform.
Funding
Open Access funding enabled and organized by Projekt DEAL.
Author information
Authors and Affiliations
Corresponding author
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Appendix A
Appendix A
1.1 A.1 Morphological Image Processing
We start by considering a two-dimensional, discrete image domain \(\Omega \subset \mathbb {Z}^2\). A single-channel, grey value image can be represented as a function \(f: \Omega \rightarrow [0,255]\). In non-flat morphology, the SE itself can be perceived as a grey value image. A non-flat SE can thus be defined as a function \(b:B\rightarrow [0,255]\) with
for B denoting a suitable set centred at the origin. A flat filter is just a special case where \(b(x)=0\) for all \(x\in B\). The fundamental building blocks of mathematical morphology are dilation and erosion. The dilation of an image f by a SE is given by \(f\oplus b: \Omega \rightarrow [0,255] \), where
The erosion of an image f by a SE is given by \(f\ominus b:\,\Omega \rightarrow [0,255] \) and can be computed by
The effects of these two basic operations can be seen in Fig. 6. Many other morphological operations of practical interest can be composed by dilation and erosion. For example, let us mention here opening \(f \circ b = (f \ominus b) \oplus b\) and closing \(f \bullet b = (f \oplus b) \ominus b\). At this point, we would also like to briefly refer to the methods of representation of colour morphology. There are many useful formats to represent a digital image [23]. The most intuitive and simple approach to colour morphology is to deal with the image component-wise, e.g. in the channels of red, green and blue (RGB); see, for example, [18] for a recent example of channel-wise scheme implementation.
1.2 A.2 Max-Plus Algebra
For this section, we refer to Baccelli et al. and refer to the relevant book [4] for further details in this regard. The max-plus algebra \({\mathbb {R}}_{\max }\) denotes the set \({\mathbb {R}} \cup \{-\infty \}\) with \(\max \) and + as binary relations for \(\,\tilde{\oplus }\,\) and \(\,\tilde{\otimes }\,\). This is sometimes also called an ordered group. In this context, one can specify the natural order by means of \(\,\tilde{\oplus }\,\):
In particular, \({\mathbb {R}}_{\max }\) fulfils all requirements for an idempotent commutative semifield \(\mathcal {K}\), i.e.:
-
The operation \(\,\tilde{\oplus }\,\) is associative, commutative and has a zero element \(\varepsilon = - \infty \);
-
The operation \(\,\tilde{\otimes }\,\) defines a group on \(\mathcal {K} \setminus \{\varepsilon \} = {\mathbb {R}}\), it is distributive with respect to \(\,\tilde{\oplus }\,\) and its identity element \(e = 0\) satisfies \(\varepsilon \,\tilde{\otimes }\,e = e \,\tilde{\otimes }\,\varepsilon = \varepsilon \);
-
The first operation is idempotent, that is, if \(a \,\tilde{\oplus }\,a = a\) for all \(a \in \mathcal {K}\);
-
The group is commutative.
At this point, we would also like to point out the connection with mathematical morphology. By considering mappings from \({\mathbb {R}}^2\) to \({\mathbb {R}}_{\max }\), one can define the necessary operations as follows:
-
\((f \,\tilde{\oplus }\,g)(x) = f(x) \,\tilde{\oplus }\,g(x) = \max (f(x),g(x)), \quad x \in {\mathbb {R}}^2\);
-
\((f \,\tilde{\otimes }\,g)(x) = \sup _{y \in {\mathbb {R}}^2}(f(x-y) + g(y)), \quad x \in {\mathbb {R}}^2\);
-
\((c \,\tilde{\otimes }\,f)(x) = c \,\tilde{\otimes }\,f(x) = c + f(x), \quad c \in {\mathbb {R}}, \quad x \in {\mathbb {R}}^2\).
It should be noted here, however, that for arbitrary mappings \(f,g: {\mathbb {R}}^2 \rightarrow {\mathbb {R}}_{\max }\), the new “max-plus algebra” \({\mathbb {R}}^{{\mathbb {R}}}_{\max }\) thus declared is not closed under supremum convolution. However, by restricting ourselves to mappings that are bounded from above (for example, greyscale images in mathematical morphology), it again becomes a max-plus algebra. This gives us an analytical approach to the formation of dilation or erosion in mathematical morphology.
1.3 A.3 Slope Transform
In this section, we would like to give a brief introduction to the theory of slope transform. The concept of slope transform goes back to the idea that with the tangential dilation (3) the slopes are maintained locally and only the point that carries the slope is translated. This translates a function with a constant slope as a whole, which leads us to the theory of morphological eigenfunctions, see [14] for more details. The slope transform resulting from these considerations is denoted by
and the inverse transform
In order to give an overview of the most important properties of the slope and Fourier transformation in this respect, we have summarised them in Table 1. The slope transform is also a generalisation of the Legendre transformation [14, 24] known from mathematical physics [25]:
This can be generalised to the conjugacy operation (also called “Young–Fenchel conjugate” in [14] or “Legendre–Fenchel transform” in [15]) in convex analysis [26]:
which is also closely related to the slope transform. This yields real-valued functions in contrast to the slope transform, which only yields set-valued functions. It is worth mentioning in connection with mathematical morphology that structuring functions in the form of paraboloids retain their shape under the slope transform. The resulting scale spaces for dilation and erosion were studied by Jackway and Deriche [27].
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
Kahra, M., Breuß, M. Properties of Morphological Dilation in Max-Plus and Plus-Prod Algebra in Connection with the Fourier Transformation. J Math Imaging Vis 65, 577–591 (2023). https://doi.org/10.1007/s10851-022-01138-3
Received:
Accepted:
Published:
Issue Date:
DOI: https://doi.org/10.1007/s10851-022-01138-3