![](https://csdnimg.cn/release/download_crawler_static/16052992/bg4.jpg)
Sensors 2020, 20, 4941 4 of 16
laser sensor at each point of the edges. It is also convenient to change measured points since they are
captured simultaneously.
Sensors 2020, 20, x FOR PEER REVIEW 4 of 16
(a) (b) (c)
Figure 2. Processed image: (a) Original image; (b) Grayscale image; (c) Edges in the image.
When the camera is not very close to the object or the camera does not have high resolution, the
accuracy obtained is usually not adequate. There are two approaches to enhance it. One is to use a
higher resolution camera. The other way is to use the sub-pixel technology to improve accuracy of
the image analysis. Some researchers have incorporated the subpixel technique to the conventional
template matching methodology, mostly using interpolation. In this paper, edge detection method is
combined with the subpixel technique to achieve better accuracy. After the displacement at an
integer-pixel level is obtained, the subpixel technique based on Zernike moment method could be
used to obtain subpixel level displacements and achieve more accurate results. At the same time, to
convert the displacement in pixel to the real physical distance, a relationship between the pixel and
physical coordinates needs to be established.
3. Principles of Zernike Moment-Based Subpixel Edge Detection
Photo images are very sensitive to noises such as change in brightness and the vibration of the
camera. Zernike moment is an integral operator that filters these effects and helps improve the
displacement measurement accuracy. Zernike moment has the property of rotation invariance [20,21],
which can be written as,
𝑍′
,
=𝑍
,
𝑒𝑥𝑝(−𝑗𝜙)
(1)
where 𝑍
,
is the original n by m Zernike moment matrix; 𝑍′
,
is the transferred Zernike moment
matrix; j is the imagery identifier; and 𝜙 is the rotation angle.
Figure 3 contains a model of the edge. Figure 3b is obtained when Figure 3a is rotated clockwise
about the origin by ϕ. In the figure, S is the edge, h and h + k are the values of grayscale of two sides
about S, l is the perpendicular length from the origin to S and ϕ is the angle between l and x-axis. In
Equation (1) and Figure 2, Z'_(n,m) is the Zernike moment after the rotation. The exact coordinates
of the edges will require k, l, and ϕ. Each Zernike moment element is defined in Equation (2).
Each Zernike moment element is defined in Equation (2).
(a) (b)
Figure 3. Model of edge: (a) Original edge and (b) Edge after rotation.
𝑍
,
=
𝑛+1
𝜋
𝑉
_
,
Figure 2. Processed image: (a) Original image; (b) Grayscale image; (c) Edges in the image.
When the camera is not very close to the object or the camera does not have high resolution, the
accuracy obtained is usually not adequate. There are two approaches to enhance it. One is to use a
higher resolution camera. The other way is to use the sub-pixel technology to improve accuracy of
the image analysis. Some researchers have incorporated the subpixel technique to the conventional
template matching methodology, mostly using interpolation. In this paper, edge detection method
is combined with the subpixel technique to achieve better accuracy. After the displacement at an
integer-pixel level is obtained, the subpixel technique based on Zernike moment method could be used
to obtain subpixel level displacements and achieve more accurate results. At the same time, to convert
the displacement in pixel to the real physical distance, a relationship between the pixel and physical
coordinates needs to be established.
3. Principles of Zernike Moment-Based Subpixel Edge Detection
Photo images are very sensitive to noises such as change in brightness and the vibration of
the camera. Zernike moment is an integral operator that filters these effects and helps improve the
displacement measurement accuracy. Zernike moment has the property of rotation invariance [
20
,
21
],
which can be written as,
Z
0
n,m
= Z
n,m
exp(− jφ) (1)
where
Z
n,m
is the original n by m Zernike moment matrix;
Z
0
n,m
is the transferred Zernike moment
matrix; j is the imagery identifier; and φ is the rotation angle.
Figure 3 contains a model of the edge. Figure 3b is obtained when Figure 3a is rotated clockwise
about the origin by
φ
. In the figure, S is the edge, h and h + k are the values of grayscale of two sides
about S, l is the perpendicular length from the origin to S and
φ
is the angle between l and x-axis. In
Equation (1) and Figure 2, Z’_(n,m) is the Zernike moment after the rotation. The exact coordinates of
the edges will require k, l, and φ. Each Zernike moment element is defined in Equation (2).
Z
n,m
=
n + 1
π
x
x
2
+y
2
≤1
V
n,m
f
(
x, y
)
dxdy (2)
Z
n,m
is the Zernike moment of
f
(
x, y
)
at rank n.
V
n,m
is the conjugate function of
V
n,m
, the integral
core function. The discrete form of Zernike moment can be written as in Equation (3).
Z
n,m
=
n + 1
π(N − 1)
2
N
X
i=1
N
X
j=1
f
x
i
, y
j
V
n,m
x
i
, y
j
(3)
where N is the number of the integration points, x
i
, y
j
are the coordinates of the integration points, and
f(x
i
, y
j
) is the grayscale of the pixel.
Z
0,0
,
Z
1,1
, and
Z
2,0
are used to calculate the edges at subpixel level. Their integral core functions
are V
0,0
= 1, V
1,1
= x − yj, and V
2,0
= 2x
2
+ 2y
2
− 1, respectively (Table 1).