A Generalisation of Flat Morphology, II: Main Properties, Duality and Hybrid Operators

In a previous paper, we gave a new general theory of the construction of flat operators on grey-level or multivalued images from operators on binary images. While the traditional approach was based on threshold superposition, we rely instead on threshold summation, and this allows a correct formulation for non-increasing flat operators and also for operators with non-binary outputs. We obtained then some basic properties of flat operators, valid for both increasing and non-increasing operators. Here we pursue this work by investigating further properties of flat operators, which differ in the increasing and non-increasing cases, in particular the composition, join and meet of operators, and the commutation with contrast mappings. We study duality under inversion and characterise discrete linear convolution operators as flat operators. This allows to integrate various hybrid morphological operators into our framework.


Introduction
This paper is a sequel of the first part of our study of flat morphology [1].
Many morphological operators on grey-level or multivalued images are what one calls flat operators: for instance the median filter, or the dilation, erosion, opening and closing by a flat structuring element. They are obtained from an operator on binary images (or sets) through the method of flat extension [2]. It works by thresholding the image, applying the binary operator on the thresholds, then superposing the modified thresholds. Let us briefly describe it.
We consider a space of points E, which can be the Euclidean (E = R n ) or digital (E = Z n ) space, or a subset of such a space. Write P(E) for the set of all subsets of E (i.e., binary images). For X ∈ P(E), write X c for E\X , its complement in E. Image intensities are numerical values; they range in a closed subset T of R = R ∪ {−∞, +∞}; for example in the digital case, one can take T to be an interval Since T is closed, V is a complete lattice [3]: every subset of V has a supremum and an infimum for the order. Write ⊥ and for the least and greatest elements of V , and for the supremum operation in V ; when V = T , is the numerical supremum, and when V = T m , it is the componentwise numerical supremum. We consider images E → V , for instance grey-level images E → T or multivalued images E → T m ; write V E for the set of images E → V .
For an image F : E → V and v ∈ V , the threshold set [4] is The set X v (F) is decreasing in v: w > v ⇒ X w (F) ⊆ X v (F).
For B ⊆ E and v ∈ V , the cylinder of base B and level v is the function C B,v given by setting for p ∈ E: C B,v ( p) = v if p ∈ B, and C B,v ( p) = ⊥ if p / ∈ B. Then every function F : E → V is the upper envelope of the sets {v} × X v (F), in other words, F = v∈V C X v (F),v . In other words, F can be recovered by superposing its thresholdings at all values v ∈ V .
Consider now an increasing operator ψ : P(E) → P(E) on binary images: X ⊆ Y ⇒ ψ(X ) ⊆ ψ(Y ). Then for any F : E → V , we take the upper envelope ψ V (F) of the sets {v} × ψ (X v (F)), in other words: For every point p ∈ E we have: Then is the flat operator corresponding to ψ, or the flat extension of ψ [2,5]. An advantage of this method is that it works for any complete lattice V of image values, it is not restricted to the cases V = T or V = T m (grey-level or multivalued images) that we consider here. Indeed, [2] considered an arbitrary complete lattice V of values, and gave examples with images having non-numerical values, for instance in the lattice of labels (see Figs. 2, 6 and 7 in that paper).
However, it has a fundamental limitation: it is restricted to increasing operators, in other words, operators that preserve the inclusion order. Thus, it cannot be applied to non-increasing operators such as the morphological gradient and Laplacian, the top-hat, or the hit-or-miss transform. We illustrated this failure in Subsection 1.1 of [1] with the simple example of the set difference between a dilation and an erosion on binary images, see Figs. 3 and 4 there: the method of [2] does not give what we would expect, namely the arithmetical difference between the corresponding flat dilation and erosion.
In [1] we proposed to replace the last step in the method, namely the superposition of the threshold sets {v}×ψ (X v (F)), cf. (3), by a summation of the characteristic functions of these thresholds ψ (X v (F)).
For a set X ∈ P(E), write χ X for the characteristic function of X : for p ∈ E, χ X ( p) = 1 if p ∈ X and χ X ( p) = 0 if p / ∈ X . Then for an operator ψ : P(E) → P(E), let χψ : P(E) → {0, 1} E be the composition of ψ : P(E) → P(E) followed by χ : P(E) → {0, 1} E ; thus, for any X ∈ P(E) we write χψ(X ) for the characteristic function of ψ(X ). Then, when V ⊆ R m , the flat extension of an increasing binary operator ψ satisfies where ⊥ is the least element of V and S is a summation operator that we introduced in [6] and studied further in [1]; here we sum the binary values χψ(X v (F))( p) for v ranging in V . This formula is valid when the operator ψ is increasing. We proposed to extend it to any operator ψ on binary images; in some cases, for instance in the morphological gradient, the base value ⊥ can be omitted in it. We obtained then non-increasing flat operators that conform to intuition, in particular the morphological gradient and Laplacian, the top-hat and the hit-or-miss transform get flat extensions that agree with the forms empirically given in the literature.
Because of the summation S, this new approach requires some restrictions that were not necessary in the previous theory of [2] for increasing operators. First, S is defined only for functions with bounded numerical or vector values (we recall in Sect. 2.3 the definition and properties of S, and the form that it takes for discrete or continuous values and vectors). Thus, the complete lattice V takes here the form V = V 1 × · · · × V m , where each V i = [⊥ i , i ], a bounded closed interval of R or of u i Z for some real u i > 0 (usually u i = 1); we also allow a complete sublattice of V 1 ×· · ·×V m . Second, the summation S requires the summed function to be of bounded variation, see Sect. 2.2; in practice, this condition is satisfied in many situations (see Subsection 5.2 of [1] for more details): • when V has finite height, in particular if V is finite; • when the operator ψ is local, that is, for any p ∈ E, there is a finite W ( p) ∈ P(E) such that for any Z ∈ P(E), p ∈ ψ(Z ) ⇔ p ∈ ψ Z ∩ W ( p) , for instance if ψ is a morphological operator with a finite structuring element; • when ψ is obtained as a linear combination of increasing binary operators, for instance the morphological gradient and Laplacian, the top-hat and the hit-or-miss transform.
Subsection 5.3 of [1] studied some elementary properties of this generalised form of flat extension, for instance the componentwise decomposition of a flat operator on vector images into grey-level flat operators for the vector components, and conditions for the preservation of an interval of values. Then its Subsection 5.4 showed that connected binary operators extend to connected flat operators, and we linked our method to the max-tree approach to anti-extensive connected operators.
In this paper, we will continue the analysis of the properties of our generalised flat extension. We first give a mathematical reminder in Sect. 2. In Sect. 3, after recalling our definition of flat extension, we consider some further properties: the flat extension of a supremum and infimum of binary operators (Sect. 3.1), the flat extension of a composition of binary operators (Sect. 3.2), and finally the commutation of flat operators with contrast mappings (Sect. 3

.3).
Duality under inversion of values is a complex problem, to which we devote Sect. 4. We first consider the dual form of summation (Sect. 4.1), then the relation between duality and flat extension (Sect. 4.2).
Section 5 introduces the study of flat linear operators. We will show that a linear convolution by a finite mask is a flat operator.
Finally, the conclusion summarises our work and suggests possible generalisations.

Posets and Lattices
Concerning posets and lattices, we follow the theory given in [3,7,8]; the basic terminology was given in Subsection 1.3 of [1], we refer the reader to it. The following concepts are thus assumed to be known: a poset, a chain and its length, the height of a poset, a closed interval, a closure operator, a closure range, a bounded poset, a lattice, a complete lattice, a conditionally complete lattice, an inf-closed (resp., supclosed) subset of a complete lattice. By empty/non-empty supremum or infimum, we mean supremum or infimum of an empty/non-empty subset of the lattice. We write h(P) for the height of a poset P.
Let L be a complete lattice. We say that L is infinitely supremum distributive if it satisfies the identity a ∧ i∈I b i = i∈I (a ∧ b i ) for any a ∈ L and any subset {b i | i ∈ I } ⊆ L. In Subsection 2.1 of [2], we also considered complete distributivity, which is usually defined as extended supremum distributivity (equations (10,12) there) or as extended infimum distributivity (equations (11,13) there). We will use here an equivalent form given there. Define the relation on L as follows (see equation (14) in [2]): for w, x ∈ L, Note that we do not exclude the case where Y = ∅; it shows that one can never have w ⊥. Moreover [2]: w x ⇒ w ≤ x, v ≤ w x ≤ y ⇒ v y, and ⊥ x ⇔ ⊥ < x. By Lemma 2 of [2], L is completely distributive iff: A complete chain and a direct product of complete chains (with componentwise order) are completely distributive complete lattices. A complete sublattice of a completely distributive complete lattice is completely distributive. Given a non-empty subset Q of R = R ∪ {−∞, +∞}, we write sup Q and inf Q for the numerical supremum and infimum of Q; similarly, for a subset Q of R m (m > 1)), we write sup Q and inf Q for the componentwise numerical supremum and infimum of Q, namely: Given  (3,3) and (0, 0), while sup{(1, 2), (2, 1)} = (2, 2) / ∈ X and inf{(1, 2), (2, 1)} = (1, 1) / ∈ X . In such a lattice, we will write and for the supremum and infimum operations. This distinction is important, because the traditional approach of [2] applies the lattice-theoretical supremum to image values, while our new approach [1] uses the numerical or componentwise sup. We showed indeed in Example 21 of [1] that with such a lattice of values, a dilation will give different image values with the traditional approach and with the new one. In fact, our new approach implicitly assumes that the lattice of values is an interval in R m or Z m ; for instance, in the above example, X is embedded in the interval X = {0, 1, 2, 3} 2 , which constitutes then the effective lattice of image values.

Bounded Variation
We summarise here Sect. Let P be a poset not reduced to a singleton. A strictly increasing sequence in P is a (n + 1)-tuple (s 0 , . . . , s n ), where n ∈ N, s 0 , . . . , s n ∈ P and s 0 < · · · < s n . Let f : P → R; for any strictly increasing sequence (s 0 , . . . , s n ) in P, we define the positive, negative and total variation of f on it: These three numbers are non-negative. Now, for a, b ∈ P with a ≤ b, let S(a, b) be the set of strictly increasing sequences in P that start in a and end in b: One obtains then the positive, negative and total variation of f on the interval [a, b]: These three variations are non-negative, but they can be infinite, they are thus in the interval [0, +∞]. Now we have and Thus: Note that the three variations increase when the interval and similarly for N V and T V . In the limit case where a = b, S(a, b) consists of the unique sequence (a), and then PV [a,a] a] ( f ) = 0; the above three equalities are trivially valid in this case.
We will say that f is of bounded variation on P, or briefly, When P is bounded by ⊥, , we will write PV ( f ), Assume now that P has a least element ⊥. We define the positive and negative variation functions pv [ f ], nv[ f ] : P → [0, ∞] as follows: Next, we define f P and f N , the positive and negative increments of f , by Moreover, a bounded, non-negative and increasing function f satisfies f = f P and is BV.
Consider now the dual poset with the inverse order relation ≥ and with the bounds ⊥ and exchanged; then positive and negative variation will be exchanged, that is, PV [a,b] ( f ) corresponds to N V [b,a] ( f ) in the dual poset. If P has a greatest element , we obtain the dual positive and negative variation functions pv * We have then the dual positive and negative increments of f ,  Fig. 1. Moreover, a bounded, non-negative and decreasing function f satisfies f = f * P and is BV. We deduce from the above discussion of variation functions and dual variation functions: Note that when P is bounded by ⊥, , every increasing or decreasing function f is bounded: By taking for a BV function f the thresholdings of f P and f N at positive integer levels, we obtain the following, see Proposition 17 of [1]: Proposition 2 Let P be a poset with least element ⊥, and let f : P → Z be of bounded variation. Let m = max x∈P f P (x) and n = max x∈P f N (x). Then there are m + n increasing functions g 1 , . . . , g m , h 1 , . . . , h n : P → {0, 1} such that g 1 ≥ · · · ≥ g m , h 1 ≥ · · · ≥ h n and f = m i=1 g i − n j=1 h j .

Function Summation
We consider a poset P ⊂ R m (m ≥ 1), and we suppose that P is bounded by ⊥, ∈ R m : ∀ x ∈ P, ⊥ ≤ x ≤ . We will define a summation on functions P → R.
Consider first a function f : P → R that is bounded, nonnegative and decreasing. For a strictly increasing sequence (s 0 , . . . , s n ) in P, define the summation Given a, b ∈ P with a < b, recall from (8) the set S(a, b) of strictly increasing sequences in P starting in a and ending in b. For f : P → R bounded, non-negative and decreasing, we define the summation of f over the interval [a, b]: Note that, . Given a scalar λ ≥ 0, λ f is bounded, non-negative and decreasing, and then S [a,b] Now, given f , g : P → R bounded, non-negative and decreasing, f + g is also bounded, non-negative and decreasing, but we generally obtain only the inequality S [a,b] We say that S is additive on P if for all bounded, non-negative and decreasing functions f , g : P → R, and all a, b ∈ P with a < b, we have Recall Proposition 1: a function f : P → R is of bounded variation iff there are two bounded, non-negative and decreasing functions g, h : When the summation is additive, we can then define the summation of f as S [a,b] The additivity of S depends on the poset P. We give three types of posets on which S is additive, and then describe the summation of a function of bounded variation.
First, if P is a bounded chain, then S is additive on P. In the case of a finite chain P, that is, this is a Riemann integral (any real function of bounded variation is continuous almost everywhere, hence Riemann integrable).
Second, let P = P 1 × · · · × P m , the Cartesian product of bounded posets P 1 , . . . , P m , with componentwise ordering; now, each P i is bounded by ⊥ i , i , so P will be bounded by ⊥, , where ⊥ = (⊥ 1 , . . . , ⊥ m ) and = ( 1 , . . . , m ). If S is additive on each P i (i = 1, . . . , m), then S is additive on P. In particular, since S is additive on a bounded chain, if follows that it is additive on a Cartesian product of bounded chains.
Let us now describe the form taken by the summation in P in terms of summations in all P i . For each i = 1, . . . , m, there is some k i ≥ 1 such that P i ⊂ R k i ; let Q i = R k i and Q = Q 1 × · · · × Q m , thus P ⊂ Q. Now, summations of the form S (s 0 ,...,s n ) ( f ) and S [a,b] ( f ) will belong to Q for f : P → R, but to Q i for f : P i → R. For each i = 1, . . . , m we define the i-th projection Given a = (a 1 , . . . , a m ) ∈ P, we define the i-th embedding through a η a i : and for f : P → R, we write f η a i for the composition of η a i followed by f : Then, for a = (a 1 , . . . , a m ), b = (b 1 , . . . , b m ) ∈ P with a < b, and f : P → R of bounded variation, we have In geometrical terms, each projection π i (S [a,b] ( f )) is obtained by summing f along the line segment parallel to the i-th axis of P, joining a = (a 1 , . . . , a m ) to (a 1 , . . . , a i−1 , b i , a i+1 , . . . , a m ). In particular S [a,b] ( f ) is completely determined by the restriction of f to the m lines through a parallel to the axes.
If P i is a finite chain, P i = {t 0 , . . . , t n } with t 0 < · · · < t n , given dt. Let us illustrate this in the cases of Z 3 and R 3 , with componentwise ordering. Let a = (a 1 , a 2 , In Z 3 we get for a BV function f : In R 3 we get: We now give the third type of poset on which the summation is additive. Let P be a poset bounded by ⊥, . Let ϕ be a closure map on P such that ϕ(⊥) = ⊥, and let M = {ϕ(x) | x ∈ P} be the corresponding closure range; we have then ⊥, ∈ M. For any f : . If S is additive on P, then it is additive on M: for f : M → R of bounded variation and for any a, b ∈ M such that a < b, we have PV [a,b] For instance, if P is a complete lattice and M is a complete sublattice of P, then P is a closure range, the corresponding closure map ϕ is defined by ϕ(x) = {y ∈ M | x ≤ y}. Thus, if S is additive on P, it will be additive on M. From the above two cases, it follows that S is additive on any complete sublattice of a direct product of complete chains.
We end this section with a few properties that will be used in the sequel. The following result (Proposition 14 of [1]) was fundamental in the analysis of the flat extension of increasing operators on binary images in [1]; we will apply it here to functions of bounded variation: Proposition 4 Let P be bounded by ⊥, . For any decreasing function f : P → {0, 1}, where we set sup ∅ = ⊥ on the right side of the equation.
The following "isomorphism lemma" will be used in Sect. 3.3:

Lemma 5
Let P, Q be bounded posets and let θ : P → Q be a bijection such that for a real a > 0, for all x, y ∈ P we have θ(y) − θ(x) = a(y − x). Then S is additive on P iff it is additive on Q. For any f : Proof For x, y ∈ P, θ(x) < θ(y) ⇔ x < y, so θ is a poset isomorphism between P and Q. Thus, for f : Q → R, f is decreasing iff f θ is decreasing; now, f and f θ have the same sign and the same bounds. Let f be bounded, nonnegative and decreasing. For a strictly increasing sequence (s 0 , . . . , s n ) in P, we have For a, b ∈ P with a ≤ b S(θ (a), θ (b)) is the set of all (θ (s 0 ), . . . , θ(s n )) for (s 0 , . . . , s n ) ∈ S(a, b), hence For g, h : Q → R bounded, non-negative and decreasing, non-negative and decreasing, iff f θ = gθ − hθ with gθ, hθ : P → R bounded, non-negative and decreasing, iff f θ is BV. We have then The following will be used in Sect. 5: Lemma 6 Let P be a bounded subset, and let S is additive on P. Let f 1 , f 2 : P → R such that f 1 Proof By Proposition 1, there are two bounded, non-negative and decreasing functions g 1 , It follows that f 2 = g 2 − h 2 , and that g 2 , h 2 are bounded, non-negative and decreasing functions. Hence f 2 is BV. By (13), for a strictly increasing sequence (s 0 , . . . , s n ) in P, the summation involves only the values of the function at

Generalised Flat Morphological Operators
In this section we recall our new definition of flat extension; then we consider its properties with respect to the join and meet of operators (Sect. 3.1) and then the composition of operators (Sect. 3.2); finally, we consider the commutation of flat operators with contrast mappings (Sect. 3.3).
Let E be the space of points. We take a set of image values U = C 1 × · · · × C m , where m ≥ 1 and for i = 1, . . . , m, either C i = R or C i = u i Z for some real u i > 0 (usually u i = 1). All images, those given as input to flat operators, as well as those obtained as output of these operators, will have their values in U , they will be maps E → U .
For m = 1, U is ordered numerically, while for m > 1 it has the componentwise or marginal ordering (1). The set U has two important properties. First, it is a conditionally complete lattice, in particular, every closed interval [a, b] ⊂ U will be a complete lattice where the non-empty supremum and infimum operations are the componentwise numerical sup and inf operations. Second, it is a module for the operations of addition and subtraction, with neutral 0 = (0, . . . , 0), and the scalar multiplication with scalars in Z. It follows from these two properties that for any interval [a, b] ⊂ U (a ≤ b) and any bounded, non-negative and decreasing function f : [a, b] → Z, for any strictly increasing sequence (s 0 , . . . , s n ) in [a, b], the summation S (s 0 ,...,s n ) ( f ) will belong to U ; thus, the summation S [a,b] ( f ) will also belong to U .
We choose two bounds ⊥, ∈ U , with ⊥ < , and consider the interval All input images must have bounded values, so they will be E → V . Thus, we will apply flat operators to input images E → V , and the resulting output images will be E → U . Since V is the direct product of the complete chains [⊥ i , i ], or a complete sublattice of that product, the summation S will be additive on V ; this allows us to define the flat extension as the summation of a function defined on V . Moreover, V is a completely distributive complete lattice, a property that guarantees some good properties of flat extension, as we saw in [2] and will see again in the rest of the paper.
Recall from Sects. 2.2 and 2.3 that for a function f defined In Sects. 2.2 and 2.3, we analysed the variation and summation of a function in a single variable. Here we will consider the variation and summation of an expression in several variables, and we need to specify over which variable we take the variation or summation. Given an expression W in several variables, a variable x appearing in W , and a poset P, we will write "W | x ∈ P" to specify that the variation or summation of W is over the variable x ranging over P; Recall that for a set X ∈ P(E), we write χ X for the characteristic function of X . Then for ψ : P(E) → P(E), let χψ : P(E) → {0, 1} E be the composition of ψ followed by χ , in other words, we write χψ(X ) for the characteristic function of ψ(X ); thus, χψ(X )( p) = 1 for p ∈ ψ(X ) and χψ(X )( p) = 0 for p / ∈ ψ(X ). A binary image transformation is a map P(E) → P(E), for instance, the dilation, erosion, opening and closing by a structuring element. A binary image measurement is a map where id is the identity operator on P(E), while δ and ε are the dilation and erosion by a point neighbourhood. Obviously, to every binary image transformation ψ corresponds the binary image measurement χψ, with K = {0, 1}.
The distinction between the two may seem to be purely formal, but we see a concrete meaning in it. The flat extension (to grey-level or vector images) of a binary image transformation will be a flat operator preserving the general contrast, such as a dilation, erosion, opening, closing or median filter; thus, if the input image values are translated, the same translation will be applied to output image values. On the other hand, the flat extension of a binary image measurement will be a flat operator whose output does not necessarily change when the input image has its values translated, for instance the gradient or Laplacian. This distinction manifests itself in the two formulas below, with the translation by ⊥ appearing only for a binary image transformation. We will see another difference between the two in the interpretation of duality, see Sect. 4.
Let us introduce some further terminology. A stack on is also a stack. We say that a binary image measurement μ: By extension, a binary image transformation ψ has stackpointwise bounded variation or pointwise bounded variation, or is local, when the binary image measurement χψ has that property. For instance, an increasing binary image transformation ψ has pointwise bounded variation: as Z increases, χψ(Z )( p) will change once from 0 to 1, These three properties are related: being local implies having pointwise bounded variation, which implies having stack-pointwise bounded variation. Indeed, we first recall Proposition 23 of [1]: Thus, if μ is local, then μ has pointwise bounded variation.

Thus, if V has finite height or if μ has pointwise bounded variation, then μ has stack-pointwise bounded variation.
Recall that the summation S is additive on V . Given a binary image measurement μ : P(E) → K E , we define the no-shift flat extension μ −V of μ by setting for any image F : E → V and point p ∈ E: provided that the summation is well-defined, that is, the for instance this is guaranteed when μ has stack-pointwise bounded variation. By the linearity of the summation, see Theorem 3, the no-shift flat extension is linear: for two binary image measurements μ 1 , μ 2 and two scalars λ 1 , λ 2 ∈ Z, we have we define the shifted flat extension ψ +V of ψ by setting for any image F : E → V and point p ∈ E: again provided that the summation is well-defined, that is, the function v → χψ(X v (F))( p) is of bounded variation, for instance if ψ has stack-pointwise bounded variation. We always have ψ +V (F)( p) ∈ [⊥, ], see equation (43) of [1]. Note however that in the non-standard case, that is, when V = [⊥, ], if ψ is not increasing, then we do not necessarily have ψ +V (F)( p) ∈ V , see Example 22 of [1]. In Proposition 20 of [1], we showed that for an increasing binary image transformation ψ, the shifted flat extension coincides with the usual flat extension according to [2]: can be written χψ(X v (F))( p) = 1, and in V the supremum becomes the componentwise numerical sup; applying (20) to the resulting formula, we get (23). In particular, we have then ψ +V (F)( p) ∈ V .

The Lattice-Ordered Group of Flat Operators
The set of all binary image transformations is ordered as follows: ψ 1 ≤ ψ 2 iff for all X ∈ P(E), ψ 1 (X ) ⊆ ψ 2 (X ). It constitutes then a complete lattice, with supremum i∈I ψ i : X → i∈I ψ i (X ) and infimum i∈I ψ i : X → i∈I ψ i (X ). Note that in [2], we wrote ⊆, and for the order, the supremum and infimum on increasing binary image transformations. Binary image measurements are also ordered, with μ 1 ≤ μ 2 iff for all X ∈ P(E), We saw in [2] (Proposition 15 and Corollary 29) that the map ψ → ψ V is an isomorphism between the poset of increasing binary operators and the one of increasing flat operators. Our generalisation of flat extension has also that property, by Corollary 33 of [1]: In particular, the two maps μ → μ −V and ψ → ψ +V are injective.
We saw then in [2] that for increasing binary image transformations, this isomorphism is generally compatible with the supremum and infimum operations. More precisely, for any complete lattice V , • the flat extension of a supremum of increasing binary image transformations is the supremum of their flat extensions: • when V is infinite supremum distributive, the flat extension of the infimum of two increasing binary image transformations is the infimum of their flat extensions: [2]); • when V is completely distributive, the flat extension of an infimum of increasing binary image transformations is the infimum of their flat extensions: In our framework, V is a complete sublattice of [⊥, ], it is thus a completely distributive complete lattice, and the above properties hold for increasing binary image transformations, with the shifted flat extension ψ +V , which coincides with the classical flat extension ψ V . Since the shifted flat extension (23) of ψ i differs from the no-shift one (22) applied to χψ i only by the translation by ⊥, which is compatible with the supremum and infimum, we obtain similar identities for the no-shift flat extension of their characteristic functions: where sup and inf are the componentwise numerical supremum and infimum. However, these identities do not extend to the general case, as we will see in Example 10 for non-increasing binary image transformations, and Example 11 for binary image measurements with non-binary values (K = {0, 1}). We will thus analyse in more detail the maps μ → μ −V and ψ → ψ +V .
We consider the family M(E) of all binary image measurements on P(E), in other words, of all maps μ : Then M(E) is closed under the operations of addition and subtraction of functions, as we have In other words, M(E) is a commutative group for the operation of addition. It is also ordered by ≤. Write ∨ and ∧ for the binary operations on functions applying pointwise numerical maximum and minimum: is a lattice. Now, the addition is compatible for the order, μ 1 ≤ μ 2 ⇒ μ 1 + μ ≤ μ 2 + μ. Thus, M(E) is a lattice-ordered group, or l-group, see [3], Chapter XIII.
The lattice M(E) is not complete. For instance, for all n ∈ N and X ∈ P(E), let μ n (X ) = 0 if |X | < n and μ n (X ) = n if |X | ≥ n, so K [μ n ] = {0, n}; then μ = sup n∈N μ n satisfies μ(X ) = |X | for X finite, and μ(X ) = ∞ for X infinite, so K [μ] = N∪{∞} is infinite and not contained in Z. However, this lattice is conditionally complete. Given a family μ i ∈ M(E) (i ∈ I ) and μ ∈ M(E) such that μ i ≤ μ for all i ∈ I , we have sup i∈I μ i ≤ μ, then sup i∈I μ i takes values bounded above by max K [μ], and bounded below by min K [μ j ] for any j ∈ I ; thus, sup i∈I μ i ∈ M(E). We have then the dual property for the infimum: Let M V (E) be the set of no-shift flat extensions of binary image measurements: By Lemma 9, the no-shift flat extension μ → μ −V is an isomorphism between the two posets M(E) and M V (E): inherits the lattice structure of M(E); write and for the join and meet operations on M V (E); thus, Now, the no-shift flat extension is linear, it is in particular an isomorphism between the additive groups M(E) and As the sum of two integers equals the sum of their minimum and maximum, given two binary image measurements μ 1 , μ 2 , we have The additivity of the no-shift flat extension gives then Let T (E) be the set of all binary image transformations.
where sup and inf apply the pointwise numerical infimum and supremum. Thus, the characteristic function χ gives an isomorphism between T (E) and a sublattice of M(E), which is complete. By Lemma 9, for ψ 1 , ψ 2 ∈ T (E), we have From (23,25) we derive for any ψ 1 , ψ 2 ∈ T (E): (26) Note that the equalities (25, 26) are particular cases of the identity (a∨b)+(a∧b) = a+b satisfied in any commutative l-group, see [3], Chapter XIII, Sect. 3.
We will now see that the form taken by the join and meet in M V (E) does not necessarily coincide with the pointwise numerical maximum and minimum for functions in U E .
Next, for two increasing binary image measurements μ 1 , μ 2 that do not have binary values, that is, which are not of the form μ 1 = χψ 1 and μ 2 = χψ 2 for two increasing binary image transformations ψ 1 , ψ 2 , we can have (μ 1 ∨ We take the function F : V E → V E shown in (d), with X 1 (F) and X 2 (F) shown in (e) and (f) respectively. Let ε A , ε B , ε C be the erosions by the three structuring elements A, B, C shown in (a,b,c). Let P be the singleton made of the pixel at the centre of X 1 (F) and X 2 (F), and let G = χ P, cf.

Composition of Operators
In Proposition 32 of [2], we showed that for any complete lattice V , the flat extension of the composition of two increasing binary image transformations is the composition of their flat extensions, (ψ 1 ψ 2 ) V = ψ V 1 ψ V 2 , provided that one of the following conditions hold: • the operator on the left, ψ 1 , is a dilation; • the operator on the right, ψ 2 , is an erosion; • V is completely distributive.
As we saw above, in our framework V is necessarily a completely distributive complete lattice. However, our next counterexample shows that the above property does not extend to the case where the right operator ψ 2 is a nonincreasing binary image transformation, even if the left operator ψ 1 is a dilation. Since ⊥ = 0, the shifted flat extension coincides with the noshift one. We take the structuring element A = {−1, 0, +1}, and let δ and ε be the dilation and erosion by A. We take a function F forming a ramp decreasing between x = 1 and x = 7, and constant for x ≤ 1 and x ≥ 7. We get (δ\ε) +V (F) and [δ(δ\ε)] +V (F) by summing the stacks (δ\ε)(X v (F)) and δ(δ\ε)(X v (F)) for v ∈ V . Finally, δ +V (δ\ε) +V (F) results from the standard flat dilation applied to (δ\ε) +V (F), and we see that δ +V (δ\ε) +V (F) = [δ(δ\ε)] +V (F).
On the other hand, the above result from [2] remains valid when ψ 2 is increasing and ψ 1 has pointwise bounded variation. We will show this by using an argument similar to the one used in the proof of Lemma 31 of [2]. Recall that V is completely distributive, in the sense given by (5,6).

Lemma 13 Let ψ be an increasing binary image transformation. For any F
Proof Here ψ V is the usual flat operator given by (4). As and v → f (ψ(X v (F))) are decreasing; hence, the two summations in (27) are well-defined.
Take any Let w x. For any p ∈ X x (ψ V (F)), (4) gives , and (5) gives w ≤ u for some u ∈ V such that p ∈ ψ(X u (F)); then X u (F) ⊆ X w (F), and as ψ is increasing, ψ(X u (F)) ⊆ ψ(X w (F)), so p ∈ ψ(X w (F)). Hence X x (ψ V (F)) ⊆ ψ(X w (F)). As f is increasing, f (X x (ψ V (F))) ≤ f (ψ(X w (F))). Thus, given x ∈ V such that f (X x (ψ V (F))) = 1, every w x satisfies f (ψ(X w (F))) = 1, so (6) gives: Taking the supremum of all such x, we get Applying Proposition 4 to the two decreasing maps V → R : ) and x → f (ψ(X x (F))), we get: Combining this with the inequality (29), we get The two bound variables x on the left side and w on the right side can both be renamed v, so we obtain the converse of inequality (28), and we derive thus the equality (27). As ψ is increasing, ψ +V coincides with ψ V . Thus, for any F : E → V , the above lemma gives for each i = 1, . . . , m + n: By linearity of summation, we get then

Commutation with Contrast Mappings and with Thresholding
We will consider here two classical properties of flat increasing operators: commutation with contrast mappings or anamorphoses [9,10] and commutation with thresholding.
We will see that non-increasing flat operators commute only with linear contrast mappings. In order to ease of the discussion, we restrict ourselves to the standard case: V = [⊥, ].
Let us first deal with contrast mappings. For any map θ(F( p)). In the case of grey-level images, that is, when V is a complete chain included in R (say, V = R, Z, a closed interval [a, b] ⊂ R, or an interval in Z), one calls a contrast mapping or anamorphosis [9,10] a map θ E for θ : V → V that is both increasing and continuous. When V is a finite chain, the continuity requirement on θ can be dropped, and when V = Z, it applies only at ±∞. Then, the flat extension ψ V of an increasing binary image transformation ψ will commute with any contrast mapping θ E : for any A complete characterisation of such a commutation in the case of an arbitrary complete lattice V was made in [11], see Theorem 8 there. In particular, given an increasing binary image transformation ψ and an increasing map θ : V → V , the following three conditions taken together are sufficient for the commutation of 3. θ commutes with non-empty suprema and non-empty infima in V .
When V = R or V = [a, b] ⊂ R, condition 3 is equivalent to the continuity of the map θ . When V is a product of chains, condition 3 becomes very restrictive. Now, if we consider bounded functions E → R m , an increasing linear map θ satisfies condition 3, so θ E will commute with increasing flat operators. The same should then hold for non-increasing flat operators obtained as linear combinations of increasing ones.
In practice, linearity will be necessary, as we can see with our usual example of the set difference between an extensive dilation δ and an anti-extensive erosion ε. Assume ⊥ = 0, and define the binary image transformation ψ by ψ(X ) = δ(X )\ε(X ) for all X ∈ P(E). We have ψ +V = δ +V − ε +V . Consider an increasing map θ : V → V such that θ E commutes with the increasing flat operators δ +V and ε +V . Then A sufficient and probably necessary condition for this general equality is that θ is additive, that is θ(x + y) = θ(x) + θ(y). As θ is continuous, it will then be linear. Our next example confirms the necessity of the additivity condition on θ .
Example 15 See Fig. 6. Let E = Z and V = [0, ] ⊂ R for > 0. For x, y ∈ Z with x < y, let [x . . . y] = {z ∈ Z | x ≤ z ≤ y} be the discrete interval between x and y. Let δ and ε be the dilation and erosion by the structuring element {−1, 0, +1}, and let ψ be their set difference, ψ(X ) = δ(X )\ε(X ). Given a, b, c ∈ Z such that a in other words, the additivity of θ . Now, the commutation with contrast mappings raises a theoretical problem in our framework: we consider images with bounded values, and the contrast mapping will modify the bounds, for an image F : In Proposition 34 of [1], we showed that given ⊥ 1 ≤ ⊥ 0 < 0 ≤ 1 , V 0 = [⊥ 0 , 0 ], and V 1 = [⊥ 1 , 1 ], for any F : E → V 0 and for any binary image measurement μ, we have From (23), we deduce that for any binary image transformation ψ, When E = R n or Z n , a morphological operator based on structuring elements commutes with translations of E; it follows then that μ(E) and μ(∅) must be constant, and both ψ(E) and ψ(∅) must be equal to either E or ∅. We make this requirement in the general case, and so extending the interval from [⊥ 0 , 0 ] to [⊥ 1 , 1 ] leads only to a vertical translation of the result of the flat operator, which can be corrected. In some particular cases, we can make stricter requirements.
For the value of μ(E) and ψ(E), the situation is variable. Given an extensive dilation δ and an anti-extensive erosion ε, we have δ(E) = ε(E) = E, but (δ\ε)(E) = ∅. For the no-shift flat extension, we can require that μ(E) = 0, so that left term (⊥ 0 − ⊥ 1 )μ(E) in (30) is equal to 0. Now for the shifted flat extension, we can require instead that ψ(E) = E, so that left term (⊥ 0 − ⊥ 1 ) χψ(E) − 1 in (31) is equal to 0. Otherwise, since we consider linear contrast mappings of the form θ : v → av for a > 0, we can restrict ourselves to the case where ⊥ 0 = ⊥ 1 = 0, in other words, to positive image values; this also cancels the left term in (⊥ 0 − ⊥ 1 ).
Consider thus scaling by a positive scalar: θ : v → av, where a > 0. In the case of continuous image intensities, that is, U = R m , we have a ∈ R + ; on the other hand, for discrete image intensities, that is, U = u 1 Z × · · · × u m Z, we take a ∈ N.
In the continuous case U = R m , aV 0 = V a 0 , while in the discrete case, aV 0 is the complete sublattice of V a 0 made of all vectors whose coordinates are multiple of a (relatively to u 1 , . . . , u m ). Let We apply Lemma 5 with (22):
We will now give the conditions under which a flat operator commutes with vertical translation We apply Lemma 5 with (22): For a binary image transformation ψ, (23) gives then Take now an interval From (23), we deduce When μ(E) = 1 and μ(∅) = 0, we get This is for instance the case for usual increasing morphological operators (dilation, erosion, opening, closing, …).
Let us next consider commutation with thresholding. Here V = [⊥, ]. It has been shown that given an increasing binary image transformation ψ, under some conditions on either ψ or V , for any F : E → V and v ∈ V , we get X v (ψ +V (F)) = ψ(X v (F)).

Let us first remark that commutation with thresholding can be expressed under the form ξ v (ψ +V (F)) = ψ +V (ξ v (F)) for a map ξ v : V E → V E . For any A ∈ P(E), define β(A) : E → V by β(A) = ⊥+( − ⊥)χ A, in other words, for all p ∈ E, β(A)( p) = when p ∈ A and β(A)( p) = ⊥ when p / ∈ A (in [1] we wrote it B ⊥ [A]).
It is thus the binary image E → {⊥, } corresponding to A. For any binary image transformation ψ, we showed in Corollary 32 of [1] that for any A ∈ P(E): In [11] we expressed commutation with thresholding in the form ξ v ψ V = ψ V ξ v for an increasing ψ.
As ξ v is not linear, from the above discussion around Example 15, it appears that commutation with thresholding will fail for the difference between a dilation and an erosion. Proposition 16 Let ψ be a binary image transformation, let a, b ∈ V such that ⊥ < a < b and for any F : E → V , the equality X v (ψ +V (F)) = ψ(X v (F)) holds for v = a and for v = b. Then ψ is increasing.
Then X a (F) = Y and X b (F) = X . As the threshold set so ψ is increasing.
Let thus ψ be an increasing binary image transformation. So ψ +V is the classical flat extension ψ V . For v = ⊥, the equality X ⊥ (ψ V (F)) = ψ(X ⊥ (F)) holds iff ψ(E) = E. For v > ⊥, the condition varies according to the lattice V . When V is a finite chain, the equality X v (ψ V (F)) = ψ(X v (F)) always holds for all v > ⊥. When V = Z, it holds for any finite v. When V = Z and v = +∞, or when V is continuous (V = R or V = [a, b] ⊂ R) and we take any v > ⊥, the equality holds if ψ is upper semi-continuous [9]: given a decreasing sequence of subsets of E, X 0 ⊇ X 1 ⊇ . . . ⊇ X n ⊇ . . ., we have ψ n∈N X n = n∈N ψ(X n ).
Consider next an arbitrary complete lattice V . By Theorem 10 of [11], the increasing binary image transformation ψ satisfies X v (ψ V (F)) = ψ(X v (F)) for any F : E → V and for all v > ⊥, iff ψ is V -↓-continuous (see Definition 5 there): for every non-void lower set S in V and for every function G : E → V , we have

Duality
In image processing, duality exchanges the roles of foreground and background, of dark and bright regions. Thus, the dual of an operator ψ is the operator ψ * that is applied to the background or negative when ψ is applied to the foreground or positive. For ψ : P(E) → P(E), ψ * (X ) = ψ(X c ) c (recall that the superscript c denotes the complementation in E). For ψ : and ν E its extension to functions E → V , cf. Sect. 3.3. Note that (ψ * ) * = ψ, the duality relation is symmetric. For instance, dilation and erosion are dual, as well as opening and closing. Duality is compatible with the composition of operators and exchanges join and meet: In [2] we showed that for an increasing binary image operator ψ and a completely distributive lattice V , we have (ψ * ) V = (ψ V ) * . In this section, we will see how this result can be extended to a binary image operator that is not increasing, or to a binary image measurement.
Here with operators involving complementation, the relation of duality with foreground and background becomes subtler. For instance, let δ be an extensive dilation on P(E), let ε be the anti-extensive dual erosion, and let ψ be their set difference: ψ(X ) = δ(X )\ε(X ). When δ and ε are the dila-tion and erosion by a symmetric point neighbourhood, ψ(X ) is the boundary of X , the union of its outer boundary δ(X )\X and of its inner boundary X \ε(X ). Now, the boundary of X c is ψ(X c ) = ψ(X ), the union of δ(X c )\X c = X \ε(X ) and X c \ε(X c ) = δ(X )\X ; so, X and X c have the same boundary, the outer and inner boundaries of X c are those of X exchanged. On the other hand, the dual ψ * of ψ gives ψ * (X ) = ψ * (X c ) = ε(X ) ∪ ε(X c ), the complement of the boundary. We see thus that a notion like boundary should not be seen as an image transformation (like dilation, erosion, opening and closing), but rather as a feature extraction. For an image transformation ψ, we consider the dual ψ * : X → ψ(X c ) c , while for a feature extraction we simply apply ψ to X c . This distinction is somewhat analogous to the one between a binary image transformation (with shifted flat extension) and a binary image measurement (with no-shift flat extension).
In [2] we considered the dual flat extension ψ V * , defined as the flat extension for the dual lattice of V ; we will here consider the dual summation in Sect. 4.1. Then in Sect. 4.2 the results will be applied to the relation of flat extension with duality.

Dual Summation
Given a function f : P → R and a fixed real number M > 0, we will write B N D( f , M) if f is bounded by M, nonnegative, and decreasing, that is: for all x ∈ P, 0 ≤ f (x) ≤ M, and for all x, y ∈ P, x < y ⇒ f (x) ≥ f (y).
We assume that the poset P is bounded by ⊥, . Consider first a bounded, non-negative and decreasing function f :  S(a, b). We can instead approximate this integral from above,  Thus, S (t0,...,t6) We will relate the original summation S and the dual one S * by combining the function f with an inversion of both its domain P and its range included in R. Since P ⊆ R m for some m ≥ 1, we define the inversion ν : R m → R m : x → ⊥ + − x; it is an involution (dual isomorphism that is its own inverse), and it exchanges ⊥ and . Let P ν = {ν(x) | x ∈ P}; then the poset P ν has the same least and greatest elements ⊥ and as P, and ν is a dual isomorphism between P and P ν . For a, b ∈ P with a ≤ b, the map (s 0 , . . . , s n ) →  (ν(s n ), . . . , ν(s 0 )) is a bijection between S(a, b) in P and S(ν(b), ν(a)) in P ν . Note that when P is the whole interval [⊥, ] in R m , or its trace in Z m , then P ν = P.
Consider a function f : P → R such that B N D( f , M). As f is decreasing, the function f ν : (s 0 , . . . , s n ) be an increasing sequence in P, and let  (t 0 , . . . , t n ) = (ν(s n ), . . . , ν(s 0 )) be the inverted sequence in P ν ; let L = t n − t 0 = s n − s 0 . We have The above argument is illustrated in Fig. 7. Then for a, b ∈ P such that a ≤ b, we get (with L = b − a): We summarise: for f : Note that for g = M − f ν we get f = M − gν. Indeed, for x ∈ P, we have Conversely, for g : hence the dual form of (36) for g : P ν → R such that B N D(g, M): We show now that S is additive on P ν if and only if S * is additive on P. Suppose S additive on P ν , and let f 1 , f 2 : P → R such that B N D( f 1 , M 1 ) and B N D( f 2 , M 2 ). Then Applying (36) to f 1 , f 2 and f 1 + f 2 , together with the additivity of S on P ν , we get for a, b ∈ P ν such that a ≤ b: , that is, S * is additive on P. Conversely, if S * is additive on P, we show that S additive on P ν by the same argument with g 1 , g 2 : P ν → R in place of f 1 , f 2 : P → R, inverting the roles of S and S * , and using (37) instead of (36).
Let now f : P → R be of bounded variation, We have f = g − h for two functions g, h : P → R such that We can summarise our results: Theorem 17 Let P be a poset bounded by ⊥, . Let ν : x → ⊥ + − x be the inversion between P and P ν . The dual summation S * is additive on P iff S is additive on P ν . Under this additivity condition, for any f : P → R of bounded variation, given a decomposition f = g − h for g, h : P → R bounded, non-negative and decreasing, we define S * Let us now describe the form taken by the dual summation S * for some particular posets. Throughout, let f : P → R be of bounded variation.
We consider first the case where P is a bounded chain; then P ν is a bounded chain. From the discussion in Sect. 2.3, S is additive on P ν ; hence by Theorem 17, S * is additive on P, and we obtain the dual form of the formulas given there: • If P is a finite chain, that is, P = {t 0 , . . . , t n } with t 0 < · · · < t n , then for 0 ≤ u < v ≤ n we have: Consider now a Cartesian product P = P 1 × · · · × P m of posets, with componentwise order, see (1). We assume that each P i is bounded by ⊥ i , i , so P will be bounded by ⊥, , where ⊥ = (⊥ 1 , . . . , ⊥ m ) and = ( 1 , . . . , m ). Each P i has the inversion ν i : Define the inversion ν : P → P ν : x → ⊥ + − x; we have then ν(x 1 , . . . , x m ) = ν 1 (x 1 ), . . . , ν m (x m ) and P ν = P ν 1 1 × · · · × P ν m m . From the discussion in Sect. 2.3, if S is additive on each P ν i i (i = 1, . . . , m), then S is additive on P ν = P ν 1 1 × · · · × P ν m m . Hence, by Theorem 17: if S * is additive on each P i (i = 1, . . . , m), then S * is additive on P. We can now describe the form taken by the dual summation in P in terms of dual summations in all P i . As said in Sect. 2.3, for each i = 1, . . . , m we have some k i ≥ 1 such that P i ⊂ R k i ; let • and from (16) the i-th embedding through a for a =  (a 1 , . . . , a m ) ∈ P: → (a 1 , . . . , a i−1 , x, a i+1 , . . . , a m ) . = (a 1 , . . . , a m ) and b = (b 1 , . . . , b m ) ∈ P with a ≤ b. By Theorem 17 applied to P, ν(a)] ( f ν)). Applying (17) with f ν : P ν → R, ν(b) and ν(a) in place of f : P → R, a and b, we get

Now let a
Applying again Theorem 17 to P i , we get Combining all above equalities, we get the dual form of (17): Note that we have here η b i instead of η a i . Geometrically speaking, this means that each projection π i (S * [a,b] ( f )) is obtained by the dual summation of f along the line segment parallel to the i-th axis of P, joining (b 1 , . . . , b i−1 , a i , b i+1 ,  . . . , b m ) to b = (b 1 , . . . , b m ). In particular S * [a,b] ( f ) is completely determined by the restriction of f to the m lines through b parallel to the axes. Now if P is a product of bounded chains, that is, if each P i is a chain, then S * is additive on P i (see above), hence S * will be additive on P. In particular: • If P i is a finite chain, P i = {t 0 , . . . , t n } with t 0 < · · · < t n , then for a i = t u and b We illustrate this in the cases of Z 3 and R 3 , with componentwise ordering. Let a = (a 1 , a 2 , a 3 ) and b = (b 1 , b 2 , b 3 ), with a 1 < b 1 , a 2 < b 2 and a 3 < b 3 . In Z 3 we get the dual of (18): In R 3 we get the dual of (19): We give now the dual of Proposition 4, which will be used in Sect. 4.2: Proposition 18 Let P be bounded by ⊥, . For any decreasing function f : P → {0, 1}, where we set inf ∅ = on the right side of the equation.
Proof Here B N D( f , 1). With the inversion ν : x → ⊥ + − x between P and P ν , 1 − f ν is a function P ν → {0, The empty infimum on the right side of (41) corresponds to the case where f (y) = 1 for all y ∈ P; then for every (s 0 , . . . ,

Duality in Flat Operators
Let us now analyse duality under inversion of flat operators. We will relate it to the dual flat extension, which will rely on the dual summation S * . We define for any image F : E → V and v ∈ V the dual threshold set: We consider also the complement of the threshold set, Both sets X * v (F) and X v (F) c are increasing in v: In [2], for any increasing binary image transformation ψ, we defined ψ V * , the dual flat extension of ψ, as the flat extension of ψ w.r.t. the dual of V (with the order inverted), given by the dual of (4): We showed that for any dual automorphism β of V , We also showed that when V is com- Recall the inversion ν : , V ν will also be a complete sublattice of [⊥, ], so S will be additive on it; thus, by Theorem 17, S * will be additive on V and on V ν . We There is a linear dual automorphism of V if and only if V is symmetrical, and then the only one is ν.
The following result, the dual of Proposition 20 of [1], relates (43) to summation: . Combining this equivalence with the above two equalities, we get indeed The empty infimum on the right side corresponds to the case where p / ∈ ψ(X * v (F)) for all v ∈ V , so on the left side we have S * χψ(X * v (F))( p) v ∈ V = 0, giving thus as result.
If V is closed under componentwise numerical infimum, the latter coincides with the lattice-theoretical infimum operation in V , so This result leads us to our definition of dual flat extension by summation. Given a binary image measurement μ : P(E) → K E , we define the no-shift dual flat extension μ −V * of μ by setting for any image F : E → V and point p ∈ E: provided that the summation is well-defined, that is, the summed function v → μ(X * v (F))( p) is of bounded variation. Given a binary image transformation ψ : P(E) → P(E), we define the shifted dual flat extension ψ +V * of ψ by setting for any image F : E → V and point p ∈ E: again provided that the summation is well-defined, that is, the function v → χψ(X * v(F))( p) is of bounded variation Recall ν E : V E → V E , the extension of ν to functions E → V , given by pointwise application of ν, that is, ν(F( p)). Then the dual flat extension is the dual by inversion ν E of the flat extension: Proposition 20 Let V be symmetrical. Given a binary image measurement μ and a binary image transformation ψ, for any image F : E → V , we have μ −V * (F) = −μ −V (ν E (F)) and ψ +V * (F) = ν E (ψ +V (ν E (F))).
Proof Apply Theorem 17 to (44): . Thus, with (22) we get: Then (45), combined with the above and (23), gives: We will now relate the dual flat extension of a binary image operator to the flat extension of the dual by complementation of that operator. Recall that V is completely distributive, in the sense given by (5,6). The following preliminary result is adapted from Proposition 36 of [2], and its proof is similar:

Lemma 21
For any decreasing function f : P(E) → {0, 1} and image F : Here the empty supremum and infimum are ⊥ and respectively. Furthermore, The latter equality also holds if f is increasing.
, and as f is decreasing, f must be constant 0, so B = V , and sup A = inf B = ⊥. If B is empty, then f (V ) = f (X * (F)) = 1, and as f is decreasing, f must be constant 1, so A = V , and sup A = inf B = . We can thus assume A and B to be non-empty.
For any v ∈ A and w ∈ B, f (X v (F) c ) = 1 and Write b = inf B. Let g ∈ V such that g b, cf. (5), and let h = sup{F(q) | q ∈ X g (F) c }; then for any q ∈ X g (F) c , (5), we deduce that there is some q ∈ X g (F) c such that g ≤ F(q), that is, q ∈ X g (F), a contradiction. Therefore, for every g ∈ V such that g b, we must have g ∈ A. As V is completely distributive, by (6) Applying Proposition 4,(20) gives Applying Proposition 18, (41) gives Let now f be increasing. Then 1 − f : P(E) → {0, 1} is decreasing, so we apply to it the above result, and the additivity of both S and S * gives Given a binary image measurement μ, define the binary image measurement μ ‡ by μ ‡ (Z ) = μ(Z c ). For any strictly increasing sequence (Z 0 , . . . , Z n ) in P(E), (Z c n , . . . , Z c 0 ) is a strictly increasing sequence, and , so: μ has pointwise bounded variation iff μ ‡ has pointwise bounded variation.

Proposition 22
Given a binary image measurement μ having pointwise bounded variation, Proof Let p ∈ E. As μ has pointwise bounded variation, for any p ∈ E we apply Proposition 2: there are m + n increasing functions f 1 , . . . , f m+n : . For any F : E → V , the above lemma gives for each i = 1, . . . , m + n: By linearity of S and S * , we get then Given a binary image operator ψ, define the dual binary image operator ψ * by ψ * (Z ) = ψ(Z c ) c . We have Thus, for p ∈ E and successive Z i−1 , Z i ∈ P(E), , which from the above discussion on μ is equal to T V χψ(Z )( p) Z ∈ P(E) . Hence, ψ has pointwise bounded variation iff ψ * has pointwise bounded variation.
Proof Let F : E → V and p ∈ E. By (22,46) we have: Applying successively (45), Proposition 22, the above equality, and (23), we obtain: Assume that V is symmetrical. Combining Proposition 20 with Proposition 22 and Corollary 23, for any binary image measurement μ, any binary image transformation ψ, and any image F : E → V , we obtain: Let us illustrate this in the case of the difference between a dilation and erosion. Let δ be an extensive dilation on P(E), and let ε = δ * be its dual by complementation; thus, ε is an anti-extensive erosion. As δ(X )\ε(X ) = δ(X ) ∩ ε(X ) c = δ(X ) ∩ δ(X c ), we have δ(X c )\ε(X c ) = δ(X )\ε(X ). Consider the binary image measurement μ = χ(δ\ε) : X → χ δ(X )\ε(X ) = χδ(X ) − χε(X ); then μ ‡ = μ. Now, Indeed, applying (47) to δ and ε, ε +V is the dual by inversion ν E of δ +V , so we have: Consider next the binary image transformation ψ = δ\ε. We have thus χψ = μ and ψ +V = ⊥ + μ −V = ⊥ + δ +V − ε +V . The previous equality gives Concerning duality, we have thus obtained in our new approach the same results as in the classical theory [2]. First, the dual flat extension of an operator coincides with the dual by inversion of the flat extension of that operator, see Proposition 20. Next, the dual flat extension of an operator coincides also with the flat extension of the dual by complementation of that operator, see Proposition 22 and Corollary 23. All this is summarised in (47).

Flat Linear Operators and Hybrid Morphology
As we mentioned in Sect. 3, after (22), the no-shift flat extension is linear: We stated that equality for scalars λ 1 , λ 2 ∈ Z, but if we relax our framework by considering binary image measurements with non-integer output values, the equality will remain valid for λ 1 , λ 2 ∈ R.
As we suggested in the conclusion of [1], it follows that some linear operators on grey-level or multivalued images will be flat. Assume ⊥ = 0. A translation τ of the space E, acting on P(E), is an increasing binary image operator, and its flat extension τ V is the same translation acting on V E [2]; we have τ V = τ +V = (χ τ ) −V . Then, for k translations τ 1 , . . . , τ k and k scalars λ 1 , . . . , λ k ∈ R, we get Here λ 1 χτ 1 + · · · + λ k χτ k is a discrete convolution operator acting on binary images, associated to the mask with values λ 1 , . . . , λ k , positioned at τ 1 (o), . . . , τ k (o), where o is the origin in E; then λ 1 τ V 1 + · · · + λ k τ V k is the same convolution operator for grey-level or multivalued images, and it is obtained as the flat extension of the one on binary images.
We will present here the first elements of a general theory of flat linear operators. But we need beforehand to introduce some constraints on the lattice V of image values. Given a flat linear operator μ −V applied to two functions F, G : E → V , the linearity gives the equality where μ −V is applied to the function F + G, which is not necessarily E → V ; we are thus in the same situation as in Sect. 3.3, where the interval of values is bounded, but may vary. In view of (30), as we will always have μ(∅) = 0, we can restrict ourselves to functions with non-negative values, in other words, the lattice V has its lower bound ⊥ = 0.
In other words, μ −[0, ] (F) does not vary when the upper bound increases.
From now on, we assume that the lower bound ⊥ will always be 0, but the upper bound can vary. We consider thus bounded positive functions, that is, any function F for which there exists > 0 with 0 ≤ F( p) ≤ for all p ∈ E. The set of such functions is closed under addition and multiplication by a positive scalar. Here linearity means that μ −V (F +G) = μ −V (F) + μ −V (G) and μ −V (a F) = aμ −V (F) for a > 0, where V = [0, ] with large enough to guarantee that F, G, F + G, a F are all E → V . The case of functions that are not positive and of negative scalars will be dealt with later.
Given a bounded positive function F and a positive scalar a > 0, taking > 0 large enough to have both F and a F with values in the interval V = [0, ], assuming μ(∅) = 0, then (32) will give μ −V (a F) = aμ −V (F). There remains to guarantee that For a binary image measurement μ let us say that μ is additive if for any X , Y ∈ P(E), X ∩ Y = ∅ implies that μ(X ∪ Y ) = μ(X ) + μ(Y ). We can give an equivalent formulation of that property: Lemma 24 A binary image measurement μ is additive if and only if μ(∅) = 0 and for any X , Proof Let μ be additive. As X ∩ ∅ = ∅, we obtain μ(X ) = μ(X ∪ ∅) = μ(X ) + μ(∅), hence μ(∅) = 0. For any X , Y ∈ P(E), Conversely, if μ(∅) = 0 and for any X , Note that the condition μ(∅) = 0 cannot be omitted, it is not a consequence of the identity μ( Given an additive binary image measurement μ, one can easily show by induction on n ∈ N that for n mutually disjoint subsets X 1 , . . . , X n of E, μ X 1 ∪· · ·∪ X n = μ(X 1 )+· · ·+ μ(X n ).
Recall from the Introduction the cylinder of base B and level v for B ⊆ E and v ∈ V : the function C B,v given by Proof C B,v has its values in the finite chain W = {0, v, }, which is a complete sublattice of V . By Proposition 31 of [1], . The summation of a function f : Thus, for any p ∈ E, (22) gives We obtain then the following: Corollary 26 Given a binary image measurement μ, if μ −V is additive, then μ is additive.
Proof Let (Z 0 , . . . , Z n ) be a strictly increasing sequence in P(E), and let p ∈ E. By the additivity of μ, for each The equality at the beginning of the second line follows from the additivity of μ, since the Z i \Z i−1 are mutually disjoint. Let N be the set of all i = 1, . . . , n such that μ(Z i )( p) − μ(Z i−1 )( p) < 0. We have similarly that is, N V (Z 0 ,...,Z n ) μ(Z )( p) Z ∈ P(E) ≤ − inf K . Taking the supremum of positive and negative variations for all strictly increasing sequences (Z 0 , . . . , Z n ), having the same bounds sup K and − inf K , (48) follows.
Next, our question receives a positive answer when μ is local.
Theorem 28 Let μ be an additive binary image measurement, and let μ be local with the finite W ( p) ∈ P(E) associated to each p ∈ E. For any p ∈ E and q ∈ W ( p), let M q, p = μ({q})( p). Then for any F : E → V and p ∈ E, In particular, μ −V is additive.
Proof Let F : E → V and let v ∈ V such that v > 0. For any q ∈ E, define F /q : E → V by F /q (q) = F(q) and F /q ( p) = 0 for p = q; in other words, F /q = C {q},F(q) . If F(q) ≥ v, then q ∈ X v (F) and X v (F /q ) = {q}, while if F(q) ≥ v, then q / ∈ X v (F) and X v (F /q ) = ∅; thus, X v (F /q ) = X v (F) ∩ {q}. Now take p ∈ E. We have Since μ is local with W ( p) associated to p, the X v (F /q ) for q ∈ W ( p) are mutually disjoint, and μ is additive, we have This equality holds for any v > 0; so, by Lemma 6, the summation of the two functions for v ∈ V are equal, hence (22) and the additivity of summation give: By Lemma 25, μ −V (F /q )=μ −V (C {q},F(q) )=F(q)μ({q}), so μ −V (F /q )( p)=F(q)μ({q})( p)=F(q)M q, p . Hence (49) follows. As this formula is that of a convolution, μ −V is additive.
We did not find any general result on the additivity of μ −V when μ is not local. However, we get some preliminary results in the case where μ has binary values, that is, μ is P(E) → {0, 1} E .
We have considered flat linear operators on bounded positive functions, that is, functions F : V E → U E such that for some ∈ U with > 0, F is V E → [0, ] E . We will now extend our framework to bounded functions, that is, functions F : V E → U E such that for some ∈ U with > 0, F is V E → [− , ] E , in other words, − ≤ F( p) ≤ for all p ∈ E. We will use the same method as in Theorem 3, where we extended the additive summation S from bounded, nonnegative and decreasing functions to functions of bounded variation.
Every bounded function F is the difference of two bounded positive functions, for instance its positive and negative parts F + and F − . We define the flat extension μ * V of μ as follows: given a decomposition F = G − H , where G, H are bounded positive functions, we set μ * V (F) = μ −V (G) − μ −V (H ), and when μ −V is additive, this definition does not depend on the decomposition. The following result has its proof similar to that of Theorem 3, given in Theorem 12 of [6]. Then μ −V is the averaging filter with window W 1 , that is, for a bounded positive function F we have μ −V (F)( p) = 1 4 q∈W 1 ( p) F(q). Now, (μψ) −V = μ −V ψ +V ; this operator associates to a point p the average of the second greatest image values in the four 2 × 2 quadrants in W ( p).

Conclusion
This second paper concludes our presentation of a new approach to flat morphological operators, where latticetheoretical threshold superposition is replaced by numerical threshold summation. The advantage of this new framework is that the flat extension is not restricted to increasing binary image transformations, that is, increasing operators on binary images giving binary images as output; indeed, it applies to non-increasing binary image transformations, and also to what we call binary image measurements, that is, operators on binary images with output images that are not necessarily binary, for instance the morphological Laplacian (21), or a linear convolution by a mask of coefficients. A minor drawback of this new approach is that the flat extension applies only to grey-level or multivalued images with numerical or componentwise (marginal) ordering of image values, while the classical approach [2] applied to images with values in an arbitrary complete lattices, for instance label images.
Our first paper [1] was mainly devoted to the mathematical basis of our approach, namely bounded variation and the summation operation S, extending preliminary results of [6]. Then it gave the definition of flat extension by threshold summation, in its two forms of the no-shift flat extension μ −V of a binary image measurement μ and the shifted flat extension ψ +V of a binary image transformation ψ. Finally, it studied the elementary properties of this flat extension, and also showed how connected binary image transformations extend to connected flat operators. These last results were rather straightforward; they generalised the same results given in [2] for the classical flat extension of increasing binary image transformations.
The new approach is compatible with the old one, in the sense that for increasing binary image transformations, our shifted flat extension coincides with the classical flat extension: ψ +V = ψ V .
In this second paper, we have considered further properties of the flat extension, which were given in [2] within the classical framework for increasing binary image transformations. They are more complex, indeed, they generally rely on the complete distributivity of the lattice V of image values. We now see that most of these properties are valid only for increasing binary image transformations, they generally fail for non-increasing binary image transformations and for binary image measurements with non-binary output values (i.e., which do not correspond to binary image transforma-tions). However, we could obtain some weaker properties that remain valid in our general framework.
In [2] we showed that when the lattice V of image values is completely distributive, the flat extension of a supremum or infimum of increasing binary image transformations is respectively the supremum or infimum of their flat extensions. This is no more true in the general case, see Sect. 3.1. However, since the no-shift flat extension is both linear and an isomorphism between the poset of binary image measurements and the poset of their no-shift flat extensions, it follows that flat operators constitute a lattice-ordered group, but here the join and meet operations take a different form than the usual ones for image operators, see Examples 10 and 11. Moreover, the lattice of shifted flat extensions of binary image transformations is complete.
Similarly, in [2] we showed that when the lattice V of image values is completely distributive, the flat extension of a composition of increasing binary image transformations is the composition of their flat extensions. This property fails in the general case, see Sect. 3.2, in particular Example 12. However, it remains valid in the case of the composition of an increasing binary image transformation followed by a binary image measurement having pointwise bounded variation, see Proposition 14. It is known that under some continuity conditions, the flat extension of an increasing binary image transformation commutes with anamorphoses (increasing contrast mappings) and with thresholding [9][10][11]. As we saw in Sect. 3.3, in general, the shifted flat extension of a non-increasing binary image transformation commutes only with linear contrast mappings.
Section 4 studied duality, following the same plan as in [2]. First we considered the dual flat extension; in [2] it was defined through superposition in the dual lattice of dual threshold sets, here it is defined through the dual summation of dual threshold sets, see Sect. 4.1. Then in Sect. 4.2 we showed that the dual flat extension of a binary image transformation corresponds to both the dual by inversion of the flat extension of that transformation, and to the flat extension of the dual by complementation of that transformation. We obtained something very similar for binary image measurements.
Section 5 considered flat linear operators. Here we had to restrict our framework to bounded positive functions, that is, images with bounded positive values. When the no-shift flat extension μ −V of a binary image measurement μ is linear, μ must be additive. We could not obtain the reciprocal result, that the no-shift flat extension of any additive binary image measurement is linear; it seems that a general analysis of additive binary image measurements is extremely difficult. However, we proved that the no-shift flat extension of a local additive binary image measurement is linear, it takes the form