Álvar-Ginés Legaz-Aparicio

Rafael Verdú-Monedero

Jesús Angulo

Adaptive morphological filters based on a multiple orientation vector field dependent on image local features

Keywords: Mathematical morphology, adaptive morphology, adaptive structuring elements, spatially-variant structuring elements

This paper addresses the formulation of adaptive morphological filters based on spatially-variant structuring elements. The adaptivity of these filters is achieved by modifying the shape and orientation of the structuring elements according to a multiple orientation vector field. This vector field is provided by means of a bank of directional openings which can take into account the possible multiple orientations of the contours in the image. After reviewing and formalizing the definition of the spatially-variant dilation, erosion, opening and closing, the proposed structuring elements are described. These spatially-variant structuring elements are based on ellipses which vary over the image domain adapting locally their orientation according to the multiple orientation vector field and their shape (the eccentricity of the ellipses) according to the distance to relevant contours of the objects. The proposed adaptive morphological filters are used on gray-level images and are compared with spatially-invariant filters, with spatially-variant filters based on a single orientation vector field, and with adaptive morphological bilateral filters. Results show that the morphological filters based on a multiple orientation vector field are more adept at enhancing and preserving structures which contains more than one orientation.

Introduction

Mathematical morphology is a nonlinear image processing methodology useful for solving efficiently many image analysis tasks [START_REF] Soille | Morphological Image Analysis: Principles and Applications[END_REF]. From a mathematical point of view, it is based on two basic operators, dilation and erosion, which correspond respectively to the convolution in the max-plus algebra and its dual convolution. More precisely, in Euclidean (translation invariant) mathematical morphology, the pair of adjoint and dual operators dilation (supconvolution) ( f ⊕ b)(x) and erosion (inf-convolution) ( f b)(x) of an image f : E ⊂ R n → R = R ∪ {-∞, +∞} are given by [START_REF] Serra | Image Analysis and Mathematical Morphology: Theoretical Advances[END_REF][START_REF] Heijmans | Morphological Image Operators[END_REF]:

δ b ( f )(x) = ( f ⊕ b)(x) = sup y∈E { f (y) + b(y -x)} , ε b ( f )(x) = ( f b)(x) = inf y∈E { f (y) -b(y + x)} , (1)
where b : R n → R is the structuring function which determines the effect of the operator. The structuring function plays a similar role to the kernel in classical linear filtering using convolution. By allowing infinity values, the further convention for ambiguous expressions should be considered: f (y) + b(xy) = -∞ when f (y) = -∞ or b(xy) = -∞, and that f (y)b(y + x) = +∞ when f (y) = +∞ or b(y + x) = -∞. We easily note that both are invariant under translations (i.e., commute with the translation operator) in the spatial ("horizontal") space E and in the image intensity ("vertical") space R, i.e.,

f (x) → f (y,α) (x) = f (x -y) + α, (2)
with y ∈ E and α ∈ R, then

δ b ( f (y,α) )(x) = δ b ( f )(x -y) + α. (3)
The structuring function is typically a parametric family b t (x), where t > 0 is the scale parameter. In particular, the canonical structuring function is the paraboloidal shape (i.e., square of the Euclidean distance) [START_REF] Maragos | Slope transforms: theory and application to nonlinear signal processing[END_REF][START_REF] Van Den Boomgaard | The Morphological Equivalent of Gaussian Scale-Space[END_REF]:

p t (x) = - x 2 2t . (4)
Due to its properties of semigroup, dimension separability and invariance to transform domain, the structuring function p t (x) plays a similar role to the Gaussian kernel in (linear) covolution-based filtering. The corresponding quadratic dilation and erosion by p t (x) are related to the following initial-value Hamilton-Jacobi first-order partial differential equation (Hamilton-Jacobi PDE) [START_REF] Alvarez | Axioms and fundamental equations of image processing[END_REF][START_REF] Maragos | Differential morphology and image processing[END_REF]:

         ∂u ∂t = ± 1 2 ∇u 2 , x ∈ R n , t > 0 u(x, 0) = f (x), x ∈ R n (5)
This Hamilton-Jacobi PDE does not admit classic (i.e., everywhere differentiable) solutions but can be studied in the framework of the theory of viscosity solutions [START_REF] Crandall | User?s guide to viscosity solutions of second order partial differential equations[END_REF]. It is well known that the solutions of the Cauchy problem [START_REF] Van Den Boomgaard | The Morphological Equivalent of Gaussian Scale-Space[END_REF] are given by the so-called Hopf-Lax-Oleinik formulas [START_REF] Barron | Hopf-lax-type formula for u t + h(u, du) = 0[END_REF], for + sign andsign, respectively:

u(x, t) = sup y∈R n f (y) - x -y 2 2t = ( f ⊕ p t )(x) (for + sign), (6)
u(x, t) = inf y∈R n f (y) +

xy 2 2t = ( f p t )(x) (forsign).

Such PDE model is fundamental to continuous mathematical morphology, and research on numerical schema for the solution of spatially-variant counterparts of ( 5) is still active [START_REF] Diop | Multiscale image analysis based on robust and adaptive morphological scale-spaces[END_REF].

The theory of morphological filtering is based on the opening ( f • b)(x) and closing ( f • b)(x) operators, obtained respectively by the composition product of erosion-dilation and dilation-erosion using the same structurig function, i.e., γ b ( f

)(x) = ( f • b)(x) = (( f b) ⊕ b) (x) = sup z∈E inf y∈E { f (y) -b(y -z) + b(z -x)} , ϕ b ( f )(x) = ( f • b)(x) = (( f ⊕ b) b) (x) = inf z∈E sup y∈E { f (y) + b(z -y) -b(x -z)} . (8)
In order to have a better insight of the effect of the opening and the closing of a function, let us rewrite ( f • b)(x) as follows:

γ b ( f ) = b (y,α) | (y, α) ∈ E × R, b (y,α) ≤ f , (9)
where denotes the supremum. Therefore, in the product space E × R the subgraph of the opening is generated by the upper envelope of the horizontally and vertically translated shape function b(xy) + α under the function f . In other words, function ( f • b)(x) can be seen as the supremum of the invariants parts of f under-swept by b. Regarding the closing ( f • b)(x), a similar geometric dual interpretation is obtained:

ϕ b ( f ) = b(y,α) | (y, α) ∈ E × R, b(y,α) ≥ f , (10)
where denotes the infimum and b(x) = -b(-x). This expression corresponds to the invariant parts of f over-swept by the horizontally and vertically symmetric structuring function b. From [START_REF] Barron | Hopf-lax-type formula for u t + h(u, du) = 0[END_REF], it is straightforward to see that the opening is (i) increasing, (ii) idempotent and (iii) anti-extensive, i.e., ∀x, (i) [START_REF] Diop | Multiscale image analysis based on robust and adaptive morphological scale-spaces[END_REF], the closing is increasing and idempotent, but being extensive:

f (x) ≤ g(x) ⇒ γ b ( f )(x) ≤ γ b (g)(x); (ii) γ b (γ b ( f )) = γ b ( f ); and (iii) γ b ( f )(x) ≤ f (x). From
ϕ b ( f )(x) ≥ f (x), ∀x.
More complex filters can be obtained by composition of openings and closings [START_REF] Serra | Image Analysis and Mathematical Morphology: Theoretical Advances[END_REF][START_REF] Heijmans | Morphological Image Operators[END_REF]. At this point, it could be interesting for a general reader to compare these morphological operators to the most extended family of filters based on the standard convolution of a function f by a translation-invariant kernel k:

( f * k)(x) = E f (y)k(y -x)dy, (11)
and in particular, to the case of canonical kernel in linear filtering, the so-called Gaussian kernel at scale t:

( f * g t )(x) = C E f (y) exp - x -y 2 2t dy, C = (2πt) -n/2 . ( 12
)
One can easily identify that the quadratic dilation (resp. erosion) is just a convolution in a max-plus (resp. min-minus) algebra instead of the plus-times algebra, and p t (x) is, up to the constant C, just the logarithm of g t (x). However, we point out that the parallelism with the quadratic opening is more relevant:

( f • p t )(x) = y∈E,α∈R - x -y 2 2t + α : - x -y 2 2t + α ≤ f . (13)
Thus, the standard regularization of the function by a Gaussian kernel weighted-average in ( f * g t ) is replaced in ( f • p t )(x) by a maximal quadratic under-regularization, or an minimal over-regularization in ( f • p t ).

The most commonly studied framework, which additionally presents better properties of invariance, is based on flat structuring functions, called structuring elements. More precisely, let B be a Boolean set defined at the origin, i.e., B ⊆ E or B ∈ P(E), which defines the "shape" of the structuring element, the associated structuring function is given by b

(x) = 0 if x ∈ B, -∞ if x ∈ B c , (14)
where B c is the complement set of B in P(E). Hence, the flat dilation ( f ⊕ B) and flat erosion ( f B) can be computed respectively by the moving local maxima and minima filters, i.e.,

δ B ( f )(x) = ( f ⊕ B)(x) = sup y∈B { f (x -y)} = y∈B f (x -y), ε B ( f )(x) = ( f B)(x) = inf y∈B { f (x + y)} = y∈B f (x + y). (15)
A detailed presentation of the principles and applications of morphological image analysis is provided in [START_REF] Soille | Morphological Image Analysis: Principles and Applications[END_REF]. Recently, in [START_REF]Mathematical Morphology: From Theory to Applications[END_REF], the state of the art in mathematical morphology is exposed in a didactic fashion, with original and novel content.

Traditionally, structuring functions (resp. structuring elements) have been space translation-invariant, applying the function b (or the same set B, i.e., same shape and orientation) in all pixels of the image. In the last years, the notion of adaptive morphological operators [START_REF] Roerdink | Adaptivity and group invariance in mathematical morphology[END_REF] based on using adaptive structuring elements, which change their shape and orientation over the space E, according to the local image features, have been proposed. In [START_REF] Maragos | Overview of adaptive morphology: Trends and perspectives[END_REF] an overview of adaptive morphology is detailed, and in [START_REF] Ćurić | Adaptive mathematical morphology -a survey of the field[END_REF] a complementary overview is presented as well as the latest developments and a brief history of adaptive mathematical morphology.

As pointed out in [START_REF] Ćurić | Adaptive mathematical morphology -a survey of the field[END_REF], there are two important aspects of adaptive mathematical morphology to address: (1) how to construct adaptive structuring elements which are suitable for the image analysis task, and (2) how to properly define morphological operators with adaptive structuring elements. Among the methods of adaptive morphology, those based on an orientation vector field to adapt the shape and orientation of structuring elements show good ability to preserve the structures of image. The approach followed in this work for constructing the proposed adaptive morphological operators is therefore based on adaptivity with respect to "the spatial neighborhood position" or "gray level image values", which is referred as input-adaptive mathematical morphology by Roerdink [START_REF] Roerdink | Adaptivity and group invariance in mathematical morphology[END_REF]. This category of adaptiveness is defined as adaptability with respect to the image content, i.e. the position in the image domain as well as values in the image range. Well founded examples of input-adaptive processing are those based on bilateral morphological operators [START_REF] Angulo | Morphological bilateral filtering[END_REF].

There are several alternative formulations for adaptive morphological operators. Adaptive morphological operators can be defined using the notion of impulse functions [START_REF] Verdú-Monedero | Anisotropic morphological filters with spatially-variant structuring elements based on imagedependent gradient fields[END_REF], without explicit use of the adjunction property and then the morphological opening and closing are computed directly without resorting to compositions of the erosion and dilation, which corresponds just to spatially-variant counterpart of the opening [START_REF] Barron | Hopf-lax-type formula for u t + h(u, du) = 0[END_REF]. Here we adopt another formulation based on the composition of adjoint operators in a quite general setting and which is easily used in our case.

In this work, the adaptive structuring elements change their shape and orientation according to the edges of the objects contained in the image by means of an orientation vector field. The orientation vector field is defined in all pixels of the image and can provide only one orientation at each pixel (single orientation estimation methods) or the main orientations existing at that pixel (multiple orientation estimation methods). The first group of methods shows excellent performance in scenarios where there is only one dominant orientation but does not consider that a pixel may have associated several predominant orientations, as crossing lines (X-junction), corners (L-junctions) and junctions (Y-junctions) [START_REF] Knutsson | Representing local structure using tensors[END_REF]. These methods are usually based on the image gradient and provide the orientation by averaging its values. Some of these methods are, e.g., the local structure tensor (LST) [START_REF] Knutsson | Representing local structure using tensors[END_REF], principal component analysis (PCA) [START_REF] Mardia | Directional Statistics[END_REF], the average squared gradient (ASG) [START_REF] Kass | Analyzing oriented patterns[END_REF] and its regularization, the average squared gradient vector flow (ASGVF) [START_REF] Verdú-Monedero | Spatially-variant directional mathematical morphology operators based on a diffused average squared gradient field[END_REF]. For sake of clarity, some of them are shown in Fig. 1. Note that the LST method, PCA method and the ASG method provide equivalent single orientation vector fields [START_REF] Rieger | A systematic approach to nd orientation representation[END_REF].

The second group of orientation estimation methods considers more than one orientation existing at each pixel. These methods are mainly based on a bank of filters, see, e.g. [START_REF] Perona | Deformable kernels for early vision[END_REF][START_REF] Bigün | N-folded symmetries by complex moments in gabor space and their application to unsupervised texture segmentation[END_REF][START_REF] Simoncelli | Steerable wedge filters for local orientation analysis[END_REF]. A visual comparison between single orientation and multiple orientation estimation method can be observed in Fig. 2. It is important to note that the orientation provided by single orientation estimation methods is the local average of the orientations existing at each pixel of the image. On the other hand, multiple orientation estimation methods deal independently each one of the existing orientations, since these methods are more complex and can model this situation.

The aim of this paper is to provide adaptive morphological filters whose structuring elements are spatially-variant based on the information given by a multiple orientation vector field. To this end, the paper is organized as follows: after this introduction, Section 2 contains the theoretical part of the paper. Firstly, in Section 2.1 the proposed framework to estimate multiple orientations is detailed. Then, in Section 2.2, spatially-variant morphological operators are formulated in the general case, and in Section 2.3, when flat adaptive structuring elements are used. Later, Section 2.4 addresses the definition of the spatially-variant adaptive structuring elements proposed in this work. We also formulate the corresponding metric structuring function and the Hamilton-Jacobi PDE associated to those operators. Results of the proposed filters are shown in Section 3, as well as the comparison with morphological bilateral operators and filters based on a single orientation vector field. Finally, Section 4 closes the paper with the conclusions.

Methodology

Multiple orientation estimation framework

The orientation vector field considered in this work is based on a decomposition of the information of the contours by a bank of orientated linear openings, as shown in Fig. 3. Let f (x) : E → R be a gray-level image, where the support space is E ⊂ Z 2 and the pixel coordinates are given by x ∈ E. The edges of the objects in f (x) are provided in g(x) by an edge detector method (e.g. thresholded gradient [START_REF] Gonzalez | Digital Image Processing[END_REF] or Canny method [START_REF] Canny | A computational approach to edge detection[END_REF]).

The contours are then decomposed by means of a bank of filters. In our approach, these filters are directional openings γ L θ i ,l [START_REF] Soille | Morphological Image Analysis: Principles and Applications[END_REF]. The directional opening of g(x) by a linear and symmetric structuring element (SE) of length l and direction θ i , L θ i ,l , is defined as the directional erosion of g by L θ i ,l followed by the directional dilation with the same flat structuring element:

γ L θ i ,l (g)(x) = δ L θ i ,l ε L θ i ,l (g) (x), (16)
where the definitions of the directional erosion and dilation of f by L θ i ,l are, respectively,

ε L θ i ,l ( f )(x) = h∈L θ i ,l { f (x + h)} , (17)
δ L θ i ,l ( f )(x) = h∈L θ i ,l { f (x -h)} . (18)
The proposed orientation model is based on a decomposition of the contour information by families of linear openings, {γ L θ i ,l } i∈I , according to a particular discretization of the orientation space {θ i } i∈I . In the next step of the proposed method, a filtering is performed at each one of the directional openings (depicted as H σ in Figure 3). The filtering extends the orientation information and reduces angle mismatches due to noise. The kernel H σ is the sampling of a Gaussian low-pass filter, where σ is the spatial standard deviation of the filter.

Once the directional openings have been filtered, the directional signature at pixel x is defined as the gathering of all responses gθ i (x), i.e.,

s x;l (i) = gθ i (x), (19)
providing at each pixel an unidimensional signal over the discrete angles θ i . Then, in order to determine its peaks, s x;l (i) is interpolated using cubic b-splines [START_REF] Unser | B-spline signal processing: Part I -Theory; Part II -Efficient design and applications[END_REF]:

ŝx;l (θ) = N i=1 s x;l (i) b 3 (θ -θ i ), (20)
ŝx;l (θ) becoming a continuous and differentiable signal and θ being a continuous variable denoting the angle. Note that we are interested in the orientation of the contours and not in the direction, this is achieved by the symmetry of the orientated structuring elements used in the openings, consequently ŝx;l (θ) is a periodic signal, whose period is 180 degrees. The peaks of ŝx;l (θ) are found by searching the angles θ p where the first derivative equals zero and checking that the second derivative is negative at these angles. Only those angles θ p whose peak value is greater than a given threshold will be considered. These maxima correspond to the multiple orientations existing at pixel x. Finally, collecting all the orientations estimated at all the pixels in the image provides the multidimensional vector field θ(x).

Figure 4 shows the images and signals involved in the multiple orientation estimation framework. In this visual example, the length of the orientated linear structuring element is l = 9. When dealing with discrete images, it is important to remember the effects of discretization. As described in [START_REF] Verdú-Monedero | Spatially-variant directional mathematical morphology operators based on a diffused average squared gradient field[END_REF], the angular resolution of a structuring element of length l is ∆ θ = 90 l-1 degrees, therefore the angles that can be used are

- f © Edge detector g - - - © γ L θ 0 ,l © γ L θ 1 ,l © γ L θ N-1 ,l - - - g θ 0 g θ 1 g θ N-1 © H σ © H σ © H σ - - - gθ 0 gθ 1 gθ N-1
θ i = i ∆ θ , i ∈ I = [0, N -1], with N = 2(l -1).
It is important to remark that a long structuring element allows for a larger angular resolution (i.e., more directions) but the structures to be detected have to be bigger. On the other hand, a smaller structuring element offers fewer directions but it allows get into small details in the image. In this example, the number of branches in the bank filter is N = 16, the angular resolution is ∆ θ = 11.25 degrees and the spatial standard deviation of the Gaussian low-pass filter is σ = 5. Fig. 4(z)-Fig. 4(ab) show the directional signature for three selected pixels in Fig. 4(a), where the detected maxima in the directional signature correspond to the multiple orientations existing at those pixels.

Abstract formulation for spatially-variant morphological operators

As discussed above, morphological operators are classically defined for images supported on Euclidean spaces. Recent works have extended mathematical morphology for real valued images whose support space is a Riemannian manifold [START_REF] Angulo | Riemannian mathematical morphology[END_REF], or more generally, a length space [START_REF] Angulo | Proc. of the ISMM'15, 12th International Symposium on Mathematical Morphology and Its Applications to Signal and Image Processing[END_REF][START_REF] Angulo | Proc. of the 5th Int. Conf. on Scale Space and Variational Methods in Computer Vision[END_REF]. Let us introduce a formulation which is compatible with Euclidean, Riemannian and length-space settings as well as with the adaptive approach of structuring elements. This abstract setting is based on the theory max-plus mathematics (also known as idempotent analysis [START_REF] Maslov | Méthodes opératorielles[END_REF][START_REF]Idempotent Analysis and Its Applications[END_REF][START_REF] Litvinov | Idempotent functional analysis: An algebraic approach[END_REF]).

Metric Maslov measure space. The theoretical foundations of Maslov idempotent measure theory [START_REF]Idempotent Analysis and Its Applications[END_REF] are based on replacing in the structural axioms of probability theory the role of the classical semiring S (+,×) = (R + , +, ×, 0, 1, ≤) of positive real numbers by the idempotent semiring: S (max,+) = ( R, max, +, -∞, 0, ≤). In this context, a change of the measure involves a consistent counterpart to the standard probability theory.

Let (X, d) be a (Hausdorff topological) metric space and let m be a Maslov idempotent measure on X, i.e., mapping from X in the max-plus semiring such that for every function f :

X → R, we have A ⊂ X, m f (A) = sup x∈A f (x). ( 21
)
The triple (X, d, m) is called a metric Maslov measure space. Admissible structuring function. A Maslov idempotent measurable function b : X × X → R defined in (X, d, m) is said to be an admissible structuring function if the following conditions are satisfied ∀x, y ∈ X,

• Nonpositivity and total mass inequality: show some of the low-pass filtered images gθ i for illustrative purposes. Fig. 4(z) -Fig. 4(ab) show the directional signature of three selected pixels P 1 , P 2 and P 3 depicted in Fig. 4(a) with a red dot. The values of s P j ;l (i), j = [1, 2, 3], are plotted with dots whereas the interpolated signals ŝP j ;l (θ) are plotted with continuous red lines. The detected maxima, which correspond to the multiple orientations existing at those pixels, are depicted with blue circles. The threshold considered to decide if a peak is a maximum is the 50% of the maximum peak value.

m (b(x, •)) = sup y∈X b(x, y) ≤ 0 ⇔ b(x, y) ≤ 0. ( 22
) (a) f (x) (b) g(x) (c) g θ 0 (x) (d) g θ 1 (x) (e) g θ 2 (x) (f) g θ 3 (x) (g) g θ 4 (x) (h) g θ 5 (x) (i) g θ 6 (x) (j) g θ 7 (x) (k) g θ 8 (x) (l) g θ 9 (x) (m) g θ 10 (x) (n) g θ 11 (x) (o) g θ 12 (x) (p) g θ 13 (x) (q) g θ 14 (x) (r) g θ 15 (x) (s) gθ 0 (x) (t) gθ 1 (x) (u) gθ 2 (x) (v)
• Completeness (or conservative):

m (b(x, x)) = 0 ⇔ b(x, x) = 0. ( 23
)
This axiomatic formulation of the notion of admissible structuring function provides us the minimal mathematical requirements to use the function in a pair of adjoint dilation and erosion. In fact, as the name implies, the two axioms are the counterpart of those of a heat kernel in a measure metric space.

Dilation and Erosion operators on (X, d, m). We have now the ingredients to introduce the pair of dilation and erosion for any image f according to b. Given an admissible structuring function b(x, y) in (X, d, m), the dilation and erosion of a function f : X → R by b are given respectively by

δ b ( f )(x) = sup y∈X { f (y) + b(x, y)} , (24)
ε b ( f )(x) = inf y∈X { f (y) -b(y, x)} . ( 25
)
Both operators are increasing. In addition, the non-positivity and completeness of b(x, y) imply that the dilation is extensive and commutes with supremum, and the erosion is anti-extensive and commutes with the infimum, i.e., for a family of functions f i : X → R, i ∈ I, and any admissible structuring function, one has ∀x ∈ X

f i (x) ≤ δ b ( f i )(x); and δ b        i f i        (x) = i δ b ( f i ) (x), f i (x) ≥ ε b ( f i )(x); and ε b        i f i        (x) = i ε b ( f i ) (x).
The previous properties are naturally required for any dilation and erosion, even if they are unrelated between them.

In addition, we can easily check that the pair (ε b , δ b ), defined with the convention of change of sign in the convolution and symmetric admissible structuring function,

• are dual by involution, i.e., for any function f (x) and ∀x ∈ X, one has that

δ b ( f )(x) = -ε b (-f )(x);
• forms an adjunction, i.e., for any two functions f and g on (X, d, m), the pair (ε b , δ b ) satisfy that ∀x ∈ X

δ b ( f )(x) ≤ g(x) ⇔ f (x) ≤ ε b (g)(x).
Consequently, their composition leads to the opening and closing of f according to the admissible structuring function b, given respectively by:

γ b ( f )(x) = δ b • ε b ( f )(x) = sup z∈X inf y∈X { f (y) -b(y, z) + b(z, x)} , (26)
ϕ b ( f )(x) = ε b • δ b ( f )(x) = inf z∈X sup y∈X { f (y) + b(z, y) -b(x, z)} . ( 27
)
More precisely, their construction by adjunction property involves that the opening (26) (resp. the closing ( 27)) can be again rewritten as a maximal lower envelope of structuring functions (resp. minimal upper envelope of negative symmetric structuring functions), i.e.,

γ b ( f ) = b(x, y) + α | (x, y, α) ∈ X × X × R, b(x, y) + α ≤ f , (28)
ϕ b ( f ) = -b(y, x) + α | (x, y, α) ∈ X × X × R, -b(y, x) + α ≥ f , (29)
and therefore they are increasing idempotent and anti-extensive (resp. extensive) operators. Remarkably, the symmetry of the admissible structuring function is not a necessary condition for the adjunction. Nevertheless, in the case of symmetry, i.e., b(x, y) = b(y, x), the formulation is obviously simplified.

Adaptive flat morphological operators

In the case of adaptive flat morphological operators in the Euclidean space E, the admissible structuring function b(x, y) is associated to a space-variant adaptive structuring element, denoted by A(x). The mapping A assigns a possibly different subset of E to each point x of space E according to local features of the image, such that the corresponding admissible structuring function is defined as

b(x, y) = 0 if y ∈ A(x), -∞ if y ∈ A c (x). ( 30
)
Expressions of operators ( 24) and ( 25) are therefore simplified to obtain the adaptive flat dilation and erosion of f by A(x) as follows:

δ A(x) ( f )(x) = y∈A T (x) f (y), (31)
ε A(x) ( f )(x) = y∈A(x) f (y). ( 32
)
where the transposed set A T (x) is defined by the relationship

y ∈ A T (x) ⇐⇒ x ∈ A(y), (33)
or using the admissible structuring function:

y ∈ A T (x) if b(y, x) = 0.
The operators δ A(x) and ε A (x) are adjunct once the same structuring element mapping A(x) is used [START_REF] Roerdink | Adaptivity and group invariance in mathematical morphology[END_REF]. Hence, the adaptive flat opening and closing can be defined, respectively, as

γ A(x) ( f ) = δ A(x) • ε A(x) ( f ) = Cyl α (x) | Cyl α (x) ≤ f , (34)
ϕ A(x) ( f ) = ε A(x) • δ A(x) ( f ) = Cyl T α (x) | Cyl T α (x) ≥ f , . (35)
where Cyl α (x) is a cylinder of base A(x) and height α and Cyl T α (x) is the complement of a cylinder of base A T (x) and height α. In addition, the adjunction property allows us to make up more complex filters by means of combining adaptive openings and closings, providing for instance sequential filters, which have shown excellent results to restore images corrupted by dark and bright artefacts [START_REF] Soille | Morphological Image Analysis: Principles and Applications[END_REF]. More precisely, in this paper we used the adaptive close-open filter, i.e.,

CO A(x) ( f )(x) = (ϕ A(x) • γ A(x) )( f )(x), (36)
and the open-close filter, i.e.,

OC A(x) ( f )(x) = (γ A(x) • ϕ A(x) )( f )(x), (37)
which remove small structures while keeping sharp edges of the remaining ones. It is important to remember that the adaptive structuring elements A are computed in a way that near the edges of structures the image is filtered preserving these edges and minimizing inter-region filtering whereas far from the edges the structuring elements are designed to maximize the intra-region filtering.

Sets of ellipses as adaptive structuring elements

Let us focus on two-dimensional images: E ⊂ R 2 . We consider in this study an elliptical shape kernel E θ,a,b to be used by the proposed spatially-variant adaptive filters. In the case of orientation vector fields that take into account only a single orientation at each pixel, the multiscale structuring element is defined as

A t (x) = E θ(x),a t (x),b t (x) , (38)
where θ(x), a t (x) and b t (x) are, respectively, the orientation, major semi-axis and minor semi-axis of the ellipse E θ,a,b centered at pixel x. The value of θ(x) is given by the orientation vector field, whereas the values of a t (x) and b t (x) can be provided by the absolute value of this vector field or also by the distance to the nearest edge, and a scale parameter t, which is typically related to the size of the semi-axis.

In the case of considering a multiple orientation vector field, the adaptive multi-scale structuring element at pixel x is given by the set union of multiple ellipses of same shape/size

A t (x) = 1≤i≤M x E θ i (x),a t (x),b t (x) , (39)
where θ i (x) corresponds to each one of the M x detected orientations at pixel x. Fig. 5 shows an example of an image with structuring elements at some pixels according to previous definitions. In Fig. 5(a) the elliptical structuring elements are provided using the single orientation vector field of Fig. 2(a), whereas Fig. 5(b) shows the multipleelliptical structuring elements considering the proposed multiple orientation vector field (shown in Fig. 2(b)).

From the viewpoint of implementation, it is easy to see that the dilation and the erosion by the proposed adaptive structuring elements as the union of a set of ellipses can be computed in parallel for each ellipse and then, combined by supremum or infimum, i.e., from [START_REF] Perona | Scale-space and edge detection using anisotropic diffusion[END_REF],

δ A t (x) ( f )(x) = δ i∈M E θ i (x),at (x),bt (x) ( f )(x) = i δ E θ i (x),at (x),bt (x) ( f )(x), ( 40
)
ε A t (x) ( f )(x) = ε i∈M E θ i (x),at (x),bt (x) ( f )(x) = i ε E θ i (x),at (x),bt (x) ( f )(x). (41)

Elliptical structuring functions and metric Hamilton-Jacobi PDE

The previous flat adaptive morphological operators can be related to a family of structuring functions and more theoretically to a metric partial differential equation. The goal of this part is to outline such a preliminary framework which will developed in ongoing work.

Let us initially write the centered ellipse E in R 2 as the quadratic form

E = x : x T Sx ≤ 1 , (42)
where x ∈ R 2 is the vector referring the coordinate axes and S is a symmetric positive definite 2 × 2 matrix, which can be seen as the shape matrix. More precisely, the eigenvalues of S, λ 1 ≥ λ 2 , are related to the semi-minor and semi-major axes of the ellipse:

a = λ -1/2 2 , b = λ -1/2 1 ; ( 43
)
and the angle of the first eigenvector with axis x corresponds to θ in our notation. The ellipse centered at point y is just given by x : (xy) T S(xy) ≤ 1 . The reader can easily identify the expression of the squared anisotropic Euclidean distance, well known in statistics as the Mahalanobis distance [START_REF] Mahalanobis | On the generalised distance in statistics[END_REF]:

d Σ (x, y) = (x -y) T Σ -1 (x -y), (44)
where the covariance matrix is the inverse of the elliptical shape matrix, i.e., Σ = S -1 . In other words, each ellipse will provide an anisotropic metric which can be then used similarly to the Euclidean distance in the parabolic structuring function p t (x). Thus, we introduce the multiscale anisotropic quadratic structuring function of shape Σ as:

p t; Σ (x) = - 1 2t x T Σ -1 x. ( 45
)
Because E ⊂ R 2 endowed with the metric distance d Σ is a length space, we may straightforwardly use the theory of morphological PDE on length spaces [START_REF] Angulo | Proc. of the ISMM'15, 12th International Symposium on Mathematical Morphology and Its Applications to Signal and Image Processing[END_REF] to this spatially-invariant anisotropic case. First, we introduce the metric subgradient of f at x defined as

|∇ -f |(x) = lim sup y→x [ f (y) -f (x)] - d Σ (x, y) = lim sup y→x [ f (x) -f (y)] + d Σ (x, y) , ( 46
)
where a + = max(a, 0) and a -= max(-a, 0). The expression |∇ -f |(x) is called descending slope since it measures the downward pointing component of f near x: local variation of f taking into account only values less than f (x). Second, we set the morphological PDE on the metric space (E, d Σ ) as the following initial-value Hamilton-Jacobi first-order equation:

         ∂ ∂t u(x, t) ± 1 2 |∇ -u(x, t)| 2 = 0, in E × (0, +∞), u(x, 0) = f (x), in E, (47)
where the initial condition f : E → R is a continuous bounded function. Then, the semigroup solutions of (47) are given by the metric Hopf-Lax-Oleinik formulas [START_REF] Angulo | Proc. of the ISMM'15, 12th International Symposium on Mathematical Morphology and Its Applications to Signal and Image Processing[END_REF]:

u(x, t) = sup y∈E      f (y) - d 2 Σ (x, y) 2t      = ( f ⊕ p t; Σ )(x) (for -sign), ( 48
) u(x, t) = inf y∈E      f (y) + d 2 Σ (x, y) 2t      = ( f p t; Σ )(x) (for + sign). ( 49
)
Coming back to our spatially-variant framework, each ellipse i at x involves a scaled local metric associated to the shape matrix S(i; x):

E θ i (x),a t (x),b t (x) → 1 2t S(i; x),
in such a way that, associated to the set of ellipses at point x, we can introduce the following admissible structuring function:

p t (x, y) = - 1 2t M x i=1 (x -y) T S(i; x)(x -y). ( 50
)
Function p t (x, y) is the counterpart of flat set A t (x) given in [START_REF] Perona | Scale-space and edge detection using anisotropic diffusion[END_REF]. Using this admissible structuring function (50), the corresponding adaptive dilation and erosion:

δ p t ( f )(x) = sup y∈X        f (y) - 1 2t M x i=1 (x -y) T S(i; x)(x -y)        , (51)
ε p t ( f )(x) = inf y∈X          f (y) - 1 2t M y i=1 (y -x) T S(i; y)(y -x)          , (52)
lead to anisotropic multiple orientation unflat operators that behave more regularly than the flat ones. In comparison to the spatially-invariant anisotropic case, since at each x the metric is different, i.e., S(i; x) S(i; y), the term (xy) T S(i; x)(xy) lacks of symmetry and therefore does not lead to a distance between x and y. We can nevertheless introduce a local pseudo-metric gradient:

|∇ - x f |(x) = lim sup y→x [ f (y) -f (x)] - M x i=1 (x -y) T S(i; x)(x -y) 1/2 , (53)
which can be used to formulate the following inhomogeneous initial-value first-order differential equation problem:

         ∂ ∂t u(x, t) ± 1 2 |∇ - x u(x, t)| 2 = 0, in E × (0, +∞), u(x, 0) = f (x), in E. (54)
There is not a viscous solution of (54) under the form of an analytic expression. However, we conjecture that an appropriate numerical solution of this PDE model can provide significant results.

Results

In this section, the proposed spatially-variant adaptive filters based on a multiple orientation vector field (MOVF) are compared to spatially-invariant morphological filters, spatially-variant adaptive filters based on single orientation vector field (SOVF) and adaptive bilateral morphological filters. In order to provide a fair comparison, the different operators are applied to synthetic and real images in several application scenarios.

Spatially-invariant operators vs spatially-variant operators

Firstly, in order to show the advantages of spatially-variant morphological filters, the spatially-invariant morphological filters are compared to their respective spatially-variant counterparts considering a single orientation vector field (given by the ASGVF [START_REF] Verdú-Monedero | Spatially-variant directional mathematical morphology operators based on a diffused average squared gradient field[END_REF]) and the multiple orientation vector field described in Section 2.1. The input image used in this comparison is a 256 × 400 grey level chequerboard pattern. For the spatially-invariant operators, the structuring element b is a disk of 11 pixel of diameter, whereas for the spatially-variant operators the structuring elements A(x) are based on ellipses which change their shape and orientation according to the orientation vector field. Specifically, the elliptical adaptive structuring elements E θ(x),a(x),b(x) are designed as follows: the major semi-axis is a = 11 pixels long and the minor semi-axis is b = 1 pixel long near the edges and the elliptical structuring elements change gradually their eccentricity until both semi-axes are 6 pixels long in homogeneous areas far from the edges. On the other hand, the operators based on the multiple orientation vector field use the same elliptical function but the adaptive structuring elements are formed by the union of M single orientated ellipses, where M is the number of main orientations detected at each pixel. Fig. 6 displays the spatially-invariant erosion, dilation, opening and closing as well as the spatially-variant counterparts provided by a single and a multiple orientation vector field. The first row shows some structuring elements which are orientated according to the respective vector fields. Fig. 6(d)-(f) show the erosion obtained by each structuring element (invariant, based on a single orientation and based on multiple orientations). Fig. 6(g)-(i) show the analogue results for dilation. Fig. 6(j)-(l) and Fig. 6(m)-(o) show, respectively, the openings and closings. According to the results, the spatially-invariant operators can not preserve the image structures since the structuring elements always keep the same shape and orientation. The spatially-variant operators based on a single orientation show good results preserving the contours with only one associated orientation but these operators fail when the contours possess multiple orientation like corners or bifurcations. Finally, the spatially-variant operators based on the multiple orientation vector field preserve the image structures in corners, crossing lines and junctions better than operators based on a single orientation because the structuring elements can adapt to these situations with multiple orientations. [START_REF] Huynh-Thu | Scope of validity of psnr in image/video quality assessment[END_REF] and SSIM [START_REF] Wang | Image quality assessment: from error visibility to structural similarity[END_REF] of the visual outcomes in Fig. 7 considering Gaussian noise. This analysis compares adaptive morphological filters based on a single orientation vector fields (SOVF), morphological bilateral filters and adaptive morphological filters based on a multiple orientation vector field (MOVF).

Spatially-variant morphology in denoising applications

In this comparison, the spatially-variant operators are studied in a denoising application. The aim is to evaluate the ability of these operators to reduce the noise while preserving the image contours. The spatially-variant approaches used in this comparison are: spatially-variant operators using the local structure tensor (LST) [START_REF] Landström | Adaptive morphology using tensor-based elliptical structuring elements[END_REF], spatially-variant operators based on the multiple orientation vector field (MOVF) as was obtained in Section 2.1, and adaptive morphological bilateral filters [START_REF] Angulo | Morphological bilateral filtering[END_REF]. The structuring elements used by the operators based on LST and MOVF are the same that were used in the previous comparison. The bilateral approach uses a structuring element based on a disk of 11 pixel of diameter. The filters evaluated are the adaptive sequential morphological filter formed by a closing followed by an opening CO A(x) ( f )(x), the adaptive sequential filter formed by a opening followed by an closing OC A(x) ( f )(x) and the average of the previous operators, the averaged alternate filter (AAF), Ξ A (x) ( f )(x), which presents skilful properties to remove Gaussian and impulsive noise [START_REF] Soille | Morphological Image Analysis[END_REF]. These filters use predefined shapes as structuring elements unlike other methods, as i.e. general adaptive neighbourhoods [START_REF] Debayle | Spatially adaptive morphological image filtering using intrinsic structuring elements[END_REF] or morphological amoebas [START_REF] Lerallut | Image filtering using morphological amoebas[END_REF], which impose less restrictions on the shape of the structuring elements. Note that the proposed filters for image denoising are non iterative, unlike, e.g. anisotropic diffusion [START_REF] Perona | Scale-space and edge detection using anisotropic diffusion[END_REF], based on the iterative approximation of the solution of a PDE.

Figure 7 shows the visual outcomes of this comparison in a scenario with Gaussian noise. The input image is a 194 × 152 real image of a building corrupted with Gaussian noise whose variance is σ = 0.01. Numerical results of this comparison have been gathered in Table 1 in terms of the peak signal-to-noise ratio (PSNR) (see, e.g. [START_REF] Huynh-Thu | Scope of validity of psnr in image/video quality assessment[END_REF]) and the structural similarity index (SSIM) [START_REF] Wang | Image quality assessment: from error visibility to structural similarity[END_REF]. As can be seen, the proposed adaptive filters based on a multiple orientation vector field achieve the best results reducing the image noise while preserving the contours with multiple orientations compared to the space-variant filters based on a single orientation vector field and the morphological bilateral operators. The key of this improvement is the use of a combination of elliptical structuring elements according to the multiple orientations of the image structures.

Figure 8 shows the comparison of spatially-variant operators in a scenario with impulsive noise. The input image is the same as in the previous case, but now the 5% of its pixels has been corrupted by impulsive noise. Table 2 gathers the numerical results in terms of PSNR and SSIM. Once again, the filters based on MOVF provide the best results since the structuring elements based on multiple orientations can adapt their shape much better to the existing edges. As can be seen, the bilateral filters show the poorest results removing impulsive noise.

Study of the influence of the size of structuring elements on spatially-variant operators

One of the most interesting applications of spatially-variant filters consists in using orientated structuring elements to erode, dilate, remove or link only the image structures with a particular orientation feature. An example of this idea can be found in Figure 9, where orientated closings of different sizes have been used to link elongates structures of a cell image. In addition, the results are compared to invariant and bilateral closings in order to illustrate the advantages of the spatially-variant operator based on the orientations in this kind of applications. [START_REF] Huynh-Thu | Scope of validity of psnr in image/video quality assessment[END_REF] and SSIM [START_REF] Wang | Image quality assessment: from error visibility to structural similarity[END_REF] of the visual outcomes in Fig. 8 considering impulsive noise. This analysis compares adaptive morphological filters based on a single orientation vector fields (SOVF), morphological bilateral filters and adaptive morphological filters based on a multiple orientation vector field (MOVF).

The first row of Figure 9 shows an invariant closing with circular structuring elements of r = 6 pixels of radius, a bilateral closing based on circular structuring elements of r = 6 pixels of radius and a spatially-variant closing based on MOVF with elliptical structuring element of a = b = 6 pixels of major and minor semi-axis in homogeneous areas and a = 6 pixel of major semi-axis and b = 2 pixel of minor semi-axis near the image structures. The second row shows an invariant closing and a bilateral closing with circular structuring elements of r = 12 pixels and an orientated closing with elliptical structuring elements of a = b = 12 pixels in homogeneous areas and a = 12, b = 2 in pixels belonging to the image structures. Finally, the third row displays invariant and bilateral closings with circular structuring elements of r = 18 pixels and an orientated closing with elliptical structuring elements of a = b = 18 pixels in homogeneous areas and a = 18, b = 2 in image structures. As observed in Fig. 9, the invariant and bilateral openings can not adapt to the image contours yielding deformations in the elongated structures. On the other hand, the closing based on MOVF can adapt much better to the elongated objects preserving the structures and removing the discontinuities.

Conclusions

This work has presented a novel formulation and implementation of adaptive spatially-variant morphological filters. The proposed filters use a multiple orientation vector field to adapt the shape and orientation of the structuring elements to the image structures. The numerical and visual outcomes show the excellent performances of the proposed filters and illustrate the ability of the proposed spatially-variant filters to reduce artefacts and noise in images while the main structures with multiple orientation (e.g. bifurcation, crossover or junctions) are preserved.

( f )(x) (e) ε A(x) ( f )(x) considering SOVF (f) ε A(x) ( f )(x) considering MOVF (g) δ b ( f )(x) (h) δ A(x) ( f )(x)

Figure 1 :Figure 2 :

 12 Figure 1: Single orientation vector fields (SOVF): a) image gradient, b) average squared gradient (ASG) [19], c) average squared gradient vector flow (ASGVF) [20].

Figure 3 :

 3 Figure 3: Block diagram of the multiple orientation estimation framework.

Figure 4 :

 4 Figure 4: Estimation of the multiple orientation vector field. (a) Input image f (x), (b) contours of the input image given by the absolute value of the gradient, Fig. 4(c) -Fig. 4(r) g θ i with the decomposition of the contours by directional openings using an orientated linear structuring element of length l = 9. The value of l determines the number of branches, N = 16, and the angular resolution, ∆ θ = 11.25 degrees. Fig. 4(s) -Fig. 4(y)show some of the low-pass filtered images gθ i for illustrative purposes. Fig.4(z) -Fig.4(ab) show the directional signature of three selected pixels P 1 , P 2 and P 3 depicted in Fig.4(a) with a red dot. The values of s P j ;l (i), j = [1, 2, 3], are plotted with dots whereas the interpolated signals ŝP j ;l (θ) are plotted with continuous red lines. The detected maxima, which correspond to the multiple orientations existing at those pixels, are depicted with blue circles. The threshold considered to decide if a peak is a maximum is the 50% of the maximum peak value.

Figure 5 :

 5 Figure 5: Comparison of the elliptical structuring elements A t (x) provided by the single orientation vector field (SOVF) of Fig.2(a), and the elliptical structuring elements A t (x) provided by the multiple orientation vector field (MOVF) of Fig. 5(b).

  (a) Spatially-invariant SE b (b) Spatially-variant SE A(x) with SOVF (c) Spatially-variant SE A(x) with MOVF (d) ε b

Figure 6 :Figure 7 :

 67 Figure 6: Comparison of spatially-invariant morphological operators versus their spatially-variant counterparts. First row shows the spatiallyinvariant structuring element b in (a), the spatially-variant structuring element A(x) provided by a single orientation vector field in (b), and provided by a multiple orientation vector field in (c). First column contains (d) the spatially-invariant erosion ε b ( f )(x), (g) dilation δ b ( f )(x), (j) opening γ b ( f )(x) and (m) closing ϕ b ( f )(x). Second and third columns contain (e)-(f) the spatially-variant erosion ε A(x) ( f )(x), (h)-(i) dilation δ A(x) ( f )(x), (k)-(l) opening γ A(x) ( f )(x) and (n)-(o) closing ϕ A(x) ( f )(x) considering, respectively, single and multiple orientation vector fields.

Figure 8 :

 8 Figure 8: Comparison of adaptive morphological filters. The first row shows the input image where the 5% of its pixels has been corrupted by impulsive noise.The second row shows the filtered images using operators based on a single orientation vector field (SOVF), the third row contains the output of these filters considering a multiple orientation vector field (MOVF) and the fourth row shows the output of these filters considering the morphological bilateral approach. First column contains the outcomes of the adaptive close-open filters CO A(x) ( f )(x), second column shows the results of the adaptive open-close filters OC A(x) ( f )(x), and third column shows the alternate filters Ξ A(x) ( f )(x).

Figure 9 :

 9 Figure 9: Comparison of closings with different sizes. (a) Input image: 256 × 256 gray level image of a cell. First column shows the results of the spatially-invariant closing ϕ b ( f )(x) using disk with radius r equal to (b) 6 pixels, (e) 12 pixels and (h) 18 pixels. The second and third columns show, respectively, the results of the morphological bilateral closings and the spatially-variant closings considering a MOVF (the size of the adaptive structuring elements is detailed for each case in Section 3.3.

Table 1 :

 1 Quantitative analysis in term of PSNR

			PSNR(dB) SSIM(%)
		Input Noisy image	18.23	68.75
		SOVF	18.41	63.59
	Close-Open filter: CO A(x) ( f )(x)	Bilateral	18.30	63.50
		Proposed MOVF	20.91	77.42
		SOVF	20.14	67.07
	Open-Close filter: OC A(x) ( f )(x)	Bilateral	20.20	70.11
		Proposed MOVF	21.39	76.66
		SOVF	20.72	70.38
	AAF: Ξ A(x) ( f )(x)	Bilateral	20.94	71.84
		Proposed MOVF	22.48	80.66

Table 2 :

 2 Quantitative analysis in term of PSNR

			PSNR(dB) SSIM(%)
		Input Noisy image	19.01	70.42
		SOVF	18.75	70.13
	Close-Open filter: CO A(x) ( f )(x)	Bilateral	18.88	65.50
		Proposed MOVF	19.52	77.73
		SOVF	19.07	73.33
	Open-Close filter: OC A(x) ( f )(x)	Bilateral	28.20	65.11
		Proposed MOVF	19.92	79.37
		SOVF	21.85	74.94
	AAF: Ξ A(x) ( f )(x)	Bilateral	20.94	71.84
		Proposed MOVF	22.96	81.45


Abdelhadi Belfadel
email: abdelhadi.belfadel@univ-lyon2.fr

Jannik Laval
email: jannik.laval@univ-lyon2.fr

Chantal Bonner Cherifi
email: chantal.bonnercherifi@univ-lyon2.fr

Néjib

Nejib Moalla
email: nejib.moalla@univ-lyon2.fr

Towards service orchestration through software capability profile

Keywords: open source application, software reuse, service orchestration, API, ISO 16100, capability profile, enterprise application integration

published or not. The documents may come

Introduction

Small and Medium-Sized Enterprises (SMEs) are the most common firms in many countries. In Europe (EU28), 23 million SMEs employ more than 90 million people. They represented, in 2015, 99.8% of all enterprises [START_REF] Muller | ANNUAL REPORT ON EUROPEAN SMEs 2015/2016 SME recovery continues[END_REF], and they are increasingly doing open innovation to bring ideas in the market to improve productivity, increase competitiveness and facilitate entrance to new markets [START_REF] Boldrini | The journey in Open Innovation to develop a SME: A longitudinal case study in a French robotics company[END_REF]. In order to do so, SMEs need to explore new solutions and integrate new functionalities quickly. This results in prototyping new business needs in short time period without cost or engagement with a software vendor. But in most cases, SMEs operate under limited resources which restrict their innovativeness [START_REF] Boldrini | The journey in Open Innovation to develop a SME: A longitudinal case study in a French robotics company[END_REF]. High number of open source solutions results from the Factories of the Future (FoF) initiatives. This aims to develop the necessary key enabling technologies and help manufacturing enterprises to adapt to global competitive pressures.

Currently, the development of software applications is based on the reuse of existing functionalities instead of developing them from scratch [START_REF] Frakes | Software reuse research: status and future[END_REF][START_REF] Zibran | Useful, but usable? factors affecting the usability of apis[END_REF]. Application Programming Interfaces (APIs) are considered as the most commonly used entities supporting software reuse [START_REF] Shatnawi | Reverse engineering reusable software components from object-oriented apis[END_REF][START_REF] Frakes | Software reuse research: status and future[END_REF]. APIs provide an implemented, tested and high quality functionalities, and they increase software quality and reduce the effort spent on coding, testing and maintenance activities [START_REF] Zibran | Useful, but usable? factors affecting the usability of apis[END_REF].

In this context, we provide a framework to facilitate the appropriation of the open source applications and bring adequate solutions to SMEs. This framework consists of four steps as source code analysis, evaluation, servitization and orchestration model. In the source code analysis step, we analyze the source code to detect existing services and potential candidates (functionalities) to externalize. In the evaluation step, we qualify existing services of an open source application and elect reliable and trustworthy candidates. In the servitization step, we characterize and servitize the elected candidates in an automated process. Finally in the orchestration step, we propose an orchestration model for the externalized functionality to save the business logic offered by the open source application. For this purpose, we present in this paper one part of the proposed framework with a proof of concept applied on an open source application resulted from a FoF initiative (FITMAN1 ). Starting from the characterization of the functionalities done in a readable and standardized way. Then we provide an automated solution for the externalization of the characterized functionalities as REST (Representational state transfer) APIs for service orchestration. Our approach uses capability profile provided by ISO 16100 series which is a standardized methodology for interoperability of manufacturing software. As a result, we generate reusable components for service orchestration needs. This paper is structured as follows. Section 2 focuses on the related work and Section 3 presents an overview of some useful standards for our solving approach. Section 4 is dedicated to the proposed solution and Section 5 presents an implementation of the proposed solution applied on an open source application. Finally, conclusion and future works are drawn in section 6.

Related work

In this section, we discuss works related to source code analysis, software reuse and legacy to SOA migration.

Source code analysis & software reuse

Metrics are powerful support tools in software development and maintenance. They are used to assess software quality, to estimate complexity, cost and effort, to control and improve processes [START_REF] Patidar | Coupling and cohesion measures in object oriented programming[END_REF]. The metrics that are important to calculate reusability are related to inheritance, cohesion and coupling. In [START_REF] Patidar | Coupling and cohesion measures in object oriented programming[END_REF], the authors measure the association between numbers of classes, check the direct dependencies, indirect dependencies, IO dependencies, number of out and in metrics in object oriented programming. In [START_REF] Kambe | A method for analyzing and visualizing intermodule relations to support the reuse-based embedded software development[END_REF], the authors propose a method to display dependencies between modules in reuse-based embedded software development, and adding development management property data to each module in order to support developers to know which modules will be affected when some parts of the reused software are modified. Other authors in [START_REF] Kebir | Quality-centric approach for software component identification from objectoriented code[END_REF] identify components from object oriented source code based on quality-centric metrics.

Legacy to SOA evolution

In the literature, the concept of SOA is interpreted in many different ways. Different approaches to SOA migration are proposed. A brief overview of legacy to SOA evolution is reported by [START_REF] Asil A Almonaies | Legacy system evolution towards service-oriented architecture[END_REF] that divides the legacy to SOA evolution approaches into four categories: replacement, redevelopment, wrapping and migration. In [START_REF] Razavian | A systematic literature review on soa migration[END_REF], the authors report a systematic literature review of SOA migration approaches. They propose a reference model, called SOA migration frame of reference, that can be used for selecting and defining SOA migration approaches. In [START_REF] Asil | Towards a framework for migrating web applications to web services[END_REF], the authors outline a semi-automated approach to migrate dynamic legacy web applications to web services-based SOA applications by using two technologies, Service Component Architecture (SCA) and Service Data Object (SDO). They used a manual approach to identify the potential service within each function. Other authors propose a framework and guidelines for the identification of specific services from legacy code [START_REF] Alahmari | A service identification framework for legacy system migration into soa[END_REF]. Their approach focuses on defining the services based on a Model-Driven Architecture approach.

Standards

In order to reach service orchestration using functionalities of open source applications, we need to know more about the entities that have to inter operate. Two standards intend to provide this knowledge by offering a way to create profiles of the selected entities, ISO 15745 (Industrial automation systems and integration -Open systems application integration frameworks) [START_REF]Iso 15745, industrial automation systems and integration open systems application integration frameworks[END_REF] and ISO 16100 (Industrial automation systems and integration -Manufacturing software capability profiling for interoperability) [START_REF]2009 industrial automation systems and integration manufacturing software capability profiling for interoperability part 1: Framework[END_REF]. The ISO 15745 defines an Application Integration Framework (AIP) which is a set of elements and rules for describing integration models and application interoperability profiles as well as their component profiles, process profiles, information exchange profiles, and resource profiles. The standard defines also the technology specific elements and rules for describing both communication network profiles and the communication related aspects of device profiles based upon particular fieldbus technologies. The middle section of figure 1 shows the AIP, consisting of one process profile, one or more resource profiles, and one or more information exchange profiles. Underlying the AIP are the relevant integration models which represent the application requirements [START_REF] Kosanke | Enterprise and business processes-how to interoperate? the standards view[END_REF]. With its focus on shop floor application, figure 1 shows the next level of details for the resource profile consisting of communication, device, human, material and equipment profiles. On the other hand, the standard ISO 16100 targets the representation of a software capability profile [START_REF]2009 industrial automation systems and integration manufacturing software capability profiling for interoperability part 1: Framework[END_REF]. It specifies a framework for assessing the interoperability of a set of software products used in the manufacturing domain, and provides a method which is independent of a particular system architecture or implementation platform for constructing profiles of manufacturing software capabilities [START_REF] Belfadel | Capability Profile for Enterprise Application Integration[END_REF]. Figure 2 shows the concepts defined in the different parts of ISO 16100.

API Documentation

An API is the published interface and a service is the concrete implementation of an API running in the back-end. It is typically a black box, which means that source code is not publicly accessible. API documentation is very important for the successful adoption of an API. APIs expose data and services and should be designed with an interface that the consumer can understand. The documentation should help developers to learn the functionalities offered by an API and enable them to start using it quickly. The API document should provide all necessary information to developers or API consumers in a human-readable format and help them assess its suitability for use in their client app. It should provide information about its licensing policy and usage requirements-input and output parameters, message format, error messages, and more. Similarly, the API interface should be documented such that its interface can be parsed by a machine to generate client stubs and server-side skeleton code that can be further developed. To make API documentation effective, it should include the following aspects about the API [START_REF] Brajesh | API management : an architect's guide to developing and managing APIs for your organization[END_REF]: title, endpoint, method, URL parameters, message payload, header parameters, response code, error code. Many tools and technologies are available for API documentation. We can find RESTful API Modeling Language (RAML)2 , API Blueprint3 and Swagger4 (was renamed the OpenAPI Specification when it was donated to the Open API Initiative).

Contribution

As outlined in the previous sections, our goal is to help companies select the most suitable open source application, and its reusable components to meet their business requirements which is composed by user and service type tasks.

The final choice of reusing an open source application depends on the precision of the expression of the needs. The more the needs are precise, the more the selection of the open source application is easy. As a result, the company will choose the application which answers most in term of reuse to service tasks of the new business application. Figure 3 shows the proposed framework, composed by 4 main parts. The first step is the code extraction and analysis. In this step, we transform the extracted source code into a model, allowing us, with the help of visualization techniques, to detect the existing services and identify potential candidates (methods) to expose as a service. The second step is the Evaluation part. This step focuses on the technical aspect by applying some metrics helping to elect reliable candidate to externalize (next step process), and qualify existing services of the open source application to explore their capabilities, system properties, conditions of use and limits. All these informations are gathered in a single catalog for discovery, maintenance and reuse purpose. In the third step, we characterize the candidate functionality in a readable and standardized way, and an automatic process is applied to generate the API to be deployed on the Cloud. The last part represents the orchestration model generation. In this step, we generate an orchestration template when the candidate method belonging to the core of the application and depend on another service. An orchestration template is generated to not modify the business logic offered by the application. The originality of this work is to transform a servitized, semi-servitized or legacy application into SOA application. For (semi-)servitized applications, it allows to qualify, give visibility and secure existing services with APIs in order to ease the reuse. It provides also a way for semi-servitized applications to characterize the functionalities to expose, and automate the steps to reach the service.

For non-servitized applications, the goal is to come out with a full service application that facilitates its reuse. In this paper, we focus only on the third step of the proposed framework which is composed by the characterization and servitization steps (detailed in Figure 4). In order to reach our objective of the service orchestration, we have selected the framework offered by ISO 16100 for the characterization part because it focuses on the interfacing requirements for interoperability, instead of ISO 15745 which identifies a larger set of elements needed to support interoperability between application components. Our contribution is the proposal of an ISO 16100 capability template with its capability class described with XML Schema. We propose also an automated way to reach a reusable component based on OpenAPI Specification, which is one of the most popular API documentation framework. OpenAPI Specification provides standard, language-agnostic way of defining a REST API Interface, and allows the consumer to understand the capabilities of the REST API without any prior access to the service implementation code or network inspection [START_REF] Brajesh | API management : an architect's guide to developing and managing APIs for your organization[END_REF]. We expose in the following (section 4.1), the capability profile process as described in ISO 16100 standard. Then we propose in section 4.2, the steps to reach the API documentation from the capability profile allowing to get the desired API.

Capability profile process

First, we have to identify candidate methods to externalize and expose as an API. In this paper, we do not present this step. We will deal with it during our future work. In the following, we take the output of the evaluation step, which are candidate methods, and we apply the next step of the framework which is the characterization step allowing to get the ISO 16100 capability profile of the method. Each application is represented as an activity tree structure that is hierarchical. And an activity is considered as a software unit in the ISO 16100 specification. The interoperability of software units can be described in terms of their capabilities that are associated with the aspects of functionality, interface and structure. The profiling of a software unit involves the generation of a concise statement of capabilities enabled by the software unit in terms of the functions performed, the interfaces provided, and the protocols supported. The part of the concept of capability profile for software interoperability shown in figure 2 related to the capability profiling process is detailed in figure 5. A software unit to be profiled shall be analyzed and a template shall be filled to make a profile. In this work, we have formed a new capability class and a new capability template in XML Schema, helping to retrieve information needed to externalize a feature of an application. Figure 6 shows an example of informations contained in the specific part of a capability profile.

Capability profile to an API

Once the common and the specific part of a capability profile are filled, the difficulty resides on how to reach a service from this formal structure (xml file).

The solution that we propose is to transform the capability profile to an Ope-nAPI Specification, allowing to generate the interfaces of the new service. The following table 4.2 shows the correspondence to be carried out, and a proof of concept is presented in section 5 applied on an open source application.

Use case

In order to validate our approach, we applied characterization and servitization process on an application called Collaborative Asset Manager (CAM) from FIT- MAN 5 Project. The FITMAN-CAM app is a web-based, integrated platform for the management of virtualized Assets in the scope of service-oriented Manufacturing Ecosystems (the term asset represents any item of economic value owned by an Enterprise). This application offers CRUD operations of virtualized assets (Create, Read, Update, Delete) using the user interface, and exposes its own REST-based APIs to retrieve information about assets from database. For matter of reusing this application for new business requirements, there is a need to create assets without going through the user interface and orchestrate this action with other services. Our implementation of the servitization step helps to generate project skeleton in order to expose the REST-Based API of any functionality already characterized by the proposed ISO 16100 capability profile. The characterization step (which is done manually for now) of the create asset method gives the profile on the left of figure 7. The content of the capability profile reflect the signature of Java method public void createAsset(String name, String modelName, String ownerName). Once the profile filled, the next step is to upload the capability profile to our developed application, in order to transform it into an Open API Specification following the steps described in section 4.1. The generated Open API Specification is described using YAML, a data serialization standard. From this stage, we generate the server stubs and client SDKs, by using Swagger Codegen process. The last step is the implementation of the business side and deployment of the generated API on an API Manager running on Cloud to get a reusable component for service orchestration.

Conclusion and future work

In this paper, we have presented the characterization and servitization steps of the proposed framework with a proof of concept applied on a open source application. Starting from the characterization of a functionality done in a readable and standardized way, using a proposed ISO 16100 capability template with its capability class described with XML Schema. Then we provide an automated solution for the externalization of the characterized functionality as a REST-Based Application Programing Interface for service orchestration. As a result, we generate reusable components for service orchestration. As future work, we plan to focus on the source code analysis step. The aim of this step is to transform the source code of the open source application into a queryable model, and generate a visual to explore and qualify the existing services. The analysis step is followed by the evaluation step, where the use of metrics will help to elect reliable candidates to characterize and expose as presented in this work.

Acknowledgment

This paper presents work developed in the scope of the project vf-OS. This project has received funding from the European Unions Horizon 2020 research and innovation programme under grant agreement no. 723710. The content of this paper does not reflect the official opinion of the European Union. Responsibility for the information and views expressed in this paper lies entirely with the authors.

Fig. 1 .

 1 Fig. 1. Context of ISO 15745 [1]Fig.2. Context of ISO 16100[START_REF]2005 industrial automation systems and integration manufacturing software capability profiling for interoperability part 3: Interface services, protocols and capability templates[END_REF]

Fig. 3 .

 3 Fig. 3. Proposed Framework

Fig. 4 .

 4 Fig. 4. Servitization steps

Fig. 5 .Fig. 6 .

 56 Fig.5. Capability profiling process[START_REF]2003 industrial automation systems and integration manufacturing software capability profiling for interoperability part 2: Profiling methodology[END_REF]

Fig. 7 .

 7 Fig. 7. Application screen shot : Capability profile to Swagger

Table 1 .

 1 Capability profile to an API

	Capability Profile XML Tag	OpenAPI Specification property
	<Owner> <ComputingFacilities>	API Description
	<Performance>
	<Function id="">	API Path
	<Function action="">	Method of API
	<InformationExchange>	Parameters of the API
	<InputDataTypes>
	<InformationExchange>	Response Objects Parameters of
	<OutputDataTypes>	API

www.fitman-fi.eu

http://raml.org/

https://apiblueprint.org/

https://www.openapis.org/


Dans cet ouvrage collectif publié aux Presses universitaires de Rennes, Nathalie Caron et Guillaume Marche réunissent onze chapitres qui examinent le rapport complexe entre religieux et politique dans les sociétés modernes des mondes anglophones. Leur angle d'approche privilégie un mouvement qui prend le religieux comme point de départ pour aller vers le politique, à contrepied de nombre d'études où c'est au contraire le politique qui vient à la rencontre du religieux. L'introduction constate que, si la sécularisation progressive mise en place à l'ère moderne n'a pas amené à la disparition du religieux ni même à son retrait de la sphère publique vers la sphère privée, elle a néanmoins fortement modifié les contours du religieux, et son rapport au politique. L'ouvrage ne se consacre pas principalement au rapport entre Églises et états, mais fait la part belle à l'engagement religieux et aux diverses formes de mobilisation qui articulent le sentiment religieux et le positionnement politique.

Ce recueil a clairement été conçu avec le souci de décloisonner autant les siècles que les aires géographiques et les disciplines. À une époque où ce thème complexe, voire épineux, est d'une brûlante actualité, les auteurs croisent leurs regards de civilisationnistes, d'historiens, de sociologues mais aussi -ce qui est moins courant-de juristes, inscrivant cet ouvrage dans une véritable perspective interdisciplinaire. En outre, les articles étudient la politisation du religieux sur les cinq derniers siècles avec, pour les siècles plus lointains, des études de cas telles les réécritures de la liturgie henricienne dans les années 1530 (Aude de Mézerac-Zanetti), l'anticatholicisme (Gaby Mahlberg) ou la conscience religieuse (Cyril Selzner) durant les années de guerres civiles et de république en Angleterre, une analyse de la théorie politique de Thomas de Quincey (Frédéric Slaby), une étude des conférences de Hugh Price Hughes (Emmanuel Roudaut) et, pour les États-Unis, un article sur l'ordre moral protestant dans les Églises du Sud au XIX ème siècle (Laura Rominger Porter). Pour les siècles plus récents, et jusqu'à l'ultramodernité, le volume regroupe une contribution sur l'Église catholique en Irlande (Déborah Vandewoude), deux articles sur la Nouvelle-Zélande, l'un analysant « La politisation des questions sexuelles dans la construction des identités protestants » (Gwendoline Malogne-Fer) et l'autre théorisant les « marches pour Jésus » des protestants évangéliques dans le cadre de la campagne qui remet en question le droit des parents de gifler leurs enfants (Yannick Fer), et deux articles sur les États-Unis, l'un sur la sacralité du Premier amendement et le droit fiscal (Nina J. Crimm et Laurence H. Winer) et l'autre sur la réforme démocrate du système de santé et la gauche religieuse (Amandine Barb).

Cette large perspective permet une intéressante mise en regard de thèmes qui se font écho à travers les siècles et de part les continents. Les lecteurs trouveront matière à réflexion, par exemple, quant au rôle du catholicisme dans le monde britannique depuis la Réforme. L'article de Gaby Mahlberg remet en question l'anticatholicisme comme constituant essentiel de la construction d'une identité nationale anglaise aux XVI ème et XVII ème siècles, et va jusqu'à évoquer un « mythe » de l'anticatholicisme républicain, non sans faire parfois quelques amalgames qui mériteraient une remise en contexte plus exacte. L'une des conclusions de cet article est que « le degré auquel l'anticatholicisme a dominé tant la pensée républicaine anglaise du XVII e siècle que l'expérience anglaise dans son ensemble a été largement exagéré » (26) ; cette une affirmation au caractère généraliste demande à être étayée plus avant, et au-delà de quelques cas particuliers. La contribution de Déborah Vandewoude, elle, montre que le catholicisme demeure un élément intrinsèque de l'identité nationale irlandaise contemporaine ; cet article illustre finement comment l'Église catholique irlandaise cherche à restaurer son image et son assise sur la société laïque par l'intermédiaire de stratégies de profanisation mises au service du sacré. Les trois articles qui étudient l'importance des actions spontanées de groupes dont la ferveur religieuse infléchit la politique familiale et morale de la Nouvelle-Zélande des XX ème et XXI ème siècle et des États-Unis du XIX ème fournissent également de très intéressantes passerelles entre eux, et des liens se tissent ainsi, au fil de la lecture, entre les aires culturelles américaines, européennes et océaniennes. Il aurait été fascinant d'ajouter des études provenant de pays anglophones d'Afrique et d'Asie, pour enrichir encore cette perspective de la politisation du religieux dans les mondes anglo-saxons.

Le parti-pris de la longue durée, comme c'est souvent le cas, est aussi porteur de richesse qu'il est délicat à mettre en oeuvre: une telle variété temporelle enrichit l'ouvrage, mais le rend également plus difficile à organiser. L'équilibre chronologique entre les parties est délicat à établir, et tandis que la première partie (« Discours ») fait la part belle à la période XVI ème -XVIII ème siècles, la troisième partie (« Actions »), au contraire, porte beaucoup plus fortement sur l'ère des XIX ème -XXI ème siècles. En outre, dans la deuxième partie (« Organisation »), les lecteurs peuvent être surpris de passer de la subtile étude de l' « Approche liturgique de la suprématie royale sous le règne d'Henri VIII » (par Aude de Mézerac-Zanetti) à la non moins stimulante analyse de « La politisation des questions sexuelles dans les identités protestantes en Nouvelle-Zélande » au XXI ème siècle (par Gwendoline Malogne-Fer). Ces deux chapitres, tous deux des moments forts de l'ouvrage, tant ils sont révélateurs et de haute tenue, sont si éloignés thématiquement, chronologiquement et culturellement qu'il est un peu déstabilisant de les trouver ainsi à la suite l'un de l'autre. Les lecteurs apprécieront la qualité des articles et sauront reconnaître là l'une des difficultés inhérentes aux ouvrages dont le souci est d'envisager un concept sur la longue durée.

Le recueil se termine sur une postface de Jean-Paul Willaime qui place parfaitement les concepts de religieux et de politique dans un cadre théorique et conceptuel où se côtoient, entre autres, les travaux d'Émile Durkheim, de Max Weber ou de Paul Ricoeur. L'auteur y montre de façon magistrale que la notion de sacré n'appartient exclusivement ni au religieux, ni au politique, mais émerge plutôt de leur entrecroisement, lors de longs processus de sacralisation ou de profanation. Cette postface inscrit la réflexion de tout le recueil dans le paradigme non de la postmodernité mais de l'ultramodernité, que l'auteur décrit comme « l'état présent de la modernité occidentale, état qui, loin de signifier une sortie de la modernité […] incarne au contraire une radicalisation de la modernité dans la mesure où celle-ci ne démythologise pas seulement les religions, mais aussi les idéologises séculières ». (182) Cette superbe postface est le point d'orgue d'un ouvrage ambitieux, qu'elle conclut magnifiquement.

Laurence Lux-Sterritt Aix Marseille univ, LERMA, Aix-en-Provence, France

Nathalie

  Caron et Guillaume Marche (dir.), La politisation du religieux en modernité, postface de Jean-Paul Willaime, Collection Sciences des religions, Presses universitaires de Rennes, 2015, 201 p. ISBN 978-2753535695. 16€