Introduced by Lerallut et al. [15, 16], morphological amoeba filtering is a class of discrete image filtering procedures based on image-adaptive structuring elements. These structuring elements are defined by a so-called amoeba metric that combines spatial proximity and grey-value similarity. Amoeba filters adapt flexibly to image structures. For example, iterated amoeba median filtering (AMF) improves the favourable edge-preserving denoising capabilities of traditional iterated median filtering  by removing its tendency to dislocate edges, and introducing even edge-enhancing behaviour.
This paper is an extended version of the conference paper . Continuing the author’s earlier work with co-authors [25, 27], it is concerned with comparing AMF methods to two curvature-based PDEs of image processing. Firstly, we consider geodesic active contours [4, 5, 12, 13]
which can be used to segment a given image by evolving a contour towards regions of high contrast in . The evolving contour is encoded as zero-level set of the function . The (decreasing, nonnegative) edge-stopping function can be chosen e.g. as a Perona-Malik-type function 
As shown in , AMF is linked to the self-snakes equation in a way similar to the connection of traditional median filtering to (mean) curvature motion  that was proven by Guichard and Morel : One amoeba median filtering step asymptotically approximates a time step of size of an explicit time discretisation for the self-snakes PDE when the radius of the structuring element goes to zero. The exact shape of the (decreasing, nonnegative) edge-stopping function depends on the specific choice of the amoeba metric, with the Perona-Malik-type function (2) being associated to the amoeba metric.
Building on this amoeba/self-snakes connection,  proposed a morphological amoeba algorithm for active contour segmentation. Experimentally, this process behaves similar to geodesic active contours, with a tendency to refined adaptation to structure details, see [25, Fig. 2]. Analysis in  was restricted to a rotationally symmetric situation where asymptotic equivalence to geodesic active contours (1) could be proven. A more comprehensive asymptotic equivalence result proven in  for the case of an amoeba metric brings out that perfect equivalence between amoeba and geodesic active contours does not hold in general geometric situations but amoeba active contours approximate a PDE similar to geodesic active contours. The main goal of the present paper is to extend this theoretical analysis to general amoeba metrics. All previous findings on amoeba median filters can be recovered from the new general result as special cases.
Already in  the possibility was mentioned to introduce into amoeba active contours a force term similar to the balloon force proposed by Cohen  or its modifications in more recent works [3, 13, 18]. The benefits of such a force term are that contour evolution in homogeneous image regions is accelerated, that evolution can be prevented from getting caught in undesired local minima, and that initialisation is also possible with contours inside the region to be segmented. The corresponding modifications to the amoeba active contour algorithm that were proposed in  have not been analysed theoretically so far. To close this gap is a further goal of the present paper.
We extend the analytical investigation of amoeba median algorithms. First, we derive the PDE corresponding to the amoeba active contour method in a general geometric situation and for a general amoeba metric. As already in the case , this PDE is no longer fully identical to the geodesic active contour equation. The proof strategy follows that introduced in , which differs substantially from the one used in [25, 27]. Based on the approximation result, qualitative differences between geodesic and amoeba active contours are discussed for the amoeba metric case.
In a further step, we analyse in detail the modification of the amoeba active contour method by a bias that was proposed in  to mimick the force terms often used in connection with geodesic active contours. In the context of this analysis, we will also propose a further variant of this bias.
While the focus in the present paper is on theoretical analysis, we demonstrate segmentation via amoeba active contours with two experiments, which are extended from .
Structure of the paper.
We give a short account of the basic concepts of amoeba filtering in Section 2. Our main theoretical result on PDE approximation is proven in Section 3. Relations to previous results on PDE approximation by amoeba median filtering algorithms are established in Section 4. On the ground of the PDE approximation result, a comparison between amoeba active contours and geodesic active contours is made in Section 5. Force terms in active contour methods are considered in Section 6. Experiments are presented in Section 7. The paper ends with a conclusion in Section 8.
2 Amoeba Filters
In this section we recall shortly the definition of amoeba metrics and amoeba filters. We assume that a 2D image is given as a smooth function on a closed domain .
2.1 Morphological amoebas
Following the spatially continuous formulation of the amoeba framework in [25, 27], we associate with the image manifold consisting of the points . The construction of morphological amoebas as adaptive structuring elements relies on introducing an amoeba metric on .
To this end, we start by choosing a function with , which is increasing on , and for which is a norm in . In the following, we will give a general definition of an amoeba metric based on but pay special attention to the following two cases:
the amoeba metric with , where is the Euclidean norm, and
the amoeba metric given by .
To construct from an amoeba metric, we consider regular curves with and . For such a curve, we define a curve length as
Note that in the case, is just the standard curve length on induced by the Euclidean metric of the surrounding space .
The amoeba distance between two points , of the image domain is then the minimum of among all curves connecting with . (The minimising curve is called geodesic between and .)
In (3), the use of the Euclidean norm in the spatial component ensures rotational invariance of the amoeba metric, while the combination of spatial and tonal distances is governed by . The factor is a contrast scale that balances the spatial and tonal information.
The choice of in practical image filtering with amoeba filters is not quite obvious. The same holds for its scaling behaviour when resampling the image. We will not discuss here strategies how to choose . However, in the light of our results later in this paper the choice of appears analogous to the choice of contrast parameters for Perona-Malik diffusion 
, for which heuristics based on statistics of gradient magnitudes in the image have been proposed, see e.g..
2.2 Continuous-scale amoeba filtering formulation
With the so defined structuring elements several morphological filters can be applied straightforward. For the purpose of the present work, morphological filters are characterised by their invariance under automorphisms of the image plane (translations, rotations) and under strictly monotonically increasing transformations of the intensities. This notion, compare e.g. , naturally includes median and other rank-order filters.
In particular, for amoeba median filtering (AMF), the median of the intensity values of the given image within becomes the filtered intensity at . Like traditional median filtering, this filter can be applied iteratively. This process was studied in .
2.3 Amoeba active contours
The amoeba active contour method described in  acts in a similar way: Structuring elements are determined as before but on the basis of the given image , and are used for median-filtering the evolving level-set function . In analysing amoeba active contours, the amoeba contrast parameter can be fixed to since a change of this parameter is equivalent to a simple rescaling of the steering function .
2.4 Discrete amoeba filtering algorithms
Practically, computations are carried out on discrete images. To this end, a discrete version of the above-mentioned amoeba distance is defined by restricting curves to paths in the neighbourhood graph of the image grid, either with 4-neighbourhoods as in [15, 16] or with 8-neighbourhoods as in [25, 27]. More sophisticated constructions using geometric distance transforms [2, 11] would be possible but are not investigated here due to our focus on space-continuous analysis.
3 Analysis of Amoeba Active Contours
We study an amoeba median filter in which is a smooth function from which the amoeba structuring elements are generated, and is another smooth function, to which the median filter is applied. Note that the role played by here can be compared to that of a “pilot image” in some works on adaptive morphology, see e.g. . In such a setup, the pilot image usually is some prefiltered version of the same input image that is processed later on by the morphological filter, with the structuring elements derived from the pilot image. This setting (which we do not consider in detail) is obviously also covered by our analysis in the sequel. However, our hypothesis does not require any relation between and .
In our subsequent analysis, local orthonormal bases aligned to the gradient and level-line directions of both functions will play an important role. Given a location in the image domain, we will therefore denote by
the normalised gradient vector ofat . The unit vector then indicates the local level line direction of . At locations with , the directions , are not well-defined. For the following derivations we therefore assume that . However, we will see that the resulting PDE still describes a well-defined evolution.
Analogously, we denote by a normalised gradient vector for , and by the unit vector in the level line direction. The angle between the gradient directions will be called , such that . We will prove the following fact.
One step of amoeba median filtering of a smooth function governed by amoebas generated from with an amoeba radius of asymptotically approximates for a time step of size of an explicit time discretisation for the PDE
where , , at the location are given by
The PDE (4) describes an evolution process similar but not identical to geodesic active contours. An interpretation of the individual terms on the right-hand side of the PDE on an intuitive level is not straightforward. Several detailed results in Sections 4 and 5 give an account of communities and differences between (4) and geodesic active contours. In particular, Corollaries 3 and 4 in Section 4 specify cases where (4) coincides with a geodesic active contour or self-snakes equation. Corollaries 1 and 2 specialise (4) to the and amoeba metrics where it is easier to compare to geodesic active contours. Section 5 studies the differences between both evolutions in the case based on special cases.
As pointed out above, and are well-defined only at locations where the gradient of does not vanish. Let us study therefore what happens with the evolution (4) at singular points where vanishes. Firstly, if fulfils , one has simply (remember that holds by definition), making the right-hand side of (4) collaps into the well-defined expression . If , we notice that the set of singular points can be subdivided into boundary and interior points. Interior points form constant regions of such that the second derivatives of vanish, too, making the right-hand side of (4) collaps into the same well-defined expression as mentioned before. The remaining boundary points, however, form curves and isolated points. In both cases, smoothness of the gradient field implies that the resulting definition gaps of the right-hand side of (4) can be continuously closed such that again a unique and continuous evolution is obtained.
In the theorem and its forthcoming proof we have fixed to , as mentioned before. However, it is obvious how to adapt the statement to variable because it just takes to replace with in all places.
The remainder of the present Section 3 is devoted to the proof of this theorem. In Subsection 3.1 the overall strategy of the proof is outlined. It involves two main steps that are subsequently treated in Subsection 3.2 and Subsection 3.3, respectively.
3.1 Remark on the proof strategy
In [25, 27], related but more restricted results were proven (which are repeated as Corollaries 3 and 4 in Section 4 below). The proofs in [25, 27] were based on measuring level line segments within the amoeba. The structure of and was represented by their Taylor coefficients up to second order in the calculations. This strategy is well suitable for the amoeba median filter considered in  where the same image from which the structuring elements are obtained is also being filtered. It is also useful when analysing more general amoeba filters than median filters, which is a subject of forthcoming work. For analysing amoeba active contours the same approach is still manageable in the special case treated in . However, the complexity of such calculations would increase a lot in the general case we are about to discuss.
In the following proof of the theorem we therefore pursue a different strategy that was introduced in the proof in  in the more restricted case of the amoeba metric. Instead of measuring areas of segments of amoebas, this approach considers sectors of amoebas via a polar coordinate representation. Level lines other than the one through the amoeba centre are not considered directly any more.
3.2 Finding the amoeba contour
As the first part of our proof of Theorem 1, we want to determine the shape of the amoeba around a point . To this end, we start by considering the 1D case: given , we seek such that the arc-length of the image graph of between and each of , equals . Certainly, .
Using Taylor expansions for and , we have for the arc-length from to (where )
Equating this to , and taking into account that is also within the amoeba, yields a quadratic equation in with the solutions
The first solution with the “” sign, i.e. , is in fact the sought (because of ). Note that the second, negative solution, , is not but refers, for small , to a location far outside the amoeba, and does not go to when . In fact, this second solution is just a spurious solution introduced by our perturbation approach via the truncated Taylor series (a common behaviour in this kind of approximation).
To find also , an expression analogous to (8) is written down for the arc length from to (with ), leading again to a quadratic equation with as one of its solutions.
Using the Taylor expansion for the square root in (9) and the analogous expression for , both results can be combined into
Turning to the 2D case, we approximate each shortest path in the amoeba metric from to a point on the amoeba contour by a Euclidean straight line in the image plane. This introduces only an error for the path length. We consider now the straight line through in the direction of a given unit vector . By our previous 1D result, with the directional derivatives and , we see that said straight line intersects the amoeba contour at with
3.3 Contributions to the amoeba median
The second part of our proof of Theorem 1 consists in analysing the median of within the structuring element whose polar coordinate representation has been derived in the preceding subsection.
This median equals if (a) the amoeba is point-symmetric w.r.t. , and (b) the level lines of are straight: The central level line of then bisects , i.e. and have equal area. For a similar bisection approach in a gradient descent for segmentation compare [10, 14].
Deviations from conditions (a) and (b) lead to imbalances between and . The median is determined by the shift of the central level line that is necessary to compensate for the resulting area difference. The separate area effects of asymmetry of the amoeba, and curvature of ’s level lines are of order , while any cross-effects are at least of order , and can be neglected for the purpose of our analysis. Therefore, the two effects can be studied independently by considering the two special cases in which only one of the effects takes place.
3.3.1 Asymmetry of the amoeba
We start by analysing the effect of asymmetries of the point set , compare Figure 1(a). As the amoeba shape is governed by , we will use the , local coordinates. For an arbitrary unit vector we have then
which can be inserted into (11) to obtain .
Consider now the case in which has straight level lines; remember that is the direction angle of its gradient direction. Since the amoeba shape is given by in polar coordinates, the areas of and can be written down using the standard integral for the area enclosed by a function graph in polar coordinates as
such that the sought area difference is then obtained as
The integral on the right-hand side equals
thus we have
where , , are as stated in Theorem 1.
3.3.2 Curvature of the level lines
The second source of area imbalance between and is the curvature of the level line of through . To study this contribution, we consider the case in which the amoeba is symmetric, such that the level line curvature is the single source of area imbalance.
Using the , local coordinates pertaining to , the level line curvature equals . The resulting area difference is
3.4 Median calculation
We return now to the general situation in which both effects discussed in Subsection 3.3 occur, making the area difference between and equal up to higher order terms.
As the median of within belongs to the level line of that bisects the area of the amoeba, the difference corresponds to a shift of the central level line that compensates the area difference . This compensation is obtained when
Solving for gives
4 Special Cases
In the following we relate Theorem 1 to earlier results referring to more specialised configurations.
4.1 and Amoeba Metrics
For general , the integrals , , and in Theorem 1 can often only be treated numerically. For specific amoeba norms, however, the integrals can be evaluated in closed form. The following corollary states the PDE for amoeba active contours in the case of the amoeba metric.
Amoeba median filtering of a smooth function governed by amoebas generated from with amoeba radius and amoeba norm asymptotically approximates the PDE
in the sense of Theorem 1.
This corollary reproduces the statement of Theorem 1 in .
A similar result for the norm follows.
See Appendix A.1. ∎
To illustrate the behaviour of the coefficients of , and in (4) for the amoeba metric, we display in Figs. 4 and 5 graphs of all three coefficients for variable and variable , respectively. The most striking difference to the amoeba metric is that the coefficients start out with nonzero values already for such that the level line curvature of influences the evolution also in almost flat regions. Combined with the fact that also the coefficient of shows a faster decay away from than in the case it becomes evident that the contour evolution reacts generally more sensitive to small image gradients.
4.2 Special Evolutions
The amoeba median filter with approximates the self-snakes equation
in the sense of Theorem 1.
vanishes by the odd symmetry of its integrand. The expressionsand become
Substituting these together with , , and into (4) yields
with as stated in (34), and
A short calculation (see Appendix A.2) verifies that
Corollary 3 reproduces the result from  on the approximation of self-snakes by iterated amoeba median filtering with a general amoeba metric. This is not quite obvious since due to the different proof strategy used in  the actual integral expressions look fairly different. Appendix A.3, however, demonstrates that the coefficients are in fact identical.
Note also that in the case of the amoeba metric, coincides with the Perona-Malik function (2) with .
We return now to the active contour setting where the roles of the evolving function and the image governing the amoebas are separated, and consider the special geometric situation of both functions being rotationally symmetric with the same centre. In this case, the PDE approximated by amoeba active contours is identical to the geodesic active contour equation.
The assumed rotational symmetry implies , , , , and . Substituting these identities into (4) leads to
with as given by (42) and
From a practical viewpoint, the hypothesis of Corollary 4 may appear rather artificial at first glance. However, it mimicks a situation which is common in an active contour evolution when the evolving contour has almost attained its final state delineating a segment boundary: If the segment boundary in is given by a level line, along which the image contrast is uniform, and the evolving contour in is already close to it, then the level lines of and will be aligned and of equal curvature. The same is achieved in the rotationally symmetric scenario considered in Corollary 4.
5 Comparison of Amoeba Active Contours with Geodesic Active Contours
In the general amoeba active contour setting, however, it is evident that equation (4) does not exactly coincide with (1). For a better understanding of the differences between both active contour methods, we analyse further typical configurations. Throughout this section, we restrict our considerations to the amoeba metric, making the PDE (22) our starting point.