Selected Filtration Methods of ISO-16610
Selected Filtration Methods of ISO-16610
16610
Dorothee Hüser, 5 Precision Engineering, PTB
In ISO TC 213 / WG 15 a set of filtration methods and concepts have been standardized or will be
standardized soon to detrend surface topography with regard to form, waviness, and roughness and
with regard to recognize features on different scales referred to as
• detrending and
respectively. The standards provide a variety of numerical methods for band pass filtration.
Regarding an object at different scales, its form, its waviness, and finally its roughness determine the
geometry of the body respectively of its surface.
In roughness metrology, usually data have already been filtered with regard to high frequencies.
They are cut off to make statistical roughness parameters comparable with compatible band widths
of instrumental data, e.g. λ < λs = 2.5 µm. This low pass is carried out before any other high pass
filtration, since the instruments often deliver the data being filtered that way. Applying both filters
means applying a band pass filter.
1
Figure 1: Idea of detrending.
Pattern recognition is essentially the same filtration process, however, using a narrow band. The
convolution with a kernel is mathematically aequivalent to evaluating the cross correlation with a
template. Be s(x) the kernel, i.e. the template with zero mean and z(x) the signal to be analysed
the integration Z
w(x) = s(ξ) z(x − ξ) dξ (1)
is called covariance and if it is normalized, it is called correlation, with z̄ being the mean of the signal.
Convolution is weighted averaging. It is a low pass.
Calculating weighted averages for each signal value, i.e. its convolution, means to perform as many
integration processes as data points of the signal exist. For narrow kernels with only very few
positions this usually is the preferred procedure. However, for kernels covering a large number of
signal positions, it is more efficient to Fourier transform both the signal and the convolution kernel.
The Fourier transform of the kernel is called transfer function H(λ) and it then is multiplied to the
Fourier transform of the signal. The multiplication is element wise. An inverse Fourier transformation
delivers the smoothed signal (eg. waviness).
Fourier transformation presumes that the signal is periodically continued. Fig. 3 therefore gives the
signal once more to show the continuation on one side. The same applies for the kernel. Both are
Figure 3: Prepare signal and kernel for appropriate usage in Fourier space.
displayed doubled to show the parts where the signal and kernel are continued. For calculation, it
is not doubled, just the gap is filled appropriately. The following routine in Matlab / Gnu-octave
illustrates the usage for a band pass
x2 = [ x;−x ( nn : − 1 : 2 ) ] ;
n2 = s i z e ( x2 , 1 ) ;
% f i l t e r constant
a l p h a = sqrt ( log ( 2 ) / pi ) ;
% t r a n s f e r f u n c t i o n f o r band p a s s
H = H HP . ∗ H LP ;
% Fourier transform of s i g n a l
% w i t h z e r o padded gap o f s i z e o f
% l a r g e r kernel ( kernel of high pass )
z2 = [ z ; zeros ( n2−n , 1 ) ] ;
Fz = f f t ( z2 ) ;
% b a c k t p s p a t i a l domain
z3 = r e a l ( i f f t ( Fz . ∗H ) ) ;
z f = z3 ( 1 : n ) ;
In case of this kind of kernel the evaluation of the kernels and their Fourier transformations
do not need to be performed, since the analytical solution of the Fourier transform of a Gaussian
exists.
f0 = lambda LP / ( n2∗dx ) ;
f = [ 0 : n h a l f+n l ] ’ ∗ f 0 ;
Fw = 2.ˆ( − f . ∗ f ) ;
H LP = [ Fw ; Fw( nn : − 1 : 2 ) ] ;
Using the Spline filtration method as low pass according to ISO 16610-22 can either be obtained by
replacing the Gaussian kernel s by following function
√ √ 1 π √ 1
s(ξ) = 2 sin(π 2 |ξ| + ) exp(−π 2 |ξ|) (5)
λc 4 λc
or by following equation:
1
E + α 4 Q zW = zP
with α= (6)
2 sin(π∆x/λc )
The relation between Eq. (5) and Eq. (6) cannot be derived straight forward. Terzopoulos at
Massechusetts Institute of Technology and Unser at the Biomedical Imaging Group, Swiss Federal
Institute of Technology Lausanne have investigated the relation between spline numerics and signal
theory, hence the transfer function of different spline filters [1, 2].
This writeup is restricted to only give an idea of what is a spline, in particular a smoothing spline.
Splines are polynomials to approximate a signal z(x) between its knots xi . The condition to be
fullfilled is its smoothness within each knot as in case of wooden beams fixed at distant positions.
The wooden splines can be described as cubic functions with natural constraints. The tension has
to be at minimum.
Within each interval between the fixes (the nails or knots) [xi , xi+1 ) the shape of the wood is described
by a polynomial pi (x) of degree 3 with the constraint
∂ ∂ ∂2 ∂2
pi (xi+1 ) = pi+1 (xi+1 ) pi (x)|xi+1 = pi+1 (x)|xi+1 p i (x)| x = pi+1 (x)|xi+1 (8)
∂x ∂x ∂x2 i+1
∂x2
with pi+1 (x) being the polynomial of the successing interval [xi+1 , xi+2 ).
n−1
( P
3
X
ν=0 cν,i xν if x ∈ [xi , xi+1 )
p(x) = pi (x) pi (x) = (9)
i=1
0 else
For data points z(xi ) that scatter significantly the polynomials are oscillating. A smoothing by a
sort of averaged passing the data points no longer fullfilling pi (xi ) = z(xi ) will be desired. That kind
of splines is referred to as smoothing splines s(x) that meet some points wi of the smoothed profile,
the so-called waviness, with
n−1
( P
3
X
ν=0 cν,i xν if x ∈ [xi , xi+1 )
s(x) = si (x) si (x) = si (xi ) = wi (10)
i=1
0 else
and
∂ ∂ ∂2 ∂2
si (xi+1 ) = si+1 (xi+1 ) si (x)|xi+1 = si+1 (x)|xi+1 s i (x)| x = si+1 (x)|xi+1 (11)
∂x ∂x ∂x2 i+1
∂x2
The smoothing is based on a maximum likelihood optimization that minimizes the sum of least
squares of the differences between signal values and their partners being lifted for smoothing and of
the tension (Tikhonov regularisation):
n−1 L 2
∂2
Z
2
X
E= (z(xi ) − wi ) + r s(x) dx → min (12)
0 ∂x2 wi
i=1
with r called regularisation parameter (r > 0). For r = 0 the spline would be a straight line. The
regularisation parameter determines the waviness, hence the wavelength of the spline filter. In ISO
16610-22, the polynomials are chosen such that after differentiation we obtain:
(E + r Q) zW = zP (13)
with zW being the column vector of the wi and zP of the primary signal values z(xi ), furthermore
with E being the eye matrix and Q the pentagonal matrix as differential operator.
1
α= (14)
2 sin(π∆x/λc )
with ∆x being the (average of all) sampling interval sizes. The representation of Eq. (14) has to be
taken care of, if the sampling intervals are too many orders of magnitude smaller than the cut off
wavelength, i.e. if the ratio ∆x/λc will be very small such that 1/α4 get close to the resolution of the
representation of the floating points!
Including tension terms with a factor called tension parameter β makes its transfer characteristics
closer to that of the Gaussian filter:
E + βα2 P + (1 − β)α4 Q zW = zP
(15)
with zP := (z(x1 ), . . . , z(xn ))T being the column vector of the original signal (height values of primary
profile) and zW := (w1 , . . . , wn )T the resultant smoothed signal (waviness). Furthermore E is the eye
matrix, P the tridiagonal matrix of the differential quotiant for the first derivatives and Q the
pentadiagonal matrix for the second derivatives.
The applications regarded by ISO 16610-22 are those for aequidistantly sampled data, but Eq (15)
can as well be implemented if the band matrices are filled with the differing quotients.
Changing the parameter β, which may lie between 0 and 1, causes a change of the shape of the
waviness, i.e. its curvature. Chosing β = 0.625242 delivers a transfer function whose shape is close
to that of Eq. (4), which is the Fourier transform of the Gaussian kernel.
An extension of the profilometric spline of ISO 16610-22 for areas could be implemented as follows,
but a document with ISO-Number 16610-62 has not yet been projected:
function W = i s o 1 6 6 1 0 2 2 a r e a l ( Z , d l a t e r a l , lambda , t b e t a )
dx = d l a t e r a l ( 1 ) ;
dy = d l a t e r a l ( 2 ) ;
[ n , m] = s i z e ( Z ) ;
% n number o f rows , hence y−a x i s
% i . e . t h e number o f k n o t s i n a column v e c t o r
% m number o f columns , hence x−a x i s ,
% d . h . t h e number o f k n o t s i n a row v e c t o r
a l p h a s q u a r e = ( 0 . 5 / sin ( pi ∗dx/ lambda ) ) ˆ 2 ;
p1 = t b e t a ∗ a l p h a s q u a r e ;
p2 = (1− t b e t a ) ∗ a l p h a s q u a r e ˆ 2 ;
A = zeros ( n , n ) ;
f or k=3:n−2
For larger matrices A and B a sparce matrix inversion procedure for band matrices is required.
The various filters of ISO 16610 standards series allow different filter kernels having different shapes.
Therefore, the choice has to be taken thoroughly depending on the application and its sensitivity to
the curvature of the waviness.
If one of two waviness profiles of the same cut off wavelength has slightly higher amplitudes, which
means a greater curvature, then the remaining residuals of the one waviness has less values in the
tails of the amplitude density distribution than those of the other. The residuals, i.e. the differences
between the values of the primary signal and its waviness, are the roughness. Hence if an identical
primary profile is filtered with differently shaped kernels, the resultant waviness profiles differ as well,
consequently the residuals, i.e. the roughness as is illustrated for one example in Figs. 5 and 6.
Savitzky-Golay smoothing filters use regression polynomials to obtain appropriate weights for a kernel
to preserve statistical moments to a desired degree. Higher moments are preserved if the degree of
the polynomial is higher retaining the shape of a signal. A detailed derivation of Savitzky-Golay
filters is presented in Numerical Recipes [4], chapter 14.8, and in the Annex of this write up. For
uniform sampling intervals of size ∆x the filter coefficients cν are only dependent on the kernel size
and the degree of the polynomial, thus can be tabulated in general independent of specific data. The
filter w = f (z) is a linear filter with coefficients (i.e. with a discrete kernel):
nR
X
wk = cν zk+ν (16)
ν=−nL
with nL and nR for the number of neighboring data points contributing to the weighted averaging.
The polynomial of degree p be
p
X
wk = βk,j (x − xk )j (17)
j=0
Regard sampling positions x for signal values z(x) at following aequidistantly given knots xk = k∆x
with k = 0, . . . , N − 1.
To obtain the filter coefficients cν a Maximum-Likelihood estimation for the coefficients β~ = (β0 , ...βp )T
of the polynomial is performed
nR
~ 2
X
min {R} with R= (zk+ν − wk+ν (β)) (18)
~
β ν=−nL
Differentiation with respect to β~k to solve the optimization problem Eq. (18) means ∂R
∂βk,l = 0 with
p
X X p
p X nR
X
j
wk = βk,j (x − xk ) = gjl (ν∆x)l zk+ν (xk − xk )j (22)
j=0 j=0 j=0 ν=−nL
with
1 −nL ... (−nl )p
1 −nl + 1 ... (−nL + 1)p
. .. ..
X = .. (27)
. ... .
(nR − 1)p
1 nR − 1 ...
1 nR ... (nR )p
ISO 16610-28 and 16610-31 employ a combination of the Savitzky-Golay filter coefficients and the
Gaussian kernel according to Seewig [6, 7]
q
2 ! ln(2)
α= if p = 0, 1
1 ν∆x
π
sν = exp −π a= q (28)
aλc aλc γ = −1 − W (−1/(2e))
if p = 2
π
by
nR
( )
~ 2
X
min sν (zk+ν − wk+ν (β)) (29)
~
β ν=−nL
yielding coefficients
p
X
c ν = sν gjl ν l (30)
l=0
with
s−nL 0 ... ... 0
..
. 0 s−nL +1 . . . . . . 0
.. .. ..
G−1 = M = . . . = XT S X
P nR lνj . . .
s ν and S= . . .
ν=−nL ν
..
..
.
.
0 0
0 ... ... 0 snR
(31)
2 2
4000
1 1
2000
-0.8 -0.4 0 0.4 0.8 -0.8 -0.4 0 0.4 0.8
b
0
z (nm)
-2000
-4000
-6000
-8000
0 1 2 3 4 5 6
x (mm) L
Figure 8: Convolution with a partial Gaussian covering the interval ξ2 = b < λc mit b = (L − x).
Retaining the zeros and first moment means to reduce end effects, see section 4.3 of ISO 16610-28.
At the central part of the profile, the moments cancel for nL = nR , i.e. M becomes the eye matrix in
the central part, while at the borders XT S X it is no longer the eye matrix, such that the resultant
waviness and roughness profiles are identical to those obtained by the method of ISO 16610-21.
The polynomial of degree p = 0 denotes a constant, i.e. preserving the mean, which is given as
Eq. (15) in section 4.3 of ISO 16610-28. It does the same as spatial convolution with weighting
according to the kernel length giving rise to the effect at the borders of a profile. This is a weighted
averaging
R
ρ(r)rdr
f (rs ) = R (32)
ρ(r)dr
At the border regions [0, λc ] und [L − λc , L] the kernel exceeds the profile, see Fig. 8 the partial
Gaussian covers the interval ξ2 = b < λc mit b = (L − x).
2.5
gauss
2
1.5
1
erf
0.5
0
-1 -0.8 -0.6 -0.4 -0.2 0 0.2 0.4 0.6 0.8 1
(mm)
Figure 9: For weighting according to the kernel length the area of the Gaussian kernel, which is the
Gaussian error function erf, is used.
R λc
which approximates to the error function erf (Fig. 9) −λc s(ξ)dξ ≈ 1.
b 2 b 2
1 1 b
Z Z
ξ ξ
−π −π
e αλc
dξ ≈ e αλc
dξ = erf (37)
αλc −λc αλc −∞ αλc
Using p = 1 preserves the straight line of the averaged signal part, which means that it minimizes
the end effect even better than p = 0, which is given as Eqn. (13) and (14) in section 4.3 of ISO
16610-28, as illustrated in Fig. 10.
That means that in the central part, p = 0 and p = 1 deliver identical results to the Gaussian of ISO
16610-21. Employing p = 2 preserves the variance, which means that it retains the widths of peaks
and pores. The shape retaining effect of the p = 2 choice is illustrated in Fig. 7.
In order to perform detrending within much smaller band widths and to detect structures or features
of various sizes, i.e. on different scales, topography signals are sieved like gravel stone to separate
different grain sizes. The ISO filter toolbox gives two different types of filtration methods, to perfom
Figure 11: Copy of Fig. 2 of ISO 16610-49 showing the sieving concept for multi-scale analysis.
this
• a linear filter method using kernels similar to those described before (referred to as wavelets),
The multi-scale analysis is realized as chain of filtration steps separating the low frequency part of
a signal (referred to as smoothed s) from the high frequency signal part of the signal (referred to
as residuals or differences d) as illustrated in Fig. 2 of ISO 16610-49 which we have copied to this
writeup shown in Fig. 11. The idea of discrete wavelet transformations and multiresolution scaling is
to split the data set half and half, the one half for the high passed and the other for the low passed
component.
During the 1980s morphological filters have been developed as image processing tool for pattern
recognition purposes for a variety of biomedical and automated industrial inspectation applications.
They are nonlinear signal transformations that locally modify geometric features of the signal [11]. It
was Matheron and Serra in the 1970s who have introduced the mathematical morphology into image
processing [12]. A few years later they and others extended morphological filters to multilevel signals
by shrinking/ expanding operations on binary images to sieve structures of various sizes accordingly.
The science of analysing surface texture and topographies operates with images that have a continuous
height axis such that the mathematical morphology needs an appropriate modification. In the field of
scanning probe microscopy the nonlinear operation of Minkowski subtraction often has been referred
to as a deconvolution of a probe tip. Using the term deconvolution might be misleading for those
who specify the term convolution as being a linear operation. Keller and Franke call a dilation result
(being the consequence of probing with a finite tip size of a stylus insturment) envelope and the
erosion result envelope reconstruction introducing an algorithm on a continuous height space [13].
For geometric product specification the non-linear morphological filtration procedures are proposed
in the ISO standards series 16610-40ff. There are two different filters to remove structures
They are realized by a successive application of the two elementary operations of morphology, namely
dilation which is as well called Minkowski sum and erosion, the Minkowski difference:
Fig. 12 illustrates the two elementary operations of morphology dilation (Minkowski sum) and erosion
(Minkowski difference). The signal on which the operations are applied is the black curve. The blue
curve represents the border of a geometry which is called structuring element and which serves to
remove geometry from data (like a cutting tool in surface finishing) resp. to add geometry onto data
(like the envelope by probing with finited sized stylii). For the algorithm, the set of border points of
the structuring element has one reference point or origin. For each of the signal coordinate pairs resp.
triples (i.e. for each point) the reference point of the structuring element is placed on the regarded
signal point. Then the borders are compared: for dilation the outward points are chosen, i.e. if the
signal points lie outside with respect to the structuring element, then they are chosen, if the points
of the border of the structuring element are outside, then they are chosen, see Fig. 13. For erosion
the points that lie inside are chosen.
If the procedure is applied to any contour, the direction to define inside vs. outside is needed. For to-
pography measurements, usually, there exists only one surface normal, which is referred to as height
or z-axis. Villarubia delivers a C implementation [14] of Keller and Franke’s envelope reconstruction
method [13] for scan signals with arbitrarily shaped probe tips, i.e. structuring elements. The sub-
sequent listing shows a simplified version of Villarubia’s procedure, here assuming the structuring
element having a circular shape with radius R:
function r = d i l a t e a e q u i d i s t a n t ( z , dx , R)
%
% z are h e i g h t s , h e i g h t a x i s i s the d i r e c t i o n
% t o d e f i n e o u t s i d e and i n s i d e
%
% R radius of s p h e r i c a l s t r u c t u r i n g element
%
z = z (:);
nd = s i z e ( z , 1 ) ;
r = z;
t i p w i d t h = 0 . 8 ∗R;
nt = 2∗ f l o o r ( 0 . 5 ∗ t i p w i d t h /dx ) ;
x = [− nt : nt ] ’ ∗ dx ;
t = R .− sqrt (Rˆ2 .− x . ˆ 2 ) ;
f or l =2: nt
h = z ( l ) .− t ( nt+2− l : 2 ∗ nt +1);
i a b o v e = find ( r ( 1 : l+nt)<h ) ;
r ( iabove ) = h( iabove ) ;
end
f or l=nt +1:nd−nt −1
h = z ( l ) .− t ;
i a b o v e = find ( r ( l −nt : l+nt)<h ) ;
r ( l −nt−1+i a b o v e ) = h ( i a b o v e ) ;
end
f or l=nd−nt : nd
h = z ( l ) .− t ( 1 : nt+1+nd−l ) ;
i a b o v e = find ( r ( l −nt : nd)<h ) ;
r ( l −nt−1+i a b o v e ) = h ( i a b o v e ) ;
end
h = z ( l ) .+ t ;
i b e l o w = find ( r ( l −nt : l+nt)>h ) ;
r = e r o d e a e q u i d i s t a n t ( z , dx , R f i l t e r ) ;
o = d i l a t e a e q u i d i s t a n t ( r , dx , R f i l t e r ) ;
taking off all asperities that are smaller than the structuring element delivering a smoother signal
o(x) illustrated as green curve in Fig. 14. The black curve is the input signal z(x) and the red curve
the intermediate signal r(x) obtained after erosion.
Figure 15: The closing filter is the successive application of dilation (Minkowski sum) and then erosion
(Minkowski difference).
d = d i l a t e a e q u i d i s t a n t ( z , dx , R f i l t e r ) ;
c = e r o d e a e q u i d i s t a n t ( d , dx , R f i l t e r ) ;
filling holes that are smaller than the structuring element delivering a smoother signal c(x) illustrated
as red curve in Fig. 15. The black curve is the input signal z(x) and the green curve the intermediate
signal d(x) obtained after dilation. ISO standard 16610-41 describes a circular and a linear structuring
element.
The filter chains start off with very small features / structures and succesively smooth the signal by
removing more and more details meaning enlarging the scale / shrinking the resolution. The sieving
is started with the smallest mesh size successively separating grains of growing size. The filtration
chain (ladder structure) is described in ISO 16610-49.
If there is a bias to the distribution of residuals to a model whose parameters are to be estimated
with respect to the maximum likelihood (MLE) presumption of Gaussian distributed probabilities
showing up as long (sometimes even bumpy) tails, the estimation process needs to be changed.
Multiplication of the residuals respectivley their squares with weights that change their distribution
such that the tails are suppressed forces the parameters to be estimated without being influenced by
outliers (M-estimator). In ISO 16610-31 a filter [6] has been standardized that
1. uses Tuckey’s biweight function for M-estimation to be insensitive to strong tails / outliers and
2. the Gaussian kernel function combined with Savitzky-Golay coefficients for polynomial degree
p = 2 to preserve the second statistical moment, i.e. the shape of peaks (shape retainment).
has been shown with an example of a topography that has been eroded (numerically) on its top
asperities in Fig. 16.
The weights for the M-estimation are a function of the residuals known after estimation but are as
well needed in order to estimate, such that the optimization process has to be performed iteratively,
as shown in Fig. 17. Furthermore, the weights for the M-estimation are a function of the absolute
position of the height values thus they are convolved with the filter kernel of the Gaussian and
Figure 17: M-estimation uses weights that are a function of the residuals such that the optimization
functional is implicit. The solution is searched iteratively.
with
Pn Pn Pn
l=1 ((l − k)∆x)2 s
l,k δl l=1 ((l − k)∆x)3 s l,k δl l=1 ((l − k)∆x)4 s l,k δl
XTk Sk Xk = nl=1 ((l − k)∆x) sl,k δl
Pn Pn
− k)∆x)2 sl,k δl 3s δ
P
l=1 ((l l=1 ((l − k)∆x) l,k l
Pn Pn Pn
2s δ
l=1 sl,k δl l=1 ((l − k)∆x) sl,k δl l=1 ((l − k)∆x) l,k l
(40)
and with
Pn
l=1 ((l − k)∆x)2 s P
l,k δl zl
XTk Sk zP = nl=1 ((l − k)∆x) sl,k δl z P (41)
P
l
Pn
P
l=1 sl,k δl zl
Furthermore
s1,k δ1 0 ... ... 0
z1
0 s2,k δ2 . . . . . . 0
z2
.. .. ..
Sk = . . . and z= (43)
..
.
..
.
0 0
zn
0 ... ... 0 sn,k δn
δ1 δ1 z1P
δ2 δ2 z2P
.. .
.
. .
~δ = ~
δn Zδ = P (45)
δ n zn
0 0
.. ..
. .
0 0
1
The Gaussian kernel as defined in Eq. (28) may be rewritten with factor 2 as known for normal
distributions rather than π
2 2
−(π x
) −( 21 x
)
sν (x) = xν e γ λc
= xν e λc ΛTP
(46)
with
~ ~
F0 (~sν )F0 (δ) F0 (~sν )F0 (Z)
F1 (~sν )F1 (~δ) ~
F1 (~sν )F1 (Z)
A~ν = B~ν = (48)
.. ..
. .
F2m (~sν )F2m (~δ) ~
F2m (~sν )F2m (Z)
with
P∞ R∞
F0 (a) l=−∞ al −∞ a(x) dx
P∞ 1 ∞ 1
−i 2π L l∆x
R −i 2π L x
F1 (a)
l=−∞ al e −∞ a(x) e dx
~
F(a)
P∞
= F2 (a) = −i 2π L2
l∆x =
R∞ 2
−i 2π L x
(49)
l=−∞ al e −∞ a(x) e dx
.. .. ..
. . .
−i 2π 2m 2m
P R∞
∞ l∆x −i 2π x
F2m (a) a
l=−∞ l e L
−∞ a(x) e L dx
−1 P∞ R∞
F0 (b) l=−∞ bl −∞ b(f ) df
i 2π Ll ∆x
R∞
F (b) P∞
−1
i 2π f ∆x df
l=−∞ bl e −∞ b(f ) e
1
~ −1 (b) =
F
P∞
F2−1 (b) = i 2π Ll 2∆x
= ∞ b(f ) ei 2π f 2∆x df
R
(50)
l=−∞ bl e
−∞
.. .. ..
. . .
P
i 2π Ll 2m∆x
−1 ∞ R∞ i 2π f 2m∆x df
F2m (n) l=−∞ bl e −∞ b(f ) e
The terms with the Gaussian kernel can be transformed to Fourier domain analytically and thus
implemented as terms that already exist as Fourier transforms without using any numerical Fourier
transformation for them:
∞ 2
1
Z
1 x
ν −( 2 ) −i 2π l
x
Fl (~sν ) ≡ Fν,l =√ x e λc ΛTP
e L dx (51)
2π λc ΛTP −∞
Be L the length of the profile, n the number of data points, and λc the cut off wave length as nesting
index, then the spatial frequencies f are given by
2π
with f0 = L.
Z ∞ 1
x
2
ν −( 2 ) −ilf0 x
Fν = x e a1
e dx; (54)
−∞
with d1 = a1 f0
√ 1 2
F0 (x) = 2π a1 e− 2 (d1 l)
√ 1 2
F1 (x) = − i 2πa1 a1 d1 l e− 2 (d1 l)
√ 1 2
2π a1 a21 1 − (d1 l)2 e− 2 (d1 l)
F2 (x) =
√ 1 2
F3 (x) = i 2π a1 a31 (d1 l)3 − 3 (d1 l) e− 2 (d1 l)
√ 1 2
2π a1 a41 (d1 l)4 − 6 (d1 l)2 + 3 e− 2 (d1 l)
F4 (x) =
and with
2π
d = λc ΛTP
L
1 2 1 2 1 2
F0,l = e− 2 (d l) ; F1,l = − i (λc ΛTP ) (d l) e− 2 (d l) ; F2,l = (λc ΛTP )2 1 − (d l)2 e− 2 (d l) ;
1 2 1 2
F3,l = i (λc ΛTP )3 (d l)3 − 3 (d l) e− 2 (d l) ; F4,l = (λc ΛTP )4 (d l)4 − 6 (d l)2 + 3 e− 2 (d l)
n−1 L 2
∂2
Z
(z(xi ) − wi )2 + r
X
E= s(x) dx → min (55)
0 ∂x2 wi
i=1
n−1 L 2
∂2
Z
2
X
E= Ψ (z(xi ) − wi ) + r s(x) dx → min (56)
0 ∂x2 wi
i=1
n−1 L
2
∂ s(x) dx → min
X Z
E= |z(xi ) − wi | + r ∂x2 (57)
0
wi
i=1
n−1 L 2
∂2
X Z
E= c |z(xi ) − wi | + r s(x) dx → min (58)
0 ∂x2 wi
i=1
requiring an appropriate factor c to have both terms of the same physical dimension, here to carry
the dimension of a length. Seewig suggests in Leach Characterisation of Areal Surface Texture [15],
chapter 4.2, following definition of c interpreting roughness profiles being a superposition of sinusoidal
waves of various wavelengths (with random amplitudes and phases):
n
π 1X
c = |z(xk ) − wk | (59)
2 n
k=1
With tension term and analogously to the filter equation (15) we have
with the column vectors for the waviness zW := (w1 , . . . , wn )T respectively the robustly estimated
waviness zWs := (w1 , . . . , wn )T and the primary profile zP := (z(x1 ), . . . , z(xn ))T :
c
|z(x1 )−w1 | 0 ... ... 0
.. ..
0 . 0 .
.. .. ..
V=
. 0 . 0 .
(61)
.. ..
. . 0
c
0 ... ... 0 |z(xn )−wn |
As for the robust regression Gaussian, here again, we have an implicite equation that is solved
iteratively using the waviness values wk of the linear filter as start values included into the factor c
and the matrix V and then for each step the predicessor waviness.
Basic concepts of linear filters are given for profiles in ISO 16610-20 and for areal data in ISO 16610-
60. As specific filters, those with [Regressian]-Gaussian (16610-21 / -28 for profiles and 16610-61 for
areal data) are standardized and that with smoothing spline in 16610-22 for profiles.
Basics concepts of robust filters are given for profiles in ISO 16610-30 and for areal data in ISO
16610-70. As specific filters, those with Regressian-Gaussian (16610-31 for profiles and 16610-71 for
areal data) are standardized and that with smoothing spline in 16610-32 for profiles.
Filtration chains for hierarchically sieving of different sizes are specified is ISO 16610-29 (using
discrete wavelet transforms) and ISO 16610-49 (using morphological filters).
Fig. 18 displays the master plan of the ISO 16610 toolbox with the availability state by September
2015.
References
[2] M. Unser, A. Aldroubi, and M. Eden. Recursive regularization filters: Design, proper-
ties, and applications. IEEE Trans. Pattern Analysis and Machine Intelligence, 13(3), 1991.
doi:10.1109/34.75514.
[5] M. Krystek. Transfer functions of discrete spline filters. In Advanced Mathematical Tools in
Metrology III, number 45 in Series on Advances in Mathematics for Applied Sciences, pages
203–210, 1997. doi:10.1142/9789814530293.
[6] Jörg Seewig. Praxisgerechte Signalverarbeitung zur Trennung der Gestaltabweichungen technis-
cher Oberflächen. Shaker, 2000.
[7] J. Seewig. Linear and robust gaussian regression filters. Journal of Physics: Conference Series,
13(1):254, 2005. doi:10.1088/1742-6596/13/1/059.
[8] M. Unser, A. Aldroubi, and M. Eden. Polynomial spline signal approximations: filter design
and asymptotic equivalence with shannon’s sampling theorem. IEEE Trans. Information, 38(1),
1992. doi:10.1109/18.108253.
[9] M. Unser, A. Aldroubi, and M. Eden. A family of polynomial spline wavelet transforms. Signal
Processing, 30(2), 1993. doi:10.1016/0165-1684(93)90144-Y.
[10] M. Unser. Ten good reasons for using spline wavelets. In Wavelet Applications in Signal and
Image Processing V, number 422-431 in Proc. SPIE, 1997. doi:10.1117/12.292801.
[13] D. J. Keller and F. S. Franke. Envelope reconstruction of probe microscope images. Surf. Sci.,
294:409–419, 1993.
[14] J.S. Villarrubia. Algorithms for scanned probe microscope image simulation, surface re-
construction, and tip estimation. J. Res. Natl. Inst. Stand. Technol, 102(4):425–454, 1997.
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.42.4414.
[15] Richard Leach (Ed). Characterisation of Areal Surface Texture. Springer, 2013.
doi:10.1007/978-3-642-36458-7.
[16] G. Fernández, S. Periaswamy, and W. Sweldens. Liftpack: A software package for wavelet
transforms using lifting. In Wavelet Applications in Signal and Image Processing IV, number
396 in Proc. SPIE, 1996. doi:10.1117/12.255250.
Annex
In order to interpolate between signal values of neighboring knots, often polynomials are chosen, such
as Neville polynomial as it is the case for Fernandez-Periaswamy-Sweldens lifting wavelets used in
Annex A of ISO 16610-29:
The interpolated value for some position xinterp between the knots of given values (zν , zν+1 , . . . , zν+p )
be zinterp . The coefficients of the polynomial (β0 , β1 , . . . , βp ) are to be estimated from the p + 1 signal
values (zν , zν+1 , . . . , zν+p ). In ISO 16610-29 cubic polynomials are chosen, i.e. p = 3 and for knots
not directly at the border, the mid position is chosen for interpolation. Furthermore, the polynomial
degree is called p in ISO 16610-31 but Ñ in ISO 16610-29, because Fernandez, Periaswamy and
Sweldens called it Ñ , [16].
Once the coefficients (β0 , β1 , . . . , βp ) are estimated, the interpolated signal would be
p
βj xjinterp
X
zinterp = (62)
j=0
and to obtain the (p + 1) coefficients, we solve the (p + 1) × (p + 1) linear equation system (this is
i.e.
x0ν+0 . . . xjν+0 . . . xpν+0
zν β0
. . .. .. .
.. .. .
. .
.
zν+k = x0ν+k . . . xjν+k . . . p
xν+k βj (64)
.. .. .. .. ..
. . . . .
zν+p x0ν+p . . . xjν+p . . . xpν+p βp
delivers
zν
.. −1 .
..
.
x0interp . . . xjinterp . . . xpinterp xjν+k . . .
zinterp = ... zν+k (65)
.. ..
. .
zν+p
with ~l T = (l0 , . . . , lp ) are the Neville’s polynomial coefficients and as well the Sweldens’ wavelet
and furthermore for the update step to calculate the lifting residuals for smoothing zsmooth (xeven ) =
zsignal (xeven ) + dsmooth
dodd−2∗(p+1)/2
..
.
d odd−2
d odd
dsmooth = ~l T (68)
d odd+2
..
.
dodd+2∗(p+1)/2
The coefficients can be obtained generally for aequidistantly sampled signals, as the sampling interval
cancels when the fraction is reduced.
.. −1
.
~l T = x0interp . . . xjinterp . . . xpinterp xjν+k . . .
... (69)
..
.
where the xν+k are those at the even indexed positions, and xinterp the odd indexed one in the middle.
ISO 16610-29 proposes to use cubic polynomials, i.e. p = 3. Let’s set the x-value for the middle one
to be interpolated xinterp = 0 and those left and right of it at (−3, −1, 1, 3) not confusing x-positions
with indices. Rewriting Eq. 69 specifically, we obtain
−1
(−3)0 (−3)1 (−3)2 (−3)3
(−1)0 (−1)1 (−1)2 (−1)3
~l T = 0 1
0 0 0 0 2 3 (70)
10 11 12 13
30 31 32 33
i.e.
If the polynomial shall be a regression polynomial not just going exactly through the p + 1 (resp.
Ñ + 1) but been fitted to N > p + 1 signal values via LMS estimation, instead of a Neville polyno-
mial interpolation, it is called Savitzky-Golay filter. The coefficients of this filter are estimated by
minimizing the sum of squares of the residuals meaning that there are small finite differences between
the signal values zν and the polynomial wν . The Neville polynomial, however, takes the values of
the signal at the positions xν+k .
N
( )
X
2
min (zν+k − wν+k ) (73)
~ν
β k=0
N
( )
∂ X
(zν+k − wν+k )2 = 0 (75)
∂βν,m
k=0
i.e.
N
X ∂wν+k
2 (zν+k − wν+k ) = 0 (76)
∂βν,m
k=0
i.e.
N N
X ∂wν+k X ∂wν+k
(zν+k ) = (wν+k ) (77)
∂βν,m ∂βν,m
k=0 k=0
rearranging it
p N N
!
X X X
j m
(k ∆x) (k ∆x) βν,j = (k ∆x)m zν+k (80)
j=0 k=0 k=0
.. .. −1 ..
. . .
PN PN
βν,j = . . .
k=0 (k ∆x)j (k ∆x)m . . .
k=0 (k ∆x) mz
ν+k
(82)
.. .. ..
. . .
and choose k = N/2 for the position of which the smoothed signal is to be estimated. A symmetric
filtering around k is obtained for N being odd: N = 2n + 1. Performing a shift of indices in Eq. 83
delivers
.. .. −1 ..
. . .
Pn Pn
βν,j = . . .
k=−n (k ∆x)j (k ∆x)m . . .
k=−n (k ∆x) mz
ν+k
(83)
.. .. ..
. . .
such that the desired mid position x is position at zν and x = 0 · ∆x and the smoothed signal will be
..
p .
X
βν,j 0j = (00 01 . . . 0p )
wν = βν,j
(84)
j=0 ..
.
The Savitzky-Golay filter (or regressian polynomial filter) is moment preserving to the p-th moment.
n
( )
X
min sk (zν+k − wν+k )2 (86)
~ν
β k=−n
with
1 −π ( k ∆x )2
sk = e αλ (87)
αλ
the Savitzky-Golay filter modified by a weight function as Gaussian kernel is referred to as Regression-
Gaussian filter.
n n
X ∂wν+k X ∂wν+k
sk zν+k = sk wν+k (88)
∂βν,m ∂βν,m
k=−n k=−n
i.e.
.. .. ..
. . .
Pn Pn
...
k=−n sk (k ∆x)j (k ∆x)m . . .
βν,j =
m
k=−n sk (k ∆x) zν+k
(89)
.. .. ..
. . .
.. −1 ..
. .
Pn Pn
wν = (1 0 . . . 0)
... k=−n sk (k ∆x)j (k ∆x)m . . .
k=−n s k (k ∆x) mz
ν+k
.. ..
. .
(90)
In ISO 16610-28 it is used to minimize end effects by preserving the mean, i.e. the first moment with
p = 1. In ISO 16610-31 it is used for shape retainment, preserving the width of peaks, i.e. second
moment with p = 2.