{'fraction_non_alphanumeric': 0.02507997440818938, 'fraction_numerical': 0.009341010876519514, 'mean_word_length': 5.05891472868217, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Surface characterization based upon significant topographic features

Watershed segmentation and Wolf pruning, as defined in ISO 25178-2, allow the detection of significant features on surfaces and their characterization in terms of dimension, area, volume, curvature, shape or morphology. These new tools provide a robust way to specify functional surfaces.


1.
Introduction Surface texture has been focused on profile analysis for decades but recently areal instruments based on optical methods have become more and more popular as they allow non-contact measurements of rectangular surface portions. The new ISO 25178 contains several parts among which part 6 describes the accepted optical methods [1] that can be used to measure surfaces. Part 2 describes areal (3D) parameters [2] that are used to analyze surface texture. Apart classical parameters that are simple extensions of 2D equivalents (such as Sa, Sq…), the document defines new parameters that were designed to catch the complexity of modern surfaces.
Watershed segmentation used with a pruning criterion allows the creation of texture cells that can be characterized with parameters called feature parameters. These parameters make possible the specification of complex requirements on non-isotropic surfaces.

2.
Watershed segmentation While image segmentation algorithms have been used for a long time in image processing and vision systems, it is only recently [3,4] that these algorithms have been introduced for surface measurements. A matrix representing surface heights is identical to a grey level image so the same tools can be applied almost without modification. However, one big drawback of segmentation is over-segmentation which detects features motifs everywhere in the image. Scott [5] introduced a discrimination method that makes it possible to merge small features into larger ones using a discrimination criterion developed by Wolf [6] and Kweon [7]. This so-called Wolf pruning can be controlled by a numerical value, for example 5% of Sz (peak-to-valley height) and therefore can be used as a specification operator in a drawing, in order to control surface function more accurately than with classical parameters.

3.
Feature parameters All 3D parameters in use before the new ISO 25178 standard, such as the set of 3D parameters defined in the SurfStand report [8] are "field parameters", i.e. they are calculated from all data points, by averaging, integration or Fourier transform. Almost all 2D parameters are also field parameters, except RSm and Rc [9] calculated from profile elements, and R&W parameters [10] calculated on roughness or waviness motifs.
A new family of parameters is introduced in ISO 25178-2, named "feature parameters" and defined as parameters calculated on selected topographic features, such as points, lines or areas, extracted by watershed segmentation of the surface.
Several topographic features are derived from definitions given 140 years ago by Maxwell [11] for the description of landscapes. Hills are surrounded by course lines created by the segmentation process (figure 1), and have extreme points (peaks). Symmetrically, dales are surrounded by ridge lines and have extreme points (pits). Course lines and ridge lines intersect at a saddle point (figure 2). Hills and dales can be called "motifs" to keep using the vocabulary introduced with the R&W motifs that were calculated with a specific segmentation on profiles. Two new parameters provide the horizontal area (or projected area) of surface motifs, Sda on dales and Sha on hills. The volume of motifs is provided by two other parameters, Sdv and Shv. Several other parameters can also be derived from surface motifs. The developed area of motifs, given in mm 2 or as a percentage when divided by the projected area can be interesting when used in conjunction with the motif height or the curvature of summits. The motif height is defined as the vertical distance between the extreme point and the closest saddle point (figure 3). For surfaces used in contact with other surfaces, segmentation provides a robust way to identify contact points with the significant peaks properly identified with the correct Wolf pruning. These peaks and surrounding hills can be characterized to predict wear and deformation, by calculating the surface curvature. The peak density (Spd) and the mean curvature of peaks (Spc) are useful in this context and these parameters greatly improve performances of previous Sds and Ssc parameters defined in the Surfstand report. One of the most frequently used parameters on profiles is the Rz parameter. There were several versions of this parameter and other parameters (the ten-point height Rz still in use in the ASME B46.1 standard [12], the R3z, the Rtm, the Ry, or the last version of Rz defined in ISO 4287) were introduced with the same goal, to calculate a robust height. The segmentation method provides a robust way to identify significant peaks and valleys and therefore to calculate a robust surface height which is not sensitive to outliers with the S10z parameter as well as S5p and S5v (respectively peak height and valley height from the mean plane).
If we see surface motifs as texture cells, it is interesting to learn more about their morphology in terms of shape and dimension in the horizontal plane (i.e. without using the third dimension z). Several parameters commonly used in image processing [13] such as form factor, aspect ratio or roundness of motifs are calculated by ratios involving different types of diameters (min, max, mean diameters, equivalent diameter). They can be useful for discriminating between round and oblong motifs. The orientation of motifs, given by the direction of the largest dimension, can be used to separate grains or pores on heterogeneous surfaces.

4.
Conclusion Field parameters have been used for decades and provide good results on homogeneous surfaces. Today, more and more surfaces generated by modern fabrication methods are not isotropic or have structured cells to implement specific functional behavior. Feature parameters, calculated after a robust segmentation, are designed for the characterization of such modern surfaces. They can be seen as elements of a toolbox for engineers and metrologists that make it possible to define new specifications methods and obtain better correlation between parameter values and the functional requirements. Even though the watershed segmentation and the associated parameters were described many years ago, their use in the industry is still quite new.
Practical results and feedback for different applications are still to be published. In parallel, further work needs to be done on the definition of operands calculated on these motifs. Only a few parameters are proposed in the ISO standard, others are available in some analysis software packages [14] but a lot more can be done to define useful parameters.

Automatic partitioning
Once detected and discriminated correctly, significant motifs can be used to partition surface structure either automatically using numerical criteria (e.g. motif area > value) or interactively by clicking inside a motif to select it (figure 4). For this application, the segmentation process is applied after a pre-filtering process such as a gradient or top-hat filter, in order to apply the segmentation on edges instead of hills and dales.

Texture morphology
Texture cells are calculated by segmentation and their dimensions are assessed. The mean value and the standard deviation of parameters are calculated over all motifs to provide a global evaluation. Parameters calculated on individual motifs can be tested against a tolerance and out-of-tolerance motifs can be identified and marked, or can be used to identify specific shapes in the surface.