# Adaptive Fractional Differentiation Harris Corner Detection Algorithm for Vision Measurement of Surface Roughness

Authors: Rui-Yin Tang; Zhou-Mo Zeng
Journal: Advances in Mathematical Physics
 (2014)

---

## Abstract

The Harris algorithm via fractional order derivative (the adaptive fractional differentiation Harris corner detection algorithm), which adaptively adjusts the fractal dimension parameter, has been investigated for an analysis of image processing relevant to surface roughness by vision measurements. The comparative experiments indicate that the algorithm allows the edge information in the high frequency areas to be enhanced, thus overcoming shortcomings. The algorithm permits real-time measurements of surface roughness to be performed with high precision, superior to the conventional Harris algorithm.


---

## Body

## 1. Introduction

Fractional calculus theory [1–5] has increasingly focused on various applied areas. In this context, fractional-order viscoelasticity [6, 7], continuous-time finance [8], population dynamics [9], fractional-order feedback control [10], fractional-order fluid mechanics [11], the fractional-order supersymmetric theory in quantum mechanics [12], fractional conservation laws [13], fractional-order operators to electrocardiogram signals [14], fractional Lorenz system [15], subdiffusion phenomena [16], and granular mechanics [17] have been intensively studied.In the context of surface analysis, fractals have been applied to model the behaviors of complex surface structures [18–23]. As a power mathematical tool the fractional calculus has been suggested to be adequate dealing with phenomena with fractals complexities (see [24–27] and the cited references therein).The rapid development of computer technologies allows a variety of algorithms based on fractional calculus to 2D image processing to be developed [28–31]. Recently, analyzing surface roughness of a hard disk by visual measurements and assessment of the measurement precision (less 20 μm), the effects on the processing of images captured by a camera have been developed through improved Harris algorithm employing fractional calculus [30]. The aim of this paper is to propose the adaptive fractional differentiation Harris corner detection algorithm for vision measurement of surface roughness.The paper is organized as follows. Section2 presents the system of visual measurement for surface roughness. Section 3 gives the theoretical basis for image corner detection and edge detection, too. Section 4 develops an adaptive fractional differentiation Harris algorithm for image corner detection. Section 5 outlines the main results and the conclusions.


## 2. The System of Visual Measurement for Surface Roughness

The system for visual measurement of surface roughness consisting of a projector creating a thin line of light, camera, position system, and a hard disk is shown in Figure1.Figure 1
Structure of the system of vision measurement.The procedure used to measure structured light is as follows.(i)
First, a thin luminous straight line is generated and projected onto the surface of the object that is to be measured using the laser line projector.
(ii)
Then, a stripe imageo
c
-
x
c
y
c
z
c modulated by the object height is formed by the camera. The camera coordinate system (see Figure 2) is defined by the world coordinate system (o
w
-
x
w
y
w
z
w) of the hard disk measurement system. The point O
c is the center of the perspective projection, while o
c
z
c is the optical axis of the camera. Additionally, o
i
-
x
i
y
i is the image coordinate system, where o
i is the point of intersection between the optical axis o
c
z
c and the image plane. The distance between points o
i and o
c is the focal length.
(iii)
When a linear structured laser light is projected to the plane a certain pointP
C
(
x
c
,
y
c
,
z
c
) of the studied surface is projected through the center of the lens to the point P
d in the image plane.
(iv)
The points such asP
C depend on the height of the object. Thus, if the object onto which the laser line is projected differs in height, the line is not imaged as a straight line but represents a profile of the object allowing the differences in heights of the object to be determined. In order to gather many object profiles the object moves by means of a scanning system.Figure 2
Structured light vision measurement principle.The transformations from the pixel coordinates to the world coordinate system can be expressed mathematically as follows:(1)
Z
c
[
u
v
1
]
=
[
1
d
x
0
u
0
0
1
d
y
v
0
0
0
1
]
×
[
f
0
0
0
f
0
0
0
1
0
0
0
]
[
R
t
0
1
]
[
X
w
Y
w
Z
w
1
]
=
[
a
x
0
u
0
0
0
a
y
v
0
0
0
0
1
0
]
[
R
t
0
1
]
[
X
w
Y
w
Z
w
1
]
,
where
(2)
a
x
=
f
d
x
,
a
y
=
f
d
y
.
In order to calculate 3D world coordinates P
(
x
w
,
y
w
,
z
w
) based on 2D image coordinates (
u
,
v
) the light plane equation should be defined by the equation
(3)
z
w
=
a
w
x
w
+
b
w
y
w
+
c
w
.The precision with which the 2D image coordinates(
u
,
v
) are processed determines the precision of the 3D world coordinates P
(
x
w
,
y
w
,
z
w
) that directly affects the precision in the surface roughness measurements. Therefore, precise extraction of the 2D coordinates (
u
,
v
) in the image processing section (see Figure 1) is of primary importance.In the hard disk image, the highlighted areas have to be measured which invokes both the corner detection and the edge detection algorithms to be developed and consequently their image coordinates to be determined.


## 3. Theoretical Analyses of the Image Corner Detection and Edge Detection

There exist a variety of corner and edge detection algorithms, such as the Moravec corner detection algorithm [28], the Harris corner detection algorithm [29], and the SUSAN corner detection algorithm [30]. In this context, Schmid [31] reported a comparative analysis of various corner detection algorithms and revealed that the Harris algorithm has the best detection performance. The Harris algorithm has been widely applied due to its simplicity in extraction of image corners. The detection results are not affected by factors such as image rotation and light intensity, for example. Moreover, the operator introduces a Gaussian smoothing template in processing calculations which makes the algorithm robust.In accordance with the Harris corner detection algorithm a buttery hatch centered by pixel point(
x
,
y
) moves with velocity u along the X direction and moves with velocity v along the Y direction. The following analytical expression describes the gray level change:
(4)
E
(
x
,
y
)
=
∑
n
,
v
w
u
,
v
[
I
x
+
u
,
y
+
v
-
I
u
,
v
]
2
=
∑
u
,
v
w
u
,
v
[
x
∂
I
∂
X
+
y
∂
I
∂
y
+
O
(
x
2
,
y
2
)
2
]
2
,
where
(5)
∂
I
∂
x
≈
I
⊗
(
-
1,0
,
1
)
,
∂
I
∂
y
≈
I
⊗
(
-
1,0
,
1
)
T
.Let us denote(6)
A
=
(
∂
I
∂
x
)
2
⊗
w
,
B
=
(
∂
I
∂
y
)
2
⊗
w
,
C
=
(
∂
I
∂
x
×
∂
I
∂
y
)
2
⊗
w
,
where
(7)
w
=
exp
⁡
[
-
1
2
(
u
2
+
v
2
)
δ
2
]
is the Gaussian smoothing template, which improves the algorithm’s ability to resist noise. Usually, both ϕ
∈
(
0.8,1.2
) and
(8)
E
(
x
,
y
)
=
A
x
2
+
2
C
x
y
+
B
y
2
result in the quadratic form of E
(
x
,
y
) being
(9)
E
(
x
,
y
)
=
(
x
,
y
)
M
(
x
,
y
)
T
,
where
(10)
M
=
[
A
C
C
B
]
.
The partial autocorrelation function is very close.The corner response function can be defined as(11)
C
(
x
,
y
)
=
Det
(
M
)
-
k
Trac
e
2
(
M
)
,
where Det
(
M
)
=
A
B
-
C
2 is the value of the determinant of the matrix and Trace
(
M
)
=
A
+
B denotes the matrix trace.Letλ
1 and λ
2 be two eigenvalues of M. If λ
1 and λ
2 are large and C
(
x
,
y
)
>
0, then the local white correlation function has a peak which is a corner point. Otherwise, if λ
1
>
λ
2 and C
(
x
,
y
)
<
0, then the point belongs to the image edge; if C
(
x
,
y
)
→
0 it is shown the point is in an area of unconspicuous gray change. Figure 3 shows results from processing results before and after application of the Harris corner detection algorithm.Processing results before and after application of the Harris corner detection algorithm: (a) original hard disk image; (b) hard disk image processed by the Harris algorithm.
(a)
Original hard disk image
(b)
Hard disk image processed by the Harris algorithm


## 4. The Adaptive Fractional Differentiation Harris Corner Detection Algorithm

Developing the adaptive fractional differentiation Harris corner detection algorithm we have to introduce some definitions of fractional-order differentiation [30].Let the signalf
(
t
)
∈
[
a
,
t
]
(
a
<
t
,
a
∈
R
,
t
∈
R
) exit the m
+
1 order derivative. For v
>
0, the fractional differentiation of v order is defined as [30]
(12)
d
v
f
(
t
)
d
t
v
≈
f
(
t
)
+
(
-
v
)
f
(
t
-
1
)
+
(
-
v
)
(
-
v
+
1
)
2
f
(
t
-
1
)
+
(
-
v
)
(
-
v
+
1
)
(
-
v
+
2
)
6
f
(
t
-
3
)
+
⋯
+
Γ
(
-
v
+
1
)
n
!
Γ
(
-
v
+
n
+
1
)
f
(
t
-
n
)
.
Because the signal is digital, the first order signal is extended to 2D image signal f
(
x
,
y
). In this context, the 3
×
3 fractional differentiation of signal f
(
x
,
y
) is
(13)
∂
f
(
x
,
y
)
∂
x
v
≈
(
-
v
)
f
(
x
+
1
,
y
)
+
f
(
x
,
y
)
+
(
-
v
)
(
-
v
+
1
)
2
f
(
x
-
2
,
y
)
,
∂
f
(
x
,
y
)
∂
y
v
≈
(
-
v
)
f
(
x
,
y
+
1
)
+
f
(
x
,
y
)
+
(
-
v
)
(
-
v
+
1
)
2
f
(
x
,
y
-
2
)
.Detecting the corner of high complexity texture image, it was detected that the Harris algorithm provides false corner points. Precisely, as a consequence of the first step of the Harris algorithm (see (5)) the first order differentiation can result in missing of details of many low-frequency region textures and consequently a lot of texture information cannot be retrieved. Moreover, many false corners simultaneously appear as it is shown in Figure 4. Therefore, the low-frequency extraction precision of corner points by the Harris algorithm needs to be improved. The improvement developed in this paper is based on adaptive fractional differentiation.Figure 4
Fake corners in an image processed by the Harris algorithm.As a first step in the improvement of the conventional Harris algorithm the Prewitt operator is replaced by fractional differentiation mask (the fractional differentiation mask in thex and y directions is given in Table 1).Table 1
Fractional differentiation mask applied in thex direction shown in (a) and y direction shown in (b).
(a)
Mask applied in thex direction
0
v
2
-
v
2
0
0
1
0
0
-
v
0
(b)
Mask applied in they direction
0
0
0
v
2
-
v
2
1
-
v
0
0
0The fractal dimension represents the texture complexity and determines the order number of the fractional differentiation. As a consequent step a score box dimension algorithm [30] is used to calculate the order of fractional differentiation.The experimental results reveal a nonuniform distribution of the gray image complexity that if the score box dimension is used [2,3], the fractal dimension of the complex texture image can be recovered [2.7,3]. In order to recover the fractional differentiation order at [0,1] taking into account the complexity of the image texture, the interval [2,2.7] is amplified and mapped to [0.3,1]; inasmuch the interval [2,2.7) is simultaneously zoomed out and mapped to [0,0.3).Because differential operation details can be easily lost in images having rich textures there exists a negative correlation between the complexities and the image texture. The order numberv is defined as
(14)
v
=
{
1
-
⌊
10
×
(
(
D
-
2
)
×
7
3
-
4
3
)
⌋
÷
10
D
>
2.7
,
1
-
⌊
10
×
(
(
D
-
2
)
×
3
7
)
⌋
÷
10
D
<
2.7
.The proposed results relevant to corner extraction developed by the adaptive fractional differentiation Harris algorithm are shown in Figure5.Figure 5
Results of corner extraction using the adaptive fractional differentiation Harris corner detection algorithm.A comparison between analysis of the original Harris algorithm and the adaptive fractional differentiation Harris corner detection is illustrated by Figure6. In general, details of many low-frequency region textures are missing if the original Harris algorithm is applied (see Figure 6(a)); many texture details remain (indicated by the yellow ellipse) invisible. The results of the adaptive fractional differentiation Harris corner detection algorithm are shown in Figure 6(b). The image can be subsequently processed by application of common methods, such as the morphology and gray centroid methods; the results of light stripe center extraction are shown in Figure 7. The light stripe center region marked by A in Figure 7(a) is obviously inaccurate, whereas the light stripe center marked B in Figure 7(b) is more accurate than Figure 7(a).Comparison between the results of the original Harris algorithm and the improved Harris algorithm.
(a)
Result of the original Harris algorithm
(b)
Result of the improved Harris algorithmLight stripe center extraction comparison.
(a)
Light stripe center extraction result based on Figure6(a)
(b)
Light stripe center extraction result based on Figure6(b)The results reported in the previous section reveal that the fractional differentiation has advantages with respect to the first order differential used in the Prewitt operator. It is well-known that the differential operation promotes high-frequency signals and weakens the low-frequency signals. As the order number increases, the more intensely high-frequency signals are enhanced and low-frequency signals are weakened. The order number of fractional differentiation is lower than that of integer order counterpart and the fractional differentiation is strengthening the high-frequency signals and the low-frequency parts of the signals remain as a nonlinearity. Comparing to the integer order differentiation, the fractional differentiation allows retaining more texture information in the low-frequency areas, thus maintaining the target contour of the image. Moreover, the fractional differentiation can enhance the edge information of high-frequency areas.The data in Table2 present the heights measured when the original Harris algorithm (V1) and the adaptive fractional differentiation Harris corner detection algorithm (V2) are used to process the stripe image. These data indicate that the highest measurement precision error of V2 is about 0.023 mm. It sufficiently satisfies the measurement requirements of the hard disk plane and is less than that of V1, too.Table 2
Comparison of the measurement precision.
Measurement point
Measured height V1 (mm)
Measured height V2 (mm)
Standard height (mm)
V2 error (mm)
P1
23.281
23.398
23.412
−0.014
P2
4.368
4.224
4.201
0.023
P3
23.350
23.397
23.420
−0.023
P4
21.782
21.701
21.611
0.090
P5
9.435
9.403
9.418
−0.015
P6
16.673
16.518
16.541
−0.023
P7
8.425
8.497
8.507
−0.010
P8
6.247
6.334
6.313
0.021
P9
6.269
6.345
6.327
0.018
P10
23.359
23.429
23.446
−0.017


## 5. Conclusion

Large number of false corner points generated by the conventional Harris algorithm when image textures are complex have been avoided by application of the adaptive fractional differentiation. The Harris corner detection algorithm with implemented adaptive fractional differentiation is for the first time suggested in this paper as a principle contribution improving the data processing. The adaptive fractional differentiation allows the improved Harris corner detection to retain more texture information in low-frequency areas, thus maintaining the target contour of images and enhances the edge information of high-frequency areas in a manner better than the conventional Harris algorithm. The proposed algorithm enhances the Harris algorithm for visual measurements relevant to surface roughness of hard disks.



---

*Source: 494237-2014-04-17.xml*