Page 1

I.J. Image, Graphics and Signal Processing, 2009, 1, 9-16

Published Online October 2009 in MECS (http://www.mecs-press.org/)

Approximating Spline filter: New Approach for

Gaussian Filtering in Surface Metrology

Hao Zhang

Harbin Institute of Technology, Harbin, China

Email: Zhanghaowo79@163.com

Yibao Yuan

Harbin Institute of Technology, Harbin, China

Email: Yibaoyuan2008@yahoo.cn

Abstract—This paper presents a new spline filter named

approximating spline filter for surface metrology. The

purpose is to provide a new approach of Gaussian filter and

evaluate the characteristics of an engineering surface more

accurately and comprehensively. First, the configuration of

approximating spline filter is investigated, which describes

that this filter inherits all the merits of an ordinary spline

filter e.g. no phase distortion and no end distortion. Then,

the approximating coefficient selection is discussed, which

specifies an important property of this filter-

convergence to Gaussian

approximation deviation between them can be controlled

below, moreover, be decreased to less than 1% when

cascaded. Since extended to 2 dimensional (2D) filter, the

transmission deviation yields within −

proved that the approximating spline filter not only achieves

the transmission characteristic of Gaussian filter, but also

alleviates the end effect on a data sequence. The whole

computational procedure is illustrated and applied to a

work piece to acquire mean line whereas a simulated

surface to mean surface. These experimental results indicate

that this filtering algorithm for 11200 profile points and

2000 × × 2000 form data, only spends 8ms and 2.3s

respectively.

Index Terms—surface metrology,

approximating spline filter, Gaussian filter, form filter

r-the

filter. The maximum

. It is

4.36%

0.63%1.

?

48%

+

profile filter,

I. INTRODUCTION

In conventional surface metrology, surface assessment

is always on profile as the curve of intersection. In recent

years, with improvement of manufacturing techniques

and demand of quality control, three dimensional (3D)

analysis of surface geometry has become more and more

important. Thereunto, mean line is the reference line

about which the profile deviations are measured, mean

surface is the 3D reference surface about which the

topographic deviations are measured[1]. Both the mean

line and mean surface is established by applying a

filtering process to the measured surface. Filters selected

in this establishment have become critical for numerical

_________________________________________________________

Manuscript received January 18, 2009; revised June 19, 2009;

accepted August 22, 2009.

characterization and parameters determination.

The profile filter of Gaussian is the most widely used

filter described in ISO11562 [2], [3]. Gaussian filter is

superior to 2RC filter by two advantages, phase-corrected

property, which is a simpler way to employ by many fast

algorithms [4],[5]. However conventional Gaussian filter

has indelible end effect, even the GR2 haven't resolved it

entirely but with larger computation cost [6]. In fact,

according to the point of view in digital processing,

convolution is the primary reason of end effect. The

output data are the convolution results between the filter

transfer function and input data, then the end effect

generates during this process.

In order to overcome end effect, Krystek proposed a

new spline filter algorithm to substitute for Gaussian

Filter [7]. This method adopts numerical fitting and

matrix equation solution to obtain the mean line, with

result in abandoning the filter's convolution [8],[9].

T.Goto proposed the robust spline filter which is less

influenced by outliers and also implemented through

matrix equation [10].

Both of them can obtain a kind of mean line to analyze

the surface profile. These filters are all designed for

overcoming certain limitations existing in the surface

measurement such as end effect, computing efficiency

and robustness. However, they, besides Numada [11], all

overlook the most important thing, which is the

substitution likelihood for ISO standard of Gaussian.

Above all, Gaussian filter is the ISO11562 standard with

a distinguishing feature of at least space-frequency

product whose cutoff is sufficiency for profile filter. How

to not only preserve Gaussian filter's transmission

characteristic, but also restrain end distortion becomes a

stubborn problem.

In this paper, the new kind of spline filter which not

only inherits the ordinary spline filter quality but

approximates to Gaussian filter is brought forward. i.e., in

bosom of measured data, the filtering results conform to

the ISO standard, at the same time, the end effect is

restrained by numerical fitting technique. In addition, to

3D surface evaluation including enormous amount of

computation due to large quantity of sampling data, it

also yields a fast filtering process.

Copyright © 2009 MECS I.J. Image, Graphics and Signal Processing, 2009, 1, 9-16

Page 2

10 Approximating Spline filter: New Approach for Gaussian Filtering in Surface Metrology

II. APPROXIMATING SPLINE FILTER

The spline filter based on variation differential theory

had been proposed by Schoenberg[12] and Reinsh[13] for

50 years. Poggio applied to the variation spline of

Tikhonov, regularization to image process and stated it as

leading to a Gaussian-like convolution filter[14],[15].

Given a set of measured value sampled

filter is defined as the function:

, the spline

kz

{}

2

2

1

( )

m

()

m

n

kk

k

d s x

dx

z s xdx Min

εμ

=

⎧

⎨

⎩

⎫

⎬

⎭

=−+→

∑

∫

(1)

where

output data, n is the number of measured points, μ is the

LaGrange constant, 2

is order degree of spline. The

differential order m is higher than the spline filter cutoff

is more steplike [16]. Actually, in ordinary condition of

convenient calculation, m is given 2, and the spline is

cubic order. This spline definition can be thought as the

compromise between approximation to data and bending

energy of spline through

μ constant. The functions are

discussed in this literature considering the general case of

equally spaced nodes and a finite number of input data,

for the natural condition of measured profile data.

In order to resolve the problem of end effect existing in

filtering results by Gaussian filter, the spline filter has

been proposed for profile measurement [8]. However,

these spline filters differ greatly from Gaussian

transmission. In fact, for digital instruments, excluding

disadvantage of end effect, Gaussian filter is appropriate

filter for surface profile evaluation, and sufficient to

separate profiles into long wave and shortwave

components. Therefore, (1) is expected to be

reconstructed to perform better realization of Gaussian

filter. In Johannes’ paper [17], a first order differential is

added into the second item of (1) to achieve this pursuit.

So a new type of spline filter named approximating spline

filter in this paper is constructed. The approximating

spline filter is expressed by

is the index for the sampled data,

k

()

k

s x

is the

1

m−

{}

2

2

2

2

1

( )

()

n

kk

k

d s x

dx

z s x

εμ

=

⎧⎛

⎪

⎨⎜

⎪⎩

⎞

⎟

⎠

=−+

⎝

∑

∫

+

2

( )

dx

ds x

dxMin

τ

⎫⎪

⎬

⎛

⎜

⎝

⎞

⎟

⎠ ⎪ ⎭

→

(2)

where τ is the Gaussian approximation coefficient.

Regulating τ properly, the solution of (2) can be close to

the result filtered by Gaussian filter, and (2) can be

named the spline realization of Gaussian filter.

Adapting to digital processing, (2) must be discretized

as the following equation:

{}

{

11

kk

==

where is the difference operator[16], and

∇

∑

(3)

}

2

222

()()

nn

kkkk

zsssMin

εμτ=−+∇+∇→

∑∑

(4)

/ 2

0

{( 1)

−

}

m

mii

mk

kmi

i

sCs+−

⎢

⎣

⎥

⎦

=

∇=⋅

where are polynomial coefficients.

i

m

C

To achieve the minimum of function (3), an equation

similar to partial difference with respect to

implemented by

ε∂

=

∂

There are two types of boundary conditions, which are

the non-periodic data and periodic data [10], thereunto,

the former is also called nature boundary condition.

Depending on the different boundary conditions, we can

deduce different filters that also adapt to different tasks.

For most instances, engineering surfaces possess arbitrary

and non-periodic distribution, for which the nature

boundary condition is needed, that is

1

s

∇=∇

Utilizing equation of (5) and (6) ， the following

equations are constructed:

{

11

1

s

ε∂

= −−+

∂

+

∂

= −−+

∂

∂

= −−+

∂

+

∂

= −−+

∂

For some special cases such as calibration specimens,

their surface present strongly regular and period

distribution, and such a surface should be disposed with

period boundary condition as shown as:

k

s

=

Hence, it introduces another partial difference

equation by (5) and (8)

ε∂

= −−+

∂

We observe that both (7) and (9) can be written as a

kind of uniform matrix equation such as:

()

I Q S

μ+

where is identity matrix,

IZ is the vector of measured

data, and S is the output result data.

coefficient matrix, with (11) and (12) corresponding to

the nature boundary condition and period boundary

condition respectively.

121

2 5 241

14 6 24

Q

τ

− −

⎜

⎜

⎜

⎝

ks

is

0

ks

(5)

22

0

n

s

= (6)

}

{

}

{

}

321

2243

2

21

42

1132

1

1

21

2()2(2)(1)

2()2(4)

(5 2 )

τ

(2)

2()2 (

μ

)

2()2 (4)

(52 )

τ

(2)

2()2 (2)

kkkk

k

nnnn

n

nn

nnnn

n

zssss

zsss

s

ss

zsss

s

zsss

s

ss

zsss

s

ε∂

∂

μττ

μτ

τ

ε

τ

ε

μτ

τ

ε

μτ

−−−−

−

−

−−

= −−+−+++

−++

−+

∇− ∇

−++

−+

−+

{}

(1)ns

τ

⎧

⎪

⎪

⎪

⎪

⎪

⎪

⎪

⎪⎨

⎪

⎪

⎪

⎪

⎪

⎪

⎪

⎪⎩

++

(7)

k

s+n

(8)

42

2()2 (

μ

)0

kkkk

k

zsss

s

τ

∇ − ∇=

(9)

Z

=

(10)

is well-deduced

Q

1

O

14 6 2

4

1

4

+

1

1 5 2

2

− −

2

1

τ

τ

τ

τ

τ

τ

ττ

τ

τ

τ

τ

τ

τ

τ

+

+ − −

+

− −

O

⎛

⎜

⎜

⎜

⎜

⎞

⎟

⎟

⎟

⎟

⎟

⎟

⎟

⎟

⎟

⎠

− −− −

+

O

− −

O

=⎜

⎜

+− −

− −− −

O

(11)

Copyright © 2009 MECS I.J. Image, Graphics and Signal Processing, 2009, 1, 9-16

Page 3

Approximating Spline filter: New Approach for Gaussian Filtering in Surface Metrology 11

6 2

4

1

4

+

114

6 2

4

− −

O

4

+

O

11

6 24

O

1

O

14 6 2

4

1

4

+

1

116 2

4

− −

416 2

+

Q

4

τ

τ

τ

τ

τ

τ

τ

ττ

ττ

τ

τ

τ

τ

τ

ττ

+ − −− −

⎛

⎜

⎜

⎜

⎜

⎞

⎟

⎟

⎟

⎟

⎟

⎟

⎟

⎟

⎟

⎠

− −− −

− −

=⎜

⎜

⎜

⎜

⎜

⎝

− −+− −

− −− −

− −

O

Figure 1. Transmission characteristics of digital filters.

Figure 2. Deviation of transmission characteristics.

(12)

III. APPROXIMATING COEFFICIENT

The weighting function and transmission

characteristics of Gaussian filter are given by

ISO11562[2]:

1

( )

h t

αλ

2

( /

t

)

c

c

e

παλ−

=

2

(/ )

λ

( / )

c

c

He

π αλ−

λ λ=

where α is a constant, ,λ is wavelength，and

off wavelength. When

transmission, then

0.4697

α =

the transmission for the cut-off wavelength is 50% since

the short wave and long wave potions of the surface

profile are separated and can be recombined without

altering the surface profile[2]”

The transmission characteristic of the approximating

spline filter has been derived from (9)[17]:

(4)(1 (6

kkk

zss

μτ μ

−−

=−+++

Using the Z-transform, we get

Z z

the Z-transform of the sampled data

Z-tansform of the solution data s and with filter G(z) is

given by

c λ is cut-

c

λλ

. “It is of importance that

=

, the filter has 50%

211

) )

τ μ

(4

=

)

kkk

s

S z

ss

τ μ

( ) ( )

G z Z z

and

μ

, with

( )

S z

+

+−++

( )

( )

2

+

kz

k

the

221

1

( )

()

exp(

( )

G ω of this regularization filter

1

(1 cos )4 (1 cos )

τμωμ

⋅−+

In (13), there are many different approximation forms

to Gaussian filter obtained by different value τ . Our

purpose is to find a knowable expression as an optimal

choice. `”The closest approximation to the Gaussian

function Fourier spectrum is obtained in the case of

1/

τμ

=

[17]”. In addition, it is obviously reduced to

ordinary spline filter when

τ = .

We have known that the Gaussian filter has 50%

transmission characteristic in the cut-off frequency, this

requirement is also been adopted to spline function, that

is

1

1 2 (1 cos)

c

μω

+⋅−+

For spatial signal,

frequency

2/

d

ωπλ

=

, is sampling interval which is

assumed unit value in this paper for convenience,

and

n

λ = . When

c

λλ

=

,

(4 ) (

τ μ

)

jω

) 1 (6

+ +

yields the discrete

( )

G z

2

G z

zzzz

)

μτ μ

−−

=

+−+++

Substitution of by

Fourier transform

z

−

in

2

( )

1 2

+

G ω=

−

ω

(13)

0

2

1

2

4 (1 cos

μ

−

the

)

digital

c

ω

=

(14)

angle

d

2

c

cn

π

ω =

(15)

From (14) and (15), LaGrange constant μ can be

derived by

1

2

1 2(1 cos)

c

n

It's observed that (16) is a quadratic equation in one

variable with respect to μ , therefore, μ can be solved

as

( 5 1)

μ

=

2

1

2

2

n

4 (1 cos

μ

−

)

c

ππ

μ

=

+⋅−+

(16)

2

4

64sin

cn

π

−

⎛

⎜

⎝

⎞

⎟

⎠

(17)

From this μ , as shown as Fig.1, the frequency

amplitude of an approximating spline filter matches with

that of Gaussian filter well. Fig.4 shows that the

maximum of the amplitude

approximating spline and Gaussian is only 4.26%, which

is even less than many Gaussian filter simplified

algorithms. On the contrary, the maximum of amplitude

deviation between ordinary spline and Gaussian filter is

10.6%, which is illustrated graphically in Fig.2. So it is

clear that approximating spline, not original spline, is

selected as the approximation to Gaussian filter.

deviation between

Approximating spline has no phase shift error, because

the odd order spline is symmetry to a vertical axis whose

property is the same as Gaussian function, and even order

spline also has this property only with a displacement

constant product.

Copyright © 2009 MECS I.J. Image, Graphics and Signal Processing, 2009, 1, 9-16

Page 4

12 Approximating Spline filter: New Approach for Gaussian Filtering in Surface Metrology

IV. CASCADES OF APPROXIMATING SPLINE FILTER

For some special conditions, approximation with

4.26% deviation isn't enough for practice. This filter

algorithm must be improved to fit higher accuracy

Gaussian results. If single step of approximating spline

filter is regarded as a basic process prototype, quadratic

cascades of them can attain better approximating effect.

In these situations, μ must be recalculated, because the

quadratic algorithm should also stand by 50%. The

quadratic algorithm is constructed as

(

G ωτ

) 1 2(1 cos )

μ

⎡

=+⋅−

⎣

The approximating coe

are also calculated by the method introduced, the similar

as (17) in previous section, but

(

μ

=

yright © 2009 MECS I.J. Image, Graphics and Signal Processing, 2009, 1, 9-16 Cop

Figure 3. Transmission characteristics of digital filters.

Figure 4. Deviation amplitude between approximating spline filter and

Figure 5. Approximation deviation of each cascaded spline filter.

2

2

4 (1 cos )

μ

−

ωω

−

⎤

⎦

+

nt and lagrange constant fficie

(18)

)

2

2

4 2 −

4

3 1

−

64sin

cn

π

⎛

⎜

⎝

⎞

⎟

⎠

and

betw

1/

τ

een the q

μ

=

Furthermore, if n cascaded spline filter is executed,

the transmission function is defined as

( ) 1 2 (1 cos )

G ω τμω

⎡

=+⋅−

⎣

where

(

μ

=

2

4 (1 cos )

μ

−

n

ω

−

⎤

⎦

+

(19)

)

2

4

4 23 1

−

64sin

n

cn

π

−

⎛

⎜

⎝

⎞

⎟

⎠

(20)

It's found that if the spline order n is more higher, the

approximation deviation between multiple approximating

ssian filter is more lower, that is,

when , this spline filter approaches Gaussian

transmission characteristic infinitely. In Fig.4, the 30

cascades can approximate to Gaussian filter with

fluctuant but maximum 0.52% deviation.

Fig 5 shows this approximation trend for each

cascading order spline through 1 to 500, in which the

maximum approximation deviations are almost under 1%,

except order 1 and 3 to 11, and generally incline to zero.

The stricter explanation of this trend is referred to central

limit theorem [4]. From above analysis, it is turned out

spline filter and Gau

n → ∞

that quadratic cascaded approximating spline filter is the

optimal choice compromising between efficiency and

precision.

as of old. In Fig.3, amplitude transmission

uadratic cascaded approximating spline and

Gaussian filter is compared, and the maximum deviation

depicted in Fig.3 between them is 0.92%. This result is

considerable satisfying compared with relative deviation

tolerance (-5%～+5%) in ISO11562. See Fig.3, their

transmission characteristics is superposition each other

ultimately.

V. TWO DIMENSIONAL FILTER

3D surface analysis presents the geometrical form of

an area on a work piece more particularly than the profile

of 2D. The mean surface, similarly to mean line for

profile, established by the form filter, is a reference

surface for 3D surface evaluation. A roughness surface is

obtained by subtracting the mean surface from the

primary surface.

Extending the weighting function of Gaussian filter to

2D, we obtain the 2D Gaussian filter for 3D surface

measurement

⎧

⎪

=⋅−

⎨

⎪

⎩

whose transmission characteristic is given as

2

2

1

( , )

h x y

exp

xc yc xcyc

xy

π

ββλ λλλ

⎫

⎪

⎬

⎪

⎡

⎢

⎢

⎣

⎤

⎥

⎥

⎦⎭

⎛

⎜

⎝

⎞

⎟

⎟

⎠

⎛

⎜

⎝

⎞

⎟

⎠

+⎜

(21)

Page 5

Approximating Spline filter: New Approach for Gaussian Filtering in Surface Metrology 13

2

2

(,) exp

yc

xc

xy

xy

H

λ

λ

λ

λ

λ λπβ

−

⎧

⎪

⎨

⎪

⎩

⎫

⎪

⎬

⎪

⎭

⎡

⎢

⎢

⎣

⎤

⎥

⎥

⎦

⎛

⎜

⎝

⎞

⎟

⎟

⎠

⎛

⎜

⎝

⎞

⎟

⎠

= +⎜

Figure 6. The transmission characteristic of 2D approximating spline

filter.

Figure 7. The deviation between the transmission characteristics of

approximating spline filter and Gaussian. approximating spline filter and Gaussian.

between the transmission characteristics of

(22)

where

and y axis. When

amplitude transmission is appealed for 50%, then

ln2/

βπ=

.

In general, (22) can be reduced to the product form of

two independent Gaussian filters:

⎧

⎪

=−

⎨

⎪

⎩

⎧

⎛

⎪

=−

⎨⎜

⎝

⎪

⎩

=⋅

which clearly indicates that it is a simple realization of

2D Gaussian filter and that it can be achieved by

employing two 1D process to x-coordinate and y-

coordinate respectively.

The 3D surface evaluation, the total number of pending

data is so enormous that original spline filter requires

maximum of 1h for computation, hence, we should pay

more attention to the implementing of efficient

processing algorithm [16]. On the other hand, the data

corresponding one direction section of 3D is down-

sampling generally in contrast to profile, it need to

alleviate the end effect more necessarily for preserving

limit valid data. Here, we select the 2D approximating

xc

λ and

yc

λ is the cut-off wavelength along x axis

λλ=

,

x xc

y λ = ∞ or

y yc

λλ=

,

x λ = ∞ , the

2

2

(,) exp

yc

xc

xy

xy

H

λ

λ

λ

λ

λ λ πβ

⎫

⎪

⎬

⎪

⎭

⎡

⎢

⎢

⎣

⎤

⎥

⎥

⎦

⎛

⎜

⎝

⎞

⎟

⎟

⎠

⎛

⎜

⎝

⎞

⎟

⎠

+⎜

2

2

expexp

()()

yc

xc

x

xy

HH

λ

λ

λ

λ

πβ πβ

−

λλ

⎧

⎪

⎨

⎪

⎩

⎫

⎪⎬

⎪ (23)

⎫

⎪

⎪

⎭

⎛

⎜

⎜

⎝

⎞

⎟

⎟

⎠

⎞

⎟ ⎬

⎠

⋅

⎭

y

spline filter as the form filter to extract mean surface. The

similar to 2D Gaussian filter, a 2D approximating spline

filter can also be obtained by extending respectively two

1D approximating spline filter along x-direction and y-

direction, whose results are composed for a whole 3D

reference surface. According to above discussion, we

have known the approximating filter can approximate to

the transmission characteristic of Gaussian filter with

admissible tolerance. The 2D approximating spline filter

can also approach the 2D Gaussian filter with high

accuracy.

Fig. 6 shows the transmission characteristic of 2D

approximating spline filter of quadratic cascades. Fig.7

describes the deviation between the 2D approximating

spline filter and Gaussian filter, the deviation is limited in

-0.63%1.48%

+

?

, which is acceptable outcome for most

assessments of 3D surfaces.

VI. THE ALGORITHM

In previous sections, we present the configuration of

approximating spline filter,

approximation property with Gaussian filter particularly,

in this section, an efficient fast algorithm to implement

approximating spline filter will be introduced. Observing

(10), it is distinctly that this filter algorithm to profile data

will be solved by matrix technique, which is discussed by

three step as follows:

a) Compute μ by (17), and defined (

still a positive definite matrix and diagonal dominant.

b) can be disposed based on Cholesky

decomposition. QR

, then

=

c) Assuming DRSY

=

, the algorithm can be divided

into

R YZ

=

and

RSD−

=

Y .

d) If cascaded algorithm needed, repeat step c) with

designed cascaded order iteration, else end. Note μ is

calculated depend on the cascaded order by (20).

It has related that 2D filter for 3D surface evaluation

can also be realized by this spline filter, who will perform

respectively the algorithm related above along the x-

coordinate, then along x-coordinate in successive order,

and achieve the approximating results to 2D Gaussian

filter.

In fact, this algorithm is similar to Krystek's[7]. This

algorithm denotes a complete matrix calculation without

the convolution between data and discrete filter, and

doesn't need a data preparation stack. Therefore there is

almost no end distortion during this process. This good

property will be testified by the experiments of next

section.

and explain the

. as

'

)

IQQ

μ+=

'

Q

'

Q

'

TDR

T

R DRSZ

=

.

T

1

VII. EXPERIMENTS AND DISCUSSION

Copyright © 2009 MECS I.J. Image, Graphics and Signal Processing, 2009, 1, 9-16