... Comité de NOrmalisation des MOyens de production, is a join standardisation committee between Renault and PSA Peaugeot-Citroën. See www.cnomo.com ...
Application of image segmentation to motifs evaluation on 2D profiles François Blateyron, Michaël Adam Digital Surf, 16 rue Lavoisier, F-25000 Besancon, France Abstract The French automotive industry has been using for several years a special Motifs method to analyse the roughness through the evaluation of roughness motifs (ISO 12085). The main interest of this method is linked to the existence of a knowledge database, regularly updated since thirty years. This database contains values of R and W parameters for a large variety of functional components and engineering surfaces used in the automotive industry. The method has several drawbacks though, such as: it is difficult to implement, some exceptions are not covered by the standard, the method is not stable and sensitive to small local variations of the profile. A new method (called segmentation by watersheds), based on an image processing technique called segmentation by watersheds, could be used as a replacement. Initially developed for areal measurements, it can be adapted to 2D profiles and tuned to provide results very close to the ones provided by the ISO 12085 standard. This method is easier to implement, provides more stable results, and is less sensitive to exceptions. This paper describes how the segmentation method can be adapted to the evaluation of motifs, and provides a preliminary comparison between the two methods.
1 Introduction Engineers and metrologists have known for a long time now that functional properties of engineering surfaces cannot be efficiently analysed by only looking at parameters calculated on the mean line, such as Ra. Functions such as running in or lubrication are mainly influenced by the contact surfaces and the distribution of asperities or voids. This is why, in the early 80’s, a specific method was developed by the French automotive industry, mainly Renault and PSA Peugeot-Citröen, and was established as an interconstructor standard [1]. This method was based on a work started in 1968 which described the creation of motifs, of an upper envelope, and the calculation of dedicated parameters that could be used in specification by designers and in verification by metrologists. During the following years, a huge amount of work was produced to create a database containing characterisation results of engineered surfaces using R&W parameters, and describing how a surface should be specified for each expected function, and how it should be verified. This knowledge was spread through internal training and taught to students of mechanical engineering schools since that time. In 1996, the CNOMOa standard became an ISO standard under the reference ISO 12085 [2]. Although the main content of the CNOMO standard has been kept, some parameters have been removed (such as Trc or the functionnal criteria), as well as some useful explanations. As an international standard, it has been implemented by instrument manufacturers on their profilers, but the complexity of the method and a
CNOMO: Comité de NOrmalisation des MOyens de production, is a join standardisation committee between Renault and PSA Peaugeot-Citroën. See www.cnomo.com
some unsolved issues have led to variations from one brand to another. Due to several lacks in the standard, criticisms have been raised and have pushed the manufacturers to exchange information [3] and set up recipes to solve each identified problem, in order to reduce diverging interpretations and offer results closer to the expected values. Outside the French market, alternative methods have been used. The German parameters method (DIN4776 standardised as ISO 13565 [4] [5]) provides a part of the answer for stratified surfaces, with parameters (Rk, Rpk, Rvk) very close to the functional criteria used in CNOMO (CR, CF, CL). Nevertheless, despite the drawbacks of the Motifs method, it should not be forgotten that it is an applicationoriented method dedicated to functional properties. The knowledge base constituted year after year should not be forgotten either. Should a candidate replacement method be defined, it should not only reduce or eliminate the known drawbacks, but also provide results that can be correlated with the Motifs method in order to keep the benefit of the knowledge base. 2 Reminder of the Motifs algorithm The algorithm is described in the ISO 12085 standard, paragraphs 4.4 and 4.5. It starts with the search for all local peaks and valleys. These peaks and valleys are assembled into motifs, each motif being composed of a peak-valley-peak series. The right peak of a motif is used as the left peak of the following motif. For a motif i, one defines H2i and H2i+1, the height difference of the two peaks from the valley, and ARi, the motif’s width (horizontal distance between the two peaks). An iterative procedure is then used to combine non-significant motifs, into larger motifs, following four combination rules: Condition
I. Envelope condition: the central peak is smaller than one of the two others.
II. Length condition: the width of the combined motif is smaller than A or B.
Combination not allowed
Combination allowed
III. Enlargement condition: the T characteristic is increased by the combination.
IV. Similar depth condition: one of the two depths is lower than 60% of the T characteristic.
Table 1: conditions used to combine motifs The procedure is repeated as long as combinations are possible. Conditions are tested firstly segments by segments, except condition II, then on the whole profile (the four conditions), as described in the Annex A of the standard. Once the combination process is finished, the result is a series of roughness motifs, used to calculate the parameters defined in the ISO 12085 standard (see Figure 1). R = 4.72 µm AR = 0.232 mm Rx = 12.4 µm Pt = 14.1 µm
µm 4 2 0 -2 -4 -6 -8 -10 -12 -14 0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 mm
Figure 1: roughness motifs traced over the primary profile In order to calculate waviness motifs, the upper envelope curve is created by joining the motif peaks with a line. The resulting curve is a representation of the waviness profile. The same procedure is then applied on this curve to evaluate the waviness motifs, using a limit B instead of A (see Figure 2).
W = 1.46 µm AW = 1.53 mm Wx = 3.28 µm Wte = 3.53 µm
µm 4 2 0 -2 -4 -6 -8 -10 -12 -14 0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 mm
Figure 2: waviness motifs calculated on the upper envelope It should be pointed out that roughness motifs are evaluated on the whole primary profile, contrary to a roughness parameter calculated on a filtered profile which is shorter than the primary profile (usually half a cut-off is removed at the beginning and at the end of the profile, on a Gaussian filter for example). The upper envelope, whose role is similar to the mean line of a filtered profile, is normally not affected by local valleys, and because of that property, the motif method can be considered as a quasi-robust filter. But there are also several drawbacks. The motifs method is based on a pattern recognition algorithm, therefore it is not possible, as in the case of a linear filter, to predict accurately its results and to be sure that the method provides an answer for each possible case. In fact, it is even quite easy to find examples that cannot be treated because the standard does not cover all cases. In such cases, the developer must find a solution by himself, and this is leading to variations in implementations from one manfacturer to another. 3 Segmentation by watersheds Segmentation by watersheds is an image processing method created initially for gray-level images. It has been adapted later for the analysis of digital terrains [6] in order to detect ridge lines, summits, dales, etc. It was recently used for the analysis of surface topography [7] in order to retain significant summits and valleys. Interestingly, this segmentation method has been introduced as an areal extension of the motifs method, i.e. which is the reverse path of the current paper! More recently, the method was used in a draft standard [8] [9] as a discriminant method to find the summits used for example in parameters such as Ssc or Sds. This project is based on the work of Pr. Paul Scott [10] on morphological mathematics applied to the evaluation of surface topography; areal data files can be treated exactly as gray-level images. Image segmentation is aimed at isolating the image’s components: for example cells seen on a microscope image, grains on a metallographic slice, etc. Transposed into topographic surfaces, the method allows the detection the surface texture constituents, such as trenches, scratches, holes, summits, etc. Segmentation algorithms usually include strategies to get rid of noise on images or are able to analyse bad quality images. These strategies are useful to eliminate local roughness in order to retain significant texture features.
3.1
Description of the watershed algorithm
The algorithm starts with the search for all local pits (valleys). Then it simulates a progressive flooding of all valleys, the level of water being increased step by step from the pit. At some point, two basins will touch each other as they flow out of their dale. The first connection point between two basins is called a saddle point. As the flood continues, connection points build walls around each basins and constitute ridge lines. At the end of the process, the summits, pits, ridge lines and saddle points found are considered as the critical points of the surface. The same method can be used on an inverted surface, by flooding summits in order to find course lines instead of ridge lines. 3.2
Elimination of over-segmentation
Unfortunately, the raw result is an over-segmented image, with plenty of tiny dales surrounded by small rings of ridge lines. A discrimination method is needed here in order to retain dominant summits and dales, and merge small basins into larger ones. This is the goal of the change tree which is created to describe the relationships between critical points. This tree is then pruned out to eliminate too small branches that represent very small dales due to roughness (noise). Various criteria may be used during the pruning process, from testing the height difference between two critical points, to taking into account the area or the perimeter, or even the volume of the dale, delimited by a ridge line. Removing a branch from the tree is similar to merge two basins into a larger one, and retain the deeper pit. 4 Application to the evaluation of motifs This segmentation method can be easily transposed to the evaluation of profiles. It is even greatly simplified in the absence of the third dimension which reduces the complexity. Instead of defining a 3D basin by its pit, a saddle point and a ridge line, here a motif is defined by a pit and two adjacent peaks: summit summit
pit Figure 3: definition of a 2D motif from the 3D basin definition A dale is filled with water from the pit and a saddle point is created when two basins are connected. In 2D, the saddle point is also necessarily a peak. Then a motif is defined as a summit-pit-summit series, exactly as in the ISO 12085 (peak-valleypeak). The initial four conditions used in the motif method and the combination rules are replaced now by pruning conditions in the change tree. The result is the same: eliminating non-significant motifs and retaining dominant ones.
The flooding process starts by filling the local pits (V).
V2 V1
a)
The rise of the water in valleys is simulated as if pits were in fact small holes allowing the water to enter into the surface. If the surface is put in water, the level will rise regularly and at the same time in all valleys.
V3 V2 V1
b)
P1 V4
When two basins are joining themselves, a summit is created (instead of creating a ridge line as in 3D).
V3 V2 V1
c) P3
P2
P1
V6
V5
V4
The process is continued until the highest peak. At the end, all pits and summits have been identified as well as their connections. During this flooding process, a first discrimination may be applied to eliminate too small basins.
V3 V2 V1
d)
P6
P5
P4
P3
P2
P1
Then motifs can be defined from three critical points: a summit, a pit and a summit.
V6
V5
V4 V3 V2 V1
e)
P6 P5 P4
P3
P2
P1
V6
V5
V4
A change tree is built to describe the relationships between summits and pits, sorted by their depth. The tree structure is simplified by a pruning process following defined rules.
V3 V2
f)
V1
Table 2: determination of motifs using segmentation by watersheds This example above is useful to illustrate the flooding process, but in practice, it is not needed in 2D as there is only one dimension. Summits and pits can be found by sequential search from the beginning to the end of the profile. The only major
difference between the watershed segmentation and the ISO motifs method lies in the combination strategy, i.e. in the use of rules applied in a change tree instead of combination rules applied on motifs. Several types of change trees may be set up: a Dale Change Tree will describe the relationships between pits and ridge lines; a Hill Change Tree will describe the relationships between peaks and saddle points; and a Full Change Tree will combine both. Pruning rules can be based on height difference or the area of a basin, or its width, or a combination of these criteria. Other types of criteria might be identified in the future to better describe functional properties of the surface. In figure f) of the Table 2, we can see that peaks P1 and P3 are too close and will probably be merged together during the pruning process; P3 and V3 will be retained in order to create a larger basin. The tree will then connect P5 to P1 and will keep V1 which is the deeper valley. This mechanism is similar to the four conditions of the motifs method. Once the pruning process is finished, the remaining basins define the roughness motifs. On these motifs the same parameters as in ISO 12085 are calculated. The upper envelope can be defined as well and the same segmentation method can be used again to evaluate waviness motifs. 5 First results, comparison and perspectives
R (µm)
AR (mm)
Rx (µm)
Profile
ISO
watersheds
ISO
watersheds
ISO
Watersheds
BORING1
6.37
6.50
0.200
0.207
15.0
14.4
SHEETST2
6.25
6.25
0.216
0.219
12.3
12.0
HONING1
1.95
2.00
0.196
0.184
10.4
10.3
HONING2
5.00
5.26
0.236
0.237
12.5
12.4
TURNING1
13.5
13.3
0.244
0.243
20.7
20.4
TURNING5
21.6
21.4
0.168
0.162
54.8
53.2
RUNNING1
1.94
1.94
0.176
0.183
4.65
4.45
SAWING1
24.8
23.1
0.308
0.285
72.4
76.3
MILLING1
1.30
1.35
0.220
0.244
3.86
3.37
GRINDIN1
0.571
0.570
0.204
0.210
1.30
1.27
GRINDIN2
0.425
0.460
0.228
0.238
2.03
1.91
Table 3: comparison between the ISO Motifs method (left column) and the segmentation by watersheds method (right column). Table 3 shows that the two methods provide close results. However, it is less important to demonstrate the correctness of results than to show the correlation of results with the function of the surface. If results are different but describe the
function more reliably or if a specific phenomenon can be discriminated more precisely, then the goal is achieved. It is too early to answer that question and more studies must be conducted, in order to characterise this new method. To do so, it is important to understand the essence of some criteria used in the motifs method in order to know if it is important to have similar criteria in the pruning method of the change tree. What is the meaning of the width limitation to limit A? Do we need to have a limitation of extreme points to 1.65 sigma? Why isn’t it possible to combine two motifs if the central peak is greater than 60% of the T characteristic? Another important question is about the method of determining the upper envelope: it may be better determined by the use of a morphological closing filter [12] [13] with a structuring element of size A (for example a disk of diameter A), instead of simply joining motifs peaks by a line segment. This envelope could be used to eliminate peaks that are too far below the upper envelope (same for valleys that are above the lower envelope, this lower envelope being generated by a morphological opening filter). 6 Conclusion In order to make this method available to industry, it is important to evaluate the practical conditions of use and tune the pruning criteria in order to provide stable and correlated results. That’s why the segmentation method has been implemented into Mountains Profile 4.0 [14] and will be offered to beta-test users who will conduct studies in order to refine the algorithm. Motifs evaluation using watershed segmentation is a way to gain the support of both pros- and cons- Motifs method. It provides quite close results while eliminating part of the drawbacks. Criteria used in the change tree still need to be refined to improve the correlation and more studies will need to be conducted to establish the correlation on all types of components. Contrary to the original motifs method which is specifically designed for 2D profiles, the segmentation can be used in 2D and 3D with the same core method. It allows the users to have one evaluation method in both cases, and to share the experience of one domain with the other. The segmentation has a mathematical basement which avoids some of the drawbacks of the original method, based on a combinatorial algorithm unable to cover all possible cases. The introduction of the watersheds segmentation in replacement of the old motifs method would allow the users worldwide to adopt this interesting method, for the benefit of all actors of the market. 7 References [1]
CNOMO E00.14.015.N, états géométriques de surface, calcul des paramètres de profil, 1983.
[2]
ISO 12085:1996, Geometrical Product Specification (GPS) — Surface texture: Profile method — Motifs parameters.
[3]
Pr. Michael Dietzsch, The motif-method, a new draft of an ISO standard (ISO/DIS 12085) to measure surface roughness and waviness with a stylus instrument.
[4]
ISO 13565-1:1996, Geometrical Product Specification (GPS) — Surface texture: Profile method; Surfaces having stratified functional properties. Part 1: Filtering and general measurement conditions.
[5]
ISO 13565-2:1996, Geometrical Product Specification (GPS) — Surface texture: Profile method; Surfaces having stratified functional properties. Part 2: Height characterization using the linear material ratio curve.
[6]
L. Vincent, P. Soille, Watersheds in digital spaces : an efficient algorithm based on immersion simulations, IEEE trans. on pattern analysis and machine intelligence, vol 13, no 6, June 1991.
[7]
Frédérique Barré, Contribution de l’analyse d’images à la caractérisation morphologique des surfaces industrielles, Thèse de doctorat de l’université Jean Monnet, Saint-Etienne, 1997.
[8]
ISO/DTS 16610-01, Geometrical Product Specification (GPS) — Filtration — Part 1: Overview and basic concepts.
[9]
ISO/WD XXXXX-1, Annex A, Geometrical Product Specification (GPS) — Surface Texture, Areal — Part 1: Terms, definitions and surface texture parameters.
[10] Dr Paul Scott, Foundation of topological characterization of surface texture, Proc. 7th Int. Conf. on metrology and properties of engineering surfaces, Göteborg, 1997, p 162-169. [11] L. Vincent, Algorithmes morphologiques à base de files d’attente et de lacets, extension aux graphes, Thèse de doctorat de l’Ecole des Mines de Paris, 1990. [12] ISO/DTS 16610-40, Geometrical Product Specification (GPS) — Filtration — Part 40: Morphological profile filters: Basic concepts. [13] ISO/DTS 16610-41, Geometrical Product Specification (GPS) — Filtration — Part 41: Morphological profile filters: Disk and horizontal filters. [14] Mountains Profile, www.mountainsmap.com Cite this article as: BLATEYRON F, ADAM M (2004) Application of image segmentation to motifs evaluation of 2D profiles, Proc. XI Colloq. Surfaces, Chemnitz, 56-64