Anda di halaman 1dari 7

Journal of Materials Processing Technology 172 (2006) 195201

On-line measurement of deposit dimension in spray


forming using image processing technology
Qu Ying-dong
a,
, Cui Cheng-song
a
, Chen Shan-ben
b
, Li Qing-chun
a
a
School of Material Science and Engineering, Harbin Institute of Technology, 150001 Harbin, China
b
School of Material Science and Engineering, Shanghai Jiaotong University, 200030 Shanghai, China
Received 27 May 2003; received in revised form 3 August 2005; accepted 19 October 2005
Abstract
Image processing technology, which offers a new approach for on-line deposit dimension measurement in spray forming, has been developed
in this paper. First, an adaptive smoothing operator is used to eliminate noise based on analysis of the resource of image noise. Second, a new edge
detection operatorSobelZernike moments operator is used to detect the edge of deposit image. Lastly, the characteristic deposit dimension such
as outer diameter of a tubular deposit is calculated. Test of this new image processing method shows that the whole running time of one image
processing is less than 0.987 s, while the relative error of deposit dimension measurement is lower than 0.32%, indicating that this is an on-line
accurate measurement method for deposit dimension in spray forming process.
2005 Elsevier B.V. All rights reserved.
Keywords: Spray forming; Deposit dimension; On-line measurement; Image processing
1. Introduction
In spray forming process, liquid metal is atomized by high
speed inert gas into variously sized droplets, which are then pro-
pelled away from the region of atomization and sprayed toward
a moving substrate to forma near fully dense and near-net shape
preform [1,2]. The dimension precision of the near-net preform
can be improved by using process control technology. To achieve
this goal, the deposit dimension should be measured before con-
trol technology is applied. In general, measuring technologies
for deposit dimensions can be classied into contact measure-
ment and non-contact measurement. The deposit surface is in
semi-solid state during spray deposition process, so non-contact
measurement is more suitable for measuring deposit proles.
As one of the non-contact measurement technology, image pro-
cessing technology has many advantages: (1) non-contact mea-
surement has no interference with the spray forming process;
(2) based on image processing technology, deposit dimensions
in different positions can be measured simultaneously; (3) using
advanced image processing technology, deposit dimensions can
be measured quickly and accurately, meeting the requirement of

Corresponding author. Tel.: +86 451 6414797.


E-mail address: quyingdong@163.com (Q. Ying-dong).
on-line process control. In earlier reports about image process-
ing technology, infrared thermal imaging camera has been used
to measure deposit surface temperature, static nozzle tempera-
ture, transient nozzle temperature and melt temperature during
spray deposition [3,4]. However, many problems must be solved
such as wavelength choice, optical access, contamination, signal
attenuation and system calibration before using infrared ther-
mal imaging technology. In this study, a normal CCD camera
has been utilized to measure the deposit dimensions. The image
processing algorithmmust be strictly chosen in order to measure
deposit dimensions quickly and accurately [5]. Edge detection
technique has been developed as the critical part of image pro-
cessing process for deposit dimension measurements.
Edge detection is an essential technique in many image pro-
cessing applications such as object recognition, motion analysis,
etc. From the view of accuracy, this technique can be classied
into pixel-level and subpixel-level edge detection. Early edge
detection method employed local operators to locate edge with
approximately computing the rst derivative or second deriva-
tive of the image gray level step in the spatial domain, Prewitt
operator, Sobel operator, Marr-Hildreth operator and Canny
operator are examples of pixel-level edge detection methods
[6,7]. Recently, some new edge detection methods using neu-
ral network technique and fuzzy reasoning technique have been
developed [8,9]. All these methods are in pixel-level, which
0924-0136/$ see front matter 2005 Elsevier B.V. All rights reserved.
doi:10.1016/j.jmatprotec.2005.10.004
196 Q. Ying-dong et al. / Journal of Materials Processing Technology 172 (2006) 195201
Fig. 1. The scheme of image processing system.
can quickly locate the body edge in an image, but with low
precision.
Subpixel-level methods can overcome the problem of loca-
tion accuracy. One of the early techniques for subpixel edge
detection was proposed by Hueckel [10]. In the recent years,
Ghosal et al. introduced a new edge detection method, which
only requires three masks to evaluate four parameters of an ideal
step edge based on Zernike moments theory. The main advantage
of this method is the run time of image processing can be reduced
33% compared to moment-based-edge operator [11,12].
The advantage of pixel-level edge detection method is short
running time, while the advantage of subpixel-level edge detec-
tion method is high precision. In this study, a new method
that combines pixel-level detection with subpixel-level detec-
tion to locate object edge has been introduced. This method is
called SobelZernike moments operator, an on-line measure-
ment method with subpixel detection precision.
2. Eliminating noise from original image
The scheme of image capture and processing systemis shown
in Fig. 1. In spray forming process, noise to image capture is
apparently evident, which not only has a negative inuence on
the quality of image, but also make the measurement inaccurate.
Based on the following description, an adaptive smoothing oper-
ator is used to eliminate noise in an image: over-spray of metal
powders is the main source of noise, which attenuates optical
signal intensity and result in unclear edge between object and
background. As the second source of noise, random noise exists
in the image too. Normal average smoothing method is available
for eliminating random noise, but makes the edge faint. Adap-
tive smoothing operator is a completely different method from
average smoothing, capable of both eliminating noise and mak-
ing the edge sharp. The details of adaptive smoothing operator
can be given as:
To calculate the gradient of every pixel G
x
(x, y), G
y
(x, y)
G
x
(x, y) =
1
2
[f(x + 1, y) f(x 1, y)] (1)
G
y
(x, y) =
1
2
[f(x, y + 1) f(x, y 1)] (2)
To determinate the weight coefcient
w(x, y) = exp
_

G
2
x
(x, y) + G
2
y
(x, y)
2k
2
_
(3)
To calculate new prey f
t
(x, y)
f
t
(x, y) =

+1
i=1

+1
j=1
f
t
(x + i, y + j)w
t
(x + i, y + i)

+1
i=1

+1
j=1
w
t
(x + i, y + i)
(4)
where k is used to decide how much change of gray level of
an image can be considered as an edge point, parameter t is
iterative times. In this paper, when selecting k =2 and t =1, the
image qualityis improvedwell. Fig. 2(a andb) shows the original
images of a spray formed tubular product and the image after
eliminating noise, respectively.
3. SobelZernike moments operator
Any image processing singly using pixel-level or subpixel-
level operator can not realize the operation of both quickly and
accurately detecting object edge simultaneously, but the new
edge detection operator we proposed here, i.e., SobleZernike
moments operator, can make it. This approach consists of two
steps: at rst the pixel-level Sobel operator is used to approxi-
mately detect all probable edge points; secondly among all the
Fig. 2. Images of a tubular deposit by spray forming. (a) Original deposit image and (b) image of deposit after eliminating noise.
Q. Ying-dong et al. / Journal of Materials Processing Technology 172 (2006) 195201 197
found edge points, the subpixel-level Zernike moments operator
is used to relocate the edge with subpixel precision.
3.1. Using Sobel operator to quickly detect all probable
edge points
The details of Sobel operator are given as:
Calculating partial derivative in x and y directions
S
x
= {f(x + 1, y 1) + 2f(x + 1, y)
+f(x + 1, y + 1)} {f(x 1, y 1)
+2f(x 1, y) + f(x 1, y + 1)} (5)
S
y
= {f(x 1, y + 1) + 2f(x, y + 1)
+f(x + 1, y + 1)} {f(x 1, y 1)
+2f(x, y 1) + f(x + 1, y 1)} (6)
Calculating the gradient according to Eq. (7), and determining
the edge point
g(x, y) =
_
(S
2
x
+ S
2
y
), g(x, y) > t (7)
Selecting a threshold t, if g(x, y) >t, then point (x, y) is considered
as an edge point and herein t =60.
All edge points must be marked, thereafter these points will be
used for edge recognition by Zernike moments operator. Sobel
operator also can be expressed as the form of two masks as
shown in Fig. 3. These two masks are used to calculate S
x
and
S
y
, respectively. The edge image by Sobel operator is shown in
Fig. 4, where the white line is the deposit edge. It can be seen in
Fig. 4 that the edge line is very thick and some false edge points
are present in this image.
3.2. Zernike moments operator [12]
The main idea of Zernike moments operator is to calculate
four parameters for each edge point, as shown in Fig. 5: k is
the step height, h the background gray level, l the perpendicular
distance fromthe center of the circular kernel andthe edge makes
Fig. 3. Masks of Sobel operator.
Fig. 4. Edge image by Sobel operator.
an angle of with respect to the x-axis. The edge point can be
determined from parameters l and k. The edge position can be
calculated by parameters l and .
First of all the masks for calculating Zernike moments should
be deduced. Two masks are enough to get edge parameters l and
. Since edge location accuracy can be improved by enlarging
mask size, two 7 7 masks are deduced before the edge point
is determined. In this study a new parameter, the amplitude of
complex moment instead of parameter k, is used to locate edge
point together with parameter l.
3.2.1. Deducing masks and calculating Zernike moments
Zernike moments of an image f(x, y) is dened as:
A
nm
=
n + 1

_ _
x
2
+y
2
1
f(x, y)V

nm
(, ) dx dy (8)
where (n +1)/ is a normalization factor. In discrete form, A
nm
can be expressed as
A
nm
=

y
f(x, y)V

nm
(, ), x
2
+ y
2
1 (9)
indicating that in a discrete image the neighborhood of a point
should be mapped onto the interior of a unit circle for evaluating
Fig. 5. Two-dimensional subpixel step edge model.
198 Q. Ying-dong et al. / Journal of Materials Processing Technology 172 (2006) 195201
Fig. 6. Circular kernel dened for a 7 pixel 7 pixel area.
Fig. 7. Mask of Zernike moments A
20
.
Zernike moments of this point. The complex polynomials V
nm
(,
) can be expressed in polar coordinates as:
V
nm
(, ) = R
nm
()e
jm
(10)
where R
nm
() is a radial polynomial dened as
R
nm
() =

(1)
s
(n s)!
n2s
s!
_
n+|m|
2
s
_
!
_
n|m|
2
s
_
!
(11)
If an image is rotated by an angle , the following relationship
between Zernike moments of the original image A
nm
and the
rotated image A

nm
will be given
A

nm
= A
nm
e
jv
(12)
It is clear that Zernike moments merely acquire a phase
shift on rotation and their magnitudes remain constant. This
property is useful for rotation invariant pattern recognition and
matching. In order to calculate parameters and l, the masks
of A
11
, A
20
should be deduced. According to Eq. (10), the
orthogonal complex polynomials can be written as: V
11
=x +jy,
V
20
=2x
2
+2y
2
1. Fig. 6 shows the unit circle divided to 7 7
homogeneous grids. The masks canbe calculatedas makinginte-
gral for V

11
, V

20
on dashed area of every grid (see Figs. 7 and 8).
Fig. 8(a and b) shows the real component and imaginary com-
ponent of the complex mask of, respectively, each numerical
value in two masks are weight index that are acted on corre-
sponding 7 7 neighborhood pixel points. Here, assuming f(x,
y) to be constant over each pixel, convolving these masks with
the image points can get Zernike moments A
11
, A
20
for whole
image.
3.2.2. Calculating edge point parameters l and
According to Eq. (12), the following relationship can be given
A

11
= A
11
e
j
(13)
A

20
= A
20
(14)
where A
11
, A
20
are Zernike moments of the original image, and
are Zernike moments of the rotated image with angle .
Fig. 8. Mask of Zernike moments A
11
. (a) Imaginary component and (b) real component.
Q. Ying-dong et al. / Journal of Materials Processing Technology 172 (2006) 195201 199
Based on the theory of Zernike moments, A

11
, A

20
can be
calculated as
A

11
=
_ _
x
2
+y
2
1
f

(x, y)(x jy) dy dx =


2k(1 l
2
)
3/2
3
(15)
A

20
=
_ _
x
2
+y
2
1
f

(x, y)(2x
2
+ 2y
2
1) dy dx
=
2kl(1 l
2
)
3/2
3
(16)
When an edge is rotated for an angle , it will be aligned parallel
to y-axis, therefore
_ _
x
2
+y
2
1
f

(x, y)y dx dy = 0 (17)


The left item of Eq. (17) is the imaginary component of A

11
.
Using Eqs. (13) and (17), we can have
Im[A

11
] = sin()Re[A
11
] cos()Im(A
11
) = 0
therefore
= tan
1
_
Im[A
11
]
Re[A
11
]
_
A

11
can be calculated when A
11
and are known:
A

11
= Re(A

11
) = Re(A
11
) cos + Im(A
11
) sin() (18)
Solving Eqs. (15) and (16), the step edge parameter l is given:
l =
A
20
A

11
(19)
3.2.3. New criterion for edge point
In Ref. [12], the edge parameters l and k are considered as
criterion for edge point determination. In this paper a new crite-
rion, i.e., magnitude of complex moments A
11
, is introduced to
judge edge point with l together. The new criterion amp is given
by
amp =
_
Re(A
11
) Re(A
11
) + Im(A
11
) Im(A
11
) (20)
The reason for using amp to substitute k derives from the
characteristic of mask A
11
: the absolute value of a real compo-
nent is symmetrical relative to y-axis, and the absolute value of
the imaginary component is symmetrical relative to x-axis. This
characteristic is similar to that of masks of Sobel operator. The
criterion of Sobel operator is the magnitude of two masks, so the
magnitude of complex moments A
11
are taken as criterion too.
When amp >30 and l

2/12, the edge image calculated


by SobelZernike moments is shown in Fig. 9. Compared to
Fig. 4, the edge detected by Sobelzernike moments is thinner
and there is no false edge point, demonstrating that the edge
location precision by Sobelzernike moment is better than Sobel
operator.
Fig. 9. Edge image calculated by SobelZernike moments.
4. Calculation of deposit dimensions
It is essential to establish the orientation between 2-D work-
piece coordinates and corresponding 2-D image coordinates for
calculating deposit dimensions. Once this relationship is estab-
lished, the real dimension of a deposit can be calculated from
the captured image of the deposit. Herein a simple calibration
method is introduced.
Firstly, two coordinates system are dened as follows:
2-D workpiece coordinates O-XY
For the workpiece coordinates, the intersecting point of the
axes of the mandrel substrate andthe central axis of spraycone
is dened as the origin point of the 2-Dworkpiece coordinates
O-XY. The mandrel axes is dened as X-axis, while the axis
of spray cone is dened as Y-axis.
2-D image coordinates o-UV
For the image coordinates, the left bottom point of the
image window is dened as the origin point. The bottom line
of the image window is dened as U-axis, while the left ver-
tical line is dened as V-axis.
Calibration of coordinates is described as follows:
in the 2-D image coordinates, kx and ky, slope coefcient of
X-axis and Y-axis, are calculated, respectively;
in the 2-Dimage coordinates, ySize and xSize, the real size of
per pixel in kx and ky direction, are determined, respectively;
in the 2-D image coordinates, the position O

of the original
point O is determined.
The above ve parameters are determined as kx =4.89,
ky =0.20, O

(281, 192), xSize =0.34 mm, ySize =0.32 mm.


Fig. 10 shows the relationship between the 2-D workpiece coor-
dinates and the corresponding 2-D image coordinates.
In spray forming, the metal (alloy) melt is broken by gas jets,
and the resultant droplets spray deposit onto a moving substrate,
forming a bulk near-net shape product. In the 2-D workpiece
coordinates, the central axis of spray cone is set as Y-axis, and
this position is the most fast accumulative position of deposit,
200 Q. Ying-dong et al. / Journal of Materials Processing Technology 172 (2006) 195201
Table 1
Real diameter and detected diameter of a deposit
Position no.
1 2 3 4 5 6 7 8 9 10
Measured dimension (mm) 88.07 86.92 86.72 86.02 85.78 85.04 84.78 84.35 83.97 83.77
Actual dimension (mm) 88.18 86.76 86.95 85.92 85.85 85.31 84.69 84.18 84.13 83.63
Relative error (%) 0.12 0.18 0.27 0.12 0.08 0.32 0.10 0.20 0.19 0.17
Table 2
Run time of image processing
Position no.
1 2 3 4 5 6 7 8 9 10
Run time (s) 0.987 0.981 0.981 0.979 0.979 0.979 0.977 0.977 0.974 0.974
Average time (s) 0.979
so the deposit dimension in this position can be taken as the
characteristic dimension of the deposit. The steps of calculation
for deposit dimensions are as follows:
in the 2-D image coordinates, point O

is selected as the start


point for image point scanning along ky direction until reach-
ing the edge point edge 1 and edge 2;
number of pixel num between point edge 1 and edge 2 is
calculated;
the real deposit dimension is calculated as:
Size = num ySize
5. Test of the image processing system
Test of the image processing system was done on a spray
forming facility at Harbin Institute of Technology. A tubu-
lar deposit was spray formed from aluminum alloy melt. The
deposit dimension for measurement was the outer diameter of
the tubular preform. A computer with a Pentium-II CPU was
used to run an image processing program that is implemented
by Visual C++ language. The purpose of this test was to examine
the measurement precision and run time of this system. Outer
diameter of the tubular deposit were measured in 10 positions
Fig. 10. Relationship between 2-D workpiece coordinates and corresponding
2-D image coordinates.
by the image processing system and compared with the real
dimensions. All the dimension data are listed in Table 1, and
the run times of image processing are given in Table 2. Table 1
shows that the absolute value of the minimum relative error is
0.08%, while the absolute value of the maximum relative error
is 0.32%. Table 2 shows that the maximum run time of image
processing is 0.987 s, while the minimumrun time is 0.974 s, the
average run time is 0.979 s. All the run times are not more than
1.0 s, exhibiting the new image processing technique developed
in this work can meet the requirement of on-line measurement
of deposit size in spray forming.
6. Conclusion
A method for deposit dimension measurement using image
processing is described in this paper. This approach con-
sists of three steps of eliminating noise, edge detection and
deposit dimension calculation. A new edge detection operator,
SobelZernike operator is introduced for on-line and precise
edge detection. Testing of this new image processing system
demonstrates the advantage of fast processing with a run time
less than 0.987 s and high precision with a relative error of mea-
surement no more than 0.32%.
Acknowledgements
This work is supported by the National Natural Sci-
ence Foundation of China under the project Interface Bond-
ing Fundamentals and Its Inuencing Factors of Spray Cast
Clad Rolls (No. 50174022), and supported by National
Defense Key Lab of Metal Precision Hot Processing under the
project Research on Intelligent Control Approach of Deposit
Geometry Feature Using Machine Vision Technology (No.
51471040101JW0301).
References
[1] P.S. Grant, Spray forming, Prog. Mater. Sci. 39 (1995) 497.
[2] Q. Xu, E.J. Lavernia, Fundamentals of the spray forming process, in:
Proceedings of 2000 International Conference on Spray Deposition and
Melt Atomization, Bremen, Germany, 2000, p. 17.
Q. Ying-dong et al. / Journal of Materials Processing Technology 172 (2006) 195201 201
[3] P.S. Grant, B. Cantor, Infrared thermal imaging measurement of deposit
surface temperatures during spray deposit, Powder Metall. 33 (1990)
144.
[4] R.S. Miller, S.A. Miller, S.D. Savkar, D.P. Mourer, Near infrared mea-
surements in close-coupled gas atomization, Int. J. Powder Metall. 32
(1996) 165.
[5] D.E. Lawrynowicz, E.J. Lavernia, Sensors and techniques used to mon-
itor processing parameters during spray atomization and deposition, J.
Mater. Sci. 30 (1995) 1125.
[6] D. Marr, E.C. Hildreth, Theory of edge detection, Proc. R. Soc. 207B
(1980) 187.
[7] J. Canny, A computational approach to edge detection, IEEE Trans.
Pattern Anal. Mach. Intell. 8 (1986) 679.
[8] X.Q. Yang, M. Li, Using Hopeld neural network and 2D evolutionary
operators to detect image edge, Proc. SPIEInt. Soc. Opt. Eng. 4221
(2002) 292.
[9] X.W. Kong, C. Xie, W.R. Xu, Edge detection using multiple edge fea-
tures and fuzzy reasoning, Tien Tzu Hsueh Pao, Acta Electron. Sinica
(2002) 36.
[10] M.H. Hueckel, An operator which locate edges in digitized pictures, J.
ACM 18 (1971) 113.
[11] P.L. Edward, M.R. Owen, Subpixel measurements using a moment-
based-edge operator, IEEE Trans. Pattern Anal. Mach. Intell. 11 (1989)
1293.
[12] S. Ghosal, R. Ehrotra, Orthogonal moment operators for subpixel edge
detection, Pattern Recognit. 26 (1993) 295.

Anda mungkin juga menyukai