Assessing the quality of spot welding electrodes tip using ...

chemistoddAI and Robotics

Nov 6, 2013 (3 years and 9 months ago)

40 views

Assessing the quality of spot welding electrode’s
tip using digital image processing techniques


A .A. Abdulhadi



Coherent and Electro
-
Optics Research Group

GERI

Presentation headlines


Resistance spot welding


Effects of increased electrode’s diameter


Assessing the quality of the electrode
automatically


Flat tip


Doom tip


Building a system that assess the quality of welding
electrode automatically.


Future work


Resistance spot welding


Resistance spot welding is a quick and
easy way to join two materials


Two electrodes are used to perform
spot welding ; they are placed either
side of the surfaces to be welded


The functions of the two electrodes
are


1) clamping of the work


2) applying the weld force required for
welding


3) applying the weld current necessary
for fusion of the work pieces


4) a final retraction of the electrodes
after the molten nugget has solidified


Effects of increased electrode diameter


Diameter high, area high


Resistance low


Heat low


Pressure lower


Quality of welding nugget is worse




It is normal for the electrodes to
wear to such excess that they
need redressing, or replacing.





This wear varies according to the
applied current and the material
thickness
.


original image
50
100
150
200
250
300
50
100
150
200
original image
50
100
150
200
250
300
50
100
150
200
New electrode

after wearing

Assessing the quality of the electrode automatically


We need a method to
assess the quality of the
welding electrode
automatically.


We capture an image of the
electrode using a digital
camera


We process this image
using digital image
processing techniques to
evaluate the quality of the
electrode.


Digital image processing techniques to assess
the quality of welding electrode


Extract the electrode from the image


Image segmentation


Determine the boundary for the electrode


Filter this boundary using boundary representation
and description methods


Find the width of the tip using Cullen method


If the width of the tip is smaller than a predefined
threshold, we consider the tip as a good tip


Otherwise the tip needs replacing or redressing

Image segmentation

There are many image segmentation methods


Edge detection


Sobel


Canny


Laplacian


Prewitt


....


Hough transform


Region growing


Graph theory


Snakes active contours


Electrodes types


We have two types of electrodes


Flat tip


Doom tip


For each tip type, we have a bank of
250 images.


Images for tips with high quality


Images for tips with low quality


original image
50
100
150
200
250
300
50
100
150
200
50
100
150
200
250
300
20
40
60
80
100
120
140
160
180
200
220
Cullen method


The top Figure shows an
image that contains a flat tip.


The bottom figure shows a
schematic diagram of an
ideal flat tip and indicates its
parameters such as the tip
width
T
p

and the electrode
width C
p
.

50
100
150
200
250
300
20
40
60
80
100
120
140
160
180
200
220
Cullen method


This figure show the
boundary of the
electrode.


Let us process the
boundary image on a
row by row basis.


For each row, we
subtract the
x

coordinates of the left
boundary points (shown
in red colour) from the
x

coordinates of the right
boundary points (shown
in blue colour).

Cullen method


The first
x
a

rows do not
contain the tip boundary.
The subtraction operation
produces zeros as shown in
the bottom Figure.


For the row
x
a

+1, the
subtraction operation
produces the tip width T
p
.



For the rows from
x
a

+ 1
until
x
a

+

x
g
, the subtraction
operation produces a line
with a slope of
g


Cullen method








The slope of
g =2




For the rows from
x
a

+

x
g

+ 1
until
M
, the subtraction
operation produces a value
of C
p
.


The first derivative of the 2D
top graph is calculated and
this is shown in the bottom
figure.



Cullen method










The width of the tip is
determined as follows. The
derivative of the tip profile is
thresholded

using a
threshold value
g
.


Then the number of points
whose values are larger than
g

is determined and this
number is assigned to
x
g
.


The tip width is then
determined using the
Equation


50
100
150
200
250
300
20
40
60
80
100
120
140
160
180
200
220
Pixels
Pixels
50
100
150
200
250
300
20
40
60
80
100
120
140
160
180
200
220
0
50
100
150
200
250
0
20
40
60
80
100
120
140
160
x axis
Tip profile
0
50
100
150
200
250
-5
0
5
10
15
20
25
30
35
x axis
First derivative of the tip profile
Assessing the quality of flat tips

Image segmentation and boundary representation

50
100
150
200
250
300
20
40
60
80
100
120
140
160
180
200
220
Canny
algorithm and Cullen method


To determine the width of the tip in pixels
automatically for two
hundreds
and fifty
images, we
have used


Canny
algorithm for image
segmentation, and


Cullen method for extracting the tip
width


The results are shown in red


The tip width has been determined
manually for the 250 images and the results
are shown in blue.


The bottom figure shows
the
differences
between the manual and automatic
determination of the tip width in pixels.


0
50
100
150
200
250
300
70
80
90
100
110
120
130
140
Image Number
Tp Manually obtained and Canny and cullen
Tp found manually and Tp found using Canny and cullen


Tp manually
Tp Canny and Cullen
0
50
100
150
200
250
300
-15
-10
-5
0
5
10
Error between Tp found manually and Tp found using Canny and cullen
Image Number
Tp Error obtained

T
p

manually and
T
p

Canny and
Cullen

Error between manually and automatically

measurement the tip

Boundary filtering using Fourier transform


Suppose that we have the
boundary shown here

x(n)= x(1)+x(2)+...+x(K
-
1)

y(n)= y(1)+y(2)+...+y(K
-
1)


We can represent the
boundary using the complex
numbers

s(k)=x(1)+
iy
(1)+ x(2)+
iy
(2)+...
x(K
-
1)+
iy
(K
-
1)+


6 6
(,)
x y
7 7
(,)
x y
2 2
(,)
x y
3 3
(,)
x y
4 4
(,)
x y
5 5
(,)
x y
6 6
(,)
x y
7 7
(,)
x y
1
i
 

The discrete Fourier transform of
s
(
k
) is





The inverse Fourier transform of these coefficients restores
s
(
k
). That is,




Suppose, however, that instead of all the Fourier coefficients,
only the first
P

coefficients are used.


This is equivalent to setting the term
a(u)

= 0 for
u

>
P
-
1
. Then
we get an approximation for the boundary.


The low frequency components account for the global shape of
the boundary


Whereas the high frequency components account for the fine
details in the boundary shape

Canny
algorithm, Fourier transform


To determine the width of the tip in
pixels automatically for two hundreds
and fifty images, we used


Canny algorithm for image
segmentation,


Fourier transform for filtering the
boundary


Cullen method for extracting the tip
width


The results are shown in red


The tip width has been determined
manually in the 250 images and the
results are shown in blue.


The bottom figure shows the differences
between the manual and automatic
determination of the tip width in pixels.

0
50
100
150
200
250
300
70
80
90
100
110
120
130
140
Image Number
Tp Manually obtained and Canny and Fourier transform
Tp found manually and Tp found using Canny and Fourier transform


Tp manually
Tp Canny and fourier transform
0
50
100
150
200
250
300
-15
-10
-5
0
5
10
Error between Tp found manually and Tp found using Canny and Fourier transform
Image Number
Tp Error obtained
T
p

manually and
T
p

Canny and Fourier
Transform

Error
between manually
and automatically


measurement
the tip

Canny
algorithm and minimum

perimeter polygons


A closed boundary can be
approximated can be approximated
with arbitrary accuracy by a polygon.


For a closed boundary, the
approximation becomes exact when
the number of vertices of the polygon
is equal to the number of points in
the boundary, and each vertex
coincides with a point on the
boundary.


The details and the noise in the
boundary can be reduced by
decreasing the number of vertices.

Canny
algorithm and minimum

perimeter polygons


To determine the width of the tip in pixels
automatically for two hundreds and fifty
images, we used


Canny algorithm for image
segmentation,


Minimum perimeter polygon for
filtering the boundary


Cullen method for extracting the tip
width


The results are shown in red


The tip width has been determined
manually in the 250 images and the results
are shown in blue.


The bottom figure shows the differences
between the manual and automatic
determination of the tip width in pixels.


0
50
100
150
200
250
300
70
80
90
100
110
120
130
140
Image Number
Tp Manually obtained and Canny and Polygon
Tp found manually and Tp found using Canny and Polygon


Tp manually
Tp Canny and polygon
0
50
100
150
200
250
300
-15
-10
-5
0
5
10
15
Error between Tp found manually and Tp found using Canny and Polygon
Image Number
Tp Error obtained
T
p

manually and
T
p

Canny and MP Polygons

Error between manually and automatically

measurement
the tip


Region
growing algorithm and Cullen method


The
region growing is a procedure that groups pixels
or
sub
-
regions
into larger regions based on
predefined criteria for
growth


Starting
with a single pixel (seed) and adding new
pixels
slowly


1
-

choose the pixel
,


2
-

check the neighbouring pixels and add them to
the region if they are similar to
the seed,


3


repeat step (2) for each of the newly added
pixels; stop if no more pixels can be added

Region
growing algorithm and Cullen method

0
50
100
150
200
250
300
70
80
90
100
110
120
130
140
Image Number
Tp Manually obtained
Tp found manually and Tp found using region growing and Fourier transform
0
50
100
150
200
250
300
-6
-4
-2
0
2
4
6
8
10
12
14
Error between Tp found manually and Tp found using region growing and Fourier transform
Image Number
Tp Error obtained
T
p

manually and
T
p

Region growing and Cullen

Error between
manually
and automatically



measurement the tip



To determine the width of the tip in pixels
automatically for two hundreds and fifty
images, we used


Region growing for image
segmentation,


Cullen method for extracting the tip
width


The results are shown in red


The tip width has been determined
manually in the 250 images and the results
are shown in blue.


The bottom figure shows the differences
between the manual and automatic
determination of the tip width in pixels.


Region growing
Algorithm, Fourier Transform

0
50
100
150
200
250
300
70
80
90
100
110
120
130
140
Image Number
Tp Manually obtained
Tp found manually and Tp found using region growing and Fourier transform
0
50
100
150
200
250
300
-5
0
5
10
15
20
25
Error between Tp found manually and Tp found using region growing and Fourier transform
Image Number
Tp Error obtained
T
p

manually and
T
p

Region growing and F
Transform

Error between
manually
and automatically


measurement
the tip


Region
growing algorithm and minimum

perimeter polygons

0
50
100
150
200
250
300
70
80
90
100
110
120
130
140
Image Number
Tp Manually obtained and region growing, Polygon
Tp found manually and Tp found using region growing, Polygon


Tp manually
Tp region growing and polygon
0
50
100
150
200
250
300
-2
0
2
4
6
8
10
12
14
Error between Tp found manually and Tp found using region growing , Polygon
Image Number
Tp Error obtained
T
p

manually and
T
p

Region growing and polygon

Error between
manually
and automatically


measurement
the tip


The region
growing
and minimum perimeter polygon case is superior because
the error term for
T
p

is smaller as shown in Figure

above

Graph theory algorithm and Cullen method



The
set of points in arbitrary
feature space are represented as
a weighted undirected
graph



where
the nodes of the graph are
the points in the feature space,
and an edge is formed between
every pair of nodes
.


The weight on each
edge w(
i,j
),
is
a function of the similarity
between nodes
i


and
j
.


)
,
(
E
V
G

0
50
100
150
200
250
300
70
80
90
100
110
120
130
140
150
Image Number
Tp Manually obtained and Normalized cuts and cullen
Tp found manually and Tp found using Normalized cuts and cullen


Tp manually
Tp normalized cuts and Cullen
0
50
100
150
200
250
300
-20
-15
-10
-5
0
5
10
15
Error between Tp found manually and Tp found using Normalized cuts and cullen
Image Number
Tp Error obtained
T
p

manually and
T
p

Normalized Cuts and Cullen

Error between
manually
and automatically

measurement
the tip





we have calculated the standard
deviation for
error between the
manual and automatic methods
for the
two hundreds and fifty
electrode tip images.



The
results are shown in
table.



The
results of this table reveal
that the region growing
and
Minimum

Perimeter
Polygons
gave the
most accurate method
for determining the tip
width.




On the other hand, the graph
image segmentation algorithm
produces the worst results.




Cases

standard

deviation

1

Canny

algorithm

and

Cullen

method

4
.
50

2

Canny

Algorithm,

Fourier

Transform

4
.
80

3

Canny

Algorithm

and

Minimum


Perimeter

Polygons

4
.
70

4

Region

grown

Algorithm

and

Cullen

method



3
.
80

5

Region

grown

Algorithm,

Fourier

Transform


3
.
70

6

Region

grown

Algorithm
,

and

Minimum


Perimeter

Polygons

3
.
40

7

Graph

Theory

Algorithm

and

Cullen

method

5
.
60

Which method is the best?


Doom electrode tip


Original image

Laplacian

Algorithm


The image

for the doom electrode is very hard to
segment.


This is because of the shining parts of

the tip doom.


We show here the segmentation results using


Laplacian


Sobel


Prewitt


Canny


None of these edge detection algorithms works properly


Also, we have attempted

these algorithms


Region

growing


Graph theory


Hough transform


Also
n
one of these edge detection algorithms works
properly


The only image segmentation algorithm we tried it and
can segment the doom electrode successfully is the


Active contours snake algorithm





Sobel

Algorithm

Prewitt Algorithm

Canny Algorithm

Snake Algorithm


Snake are curves defined within an image domain that
can move under the influence of internal forces
coming from within the curve itself and external
forces



The internal and external forces are defined so that the
snake will conform to an object boundary



traditional snake is a curve


X(s)=[x(s),y(s)], s

[0,1]



Finding a method for determining the diameter of the
tip automatically.

Image segmentation & representation

Original image

Thresholding



Snake Algorithm

Snake Algorithm

Snake algorithm and Cullen

0
50
100
150
200
250
300
-40
-30
-20
-10
0
10
20
30
Error between Tp found manually and Tp found using snake.ahmed
Image Number
Tp Error obtained
0
50
100
150
200
250
300
20
40
60
80
100
120
140
Image Number
Tp Manually obtained
Tp found manually and Tp found using Snake.Cullen


Tp Manually obtained
Tp Snake Cullen
T
p

manually and
T
p

Snake and Cullen

Error between manually and automatically
measurement the tip

Snake algorithm and Fourier transform

0
50
100
150
200
250
300
-20
-10
0
10
20
30
40
50
60
Error between Tp found manually and Tp found using Tp.snak.Fourier
Image Number
Tp Error obtained
0
50
100
150
200
250
300
20
40
60
80
100
120
140
Image Number
Tp Manually obtained
Tp found manually and Tp found using Tp.Snak.Fourier


Tp Manually obtained
Tp snak Fourier
Tp

manually and Fourier Transform

Error between manually and automatically

Snake algorithm and polygon

0
50
100
150
200
250
300
-30
-20
-10
0
10
20
30
40
Error between Tp found manually and Tp found using Tp .polgyon .snak
Image Number
Tp Error obtained
0
50
100
150
200
250
300
20
40
60
80
100
120
140
Image Number
Tp Manually obtained
Tp found manually and Tp found using Tp.Snake. Polgyon


Tp Manually obtained
Tp Polgyon Snak
Tp

manually and
Tp

Snake and MP Polygons

Error between manually and automatically

Cases

standard

deviation

1

Sank

algorithm

and

Cullen

method

7
.
3801

2

Sank

Algorithm
,

Fourier

Transform

6
.
8742

3

Sank

Algorithm
and
Minimum

Perimeter Polygons

7
.
1366

we have calculated the standard deviation
for error between the manual and automatic
methods for the two hundreds and fifty
electrode doom tip images.

Built system that can assess the quality of spot
welding electrodes easily


We need to improve the
performance of determining the
tip width automatically.


To do this


We use a high performance
illumination source to
illuminate the electrode


We capture an image for the
shadow of the electrode


The shadow image is easy to
process


thresholding


Then we can extract the tip
width easily using Cullen
method

Original image

Thresholding


edge

edge

Future work


To embed the system that can assess the quality of spot
welding electrodes into a spot welding machine.

Conclusions


We have used image processing algorithms
successfully to assess the quality of spot welding
electrodes automatically.


We have built a system that can assess the quality of
spot welding electrodes using simple image processing
techniques


Thresholding


Simple filtering methods such as median filtering

Any questions