Contact Free Strain Measurement using MATLAB Image Processing Toolbox Per-Erik Austrell †
Bertil Enquist†
Anders Heyden‡
Sven Spanne‡
† Division of Structural Mechanics, Lund Institute of Technology, Lund University, Box 118, S-221 00 Lund, Sweden ‡ Dept of Mathematics, Lund Institute of Technology, Lund University, Box 118, S-221 00 Lund, Sweden email:
[email protected],
[email protected],
[email protected],
[email protected]
Abstract A new method to measure displacements and strains in mechanical test pieces without applying sensors to the specimens is described. This optical technique uses a CCDcamera, a computer with frame grabber board and image analysis techniques within the MATLAB Image Processing Toolbox. The displacements and strains at the surface of the test piece are obtained by analysis of the movements of dots painted on the specimen. The complete displacement field on the surface can be determined by the use of a finite element grid and shape function interpolation. A method for strain analysis by the use of second order area moments of the painted dots is also outlined. Two application examples are presented. The first is a biaxial fracture mechanics test on a small test piece of solid wood and the second is a large strain test performed on a rubber membrane.
1 Introduction Conventional strain and deformation gauges produce recordings only for one or a few points and they are very difficult to use when it comes to small specimens or a small area of a specimen, like a fracture process area. In particular, for bi-axial mixed mode fracture softening studies and for testing in moist and high or low temperature environments, conventional equipment can often simply not be used in any meaningful way. A new method to measure displacements and strains in mechanical test pieces without applying sensors to the specimens is described here. A CCD-camera and image analysis techniques within the MATLAB Image Processing Toolbox are used to investigate relative displacements and the surface strains by the use of distinct markers on the specimen. This optical technique is both full field measuring and non-contacting. Other optical techniques that serves these demands have been described by Ga˚svik in [3] and Sjo¨dahl in [5]. This paper is organised as follows. In section 2 we describe the experimental setup. The image analysis program is described in section 3, where both the user interface and the image analysis techniques used are described. In section 4 the surface strain analysis is done from the images, both using interpolation of shape functions and poin-
twise evaluation. Finally, in section 5 two application examples are given, one using wood and the other using rubber, before the conclusions in section 6.
2 Experimental Setup The equipment used, according to Figure 1, comprises a CCD-camera, objectives, enlargement tubes, lightequipment, positioning table, a video monitor and a computer with frame-grabber board. Images are captured and stored in the computer with help of the frame grabber board to which the analogue monochrome camera (739 x 575 pixels) is connected. The camera head unit, the objective and tube together with fibre light guides are mounted on top of a positioning table which is manually adjustable in three directions. Five available lenses with fixed focal lengths combined with different tube lengths can produce images of objects with heights of 0.8, 2.5, 5, 10, 20, 40 and 60 mm. The image width is about 1.29 times larger than its height. Fv
Camera head unit
Specimen
Fh Positioning table Light equipment
Computer with frame grabber board Monitor
Camera control unit
Figure 1: The experimental setup.
The test specimen is marked with dots of ink or paint and mounted in the testing machine. A sequence of images are then captured at intervals depending on time, force, or displacement. Recordings of force and displacement can be
made together with each image. This is accomplished by program routines linked to the frame grabber routines that makes it possible to receive and capture digital or analogue signals from the testing machine at the same instant as images are captured.
3 Program Function User interaction with the graphic interface and the image analysis algorithms are described in this section. As a general reference to digital image processing, see [1] or [2]. A time saving feature of the algorithm is that the dots that are marked with a box in the first image in a sequence are tracked through the image sequence and their center of mass are calculated automatically for each image in the sequence.
3.1
User Interaction
The implementation is done as a menu-driven process, using MATLAB’s graphical interface. When the user starts the program, by typing imagemenu, a menu appears at the top left of the screen. The disposition of the menu is shown in the left part of Figure 2. First the user writes the name of the files containing the images in pgm-format in the editable text box under the text filename and presses return. Then the first image in the sequence is shown on the screen. The user enters the number of images in the sequence in the editable text box under the text number and presses return. menu
accept accept
filename
yes no number 50 100
select-button again and repeat the steps described above until all dots have been surrounded by boxes. Finally the user presses the button start and the images in the sequence are treated one after another. The marked dots are tracked through the sequence and new boxes need not be entered in the other images. A number of diagrams are shown, giving the x- and y-displacements of dot number 2, 3 and so on, relative the first dot. The second order moments of the dots are also calculated and shown in a series of diagrams. It is possible to stop the calculations at any time and exit the program, using the button exit. The results are given in different variables. The x- and ydisplacements are given in the variables xtp and ytp respectively and the second order moments are given in the variables xx, xy and yy.
3.2 Image Analysis Techniques When a box around a marked dot is entered by the user the center of mass of the dot is calculated. First the marked area is picked out, giving a smaller image, see the upper part of Figure 3. Then this new image is inverted if the marked dot is black against a lighter background, in order to give a white dot against a black background. To eliminate boundary defects the new image is thresholded to give an image with intensity values zero on the boundaries of the box and larger intensity values on the actual dot, see the middle part of Figure 3. In this way the image can be regarded as a three dimensional surface as shown in the lower part of Figure 3, or equivalently as a surface area with mass distribution given by the image intensities. The fact that the image intensities are zero at the boundaries makes the program less sensitive to the placements of the boxes. The output will be the same if the boxes are outside the dots and do not contain any other dark areas. The first order area moments, sI , are calculated using Z Z X S sI = Xw(X)dA = w(X ; Y )dA = 1 ; (1) Y S2 Ω Ω
150 200
select
250 300 350
start
400 450 500
exit
550 100
200
300
400
500
600
700
where Ω denotes the box around the dot, w(X) denotes the image intensity at point X and dA denotes the area measure. Naturally the integrals are calculated using finite sums, because the image intensity is a discrete function. This means that xmax
Figure 2: The user menus, main menu and accept menu, and illustration of the chosen box.
The next step is to locate the different marked dots on the specimen using the cursor. Pressing the button select and then marking the top left and the bottom right corner of a box situated around the dot makes the program write out the box in the image, see the lower right part of Figure 2. Then another menu appears below the main menu, see the upper right part of Figure 2, where the user has the possibility to accept the box or to reject it. If the box is rejected the user can immediately enter a new box, by marking the top left and bottom right corner. Then it is possible to press the
sI =
ymax
∑ ∑
i=xmin j =ymin
i S w(i; j ) = 1 j S2
;
where the lower left corner of the box has coordinates (xmin ; ymin ) and the upper right corners has coordinates (xmax ; ymax ). Then the coordinates of the center of mass are calculated as XTP = where M is defined as Z M = w(X)dA = Ω
SI ; M xmax
(2)
ymax
∑ ∑
i=xmin j =ymin
w(i; j ):
to
Z
10
sII
20
=
Ω
XXT w(X)dA =
Z
30
=
40
Ω
50
=
60
70
X2 XY
S11 S21
XY w(X ; Y )dA = Y2
S12 S22
(3)
:
Again the integrals are calculated as finite sums 10
20
30
40
50
60
70
80
90
100
xmax
sII =
10
ymax
∑ ∑
i=xmin j =ymin
2 i
ij
ij S w(i; j ) = 11 S21 j2
S12 S22
:
20
Assuming that the deformation between the same dot in two consecutive images is affine, and that the principal axis of the deformation are known, it is possible to calculate this affine transformation using the second order area moments. This will be done in the next section.
30
40
50
60
3.3 Improvements and Developments
70
10
20
30
40
50
60
70
80
90
100
250 200 150 100 50 0 80 120
60 100
40
80 60
20
40 0
20 0
Figure 3: Graphical illustration of the image intensities around a marked point. The original image is shown above, the inverted and thresholded image in the middle and the image intensities as a surface is shown below.
The location of the center of mass relative the lower left corner of the box is stored for each box. When a new image is considered in the sequence, the new center of mass is calculated using the same box, even if the marked dot has moved. If the dot has moved more than one pixel in any direction, the box is translated so that the relative position of the center of mass is preserved. If the pixel values at the boundaries of the box where different from zero when the center of mass where calculate, a new calculation of the center of mass is done. This process is repeated until the box is surrounding the dot. In most cases this calculation need only be done once for each image. However, in the last images of a sequence, where the deformations are large, the calculation may be done several times; usually only twice. In this way the marked dots are tracked through the sequence and when the deformations are fairly small, there is no risk of losing them. The second order area moments are calculated according
One drawback of this implementation is that the user has to mark the dots with boxes, before they can be processed. It would be fairly easy to write a program that automatically detect the dots and then track them through the sequence, if there are some a priori information available of what the dots look like. In the present implementation it is only possible to treat white dots against black background or black dots against white background at the same session. A simple extension would be to have a new menu where the user can select white or black dot after the box have been marked. This could also be done automatically if the dots where detected automatically. Another drawback is that it is necessary to paint small dots on the specimens. If the specimens have some texture it would be possible to estimate local deformations using correlation techniques. This texture could be made, for example, by spraying ink on the specimen, giving a large number of small dots and other textures. Using this texture it is possible to correlate different areas in subsequent images.
4 Surface Strain Analysis By combining finite element technique with the centroid displacement information from the dots, it is possible to extrapolate displacements of the dots and get information of the complete displacement field of the surface. This makes it possible to compare experimentally obtained displacement fields with corresponding calculated displacements. In the case of large displacements, it is possible to obtain surface strains within the applied dots, by use of second order area moments.
4.1 Shape Function Interpolation The deformation of the surface is expressed by a mapping, from the undeformed to the deformed configuration, defined for every point at the surface. The location of a point in the undeformed configuration is uniquely determined by coordinates X = (X ; Y ) and by x = (x; y) for the
same point in the deformed configuration. The mapping is expressed as
x y
x(X ; Y ) y(X ; Y )
=
()
The shape function associated with node i is expressed as Ni =
x = x(X):
The convention of using capital letters for quantities referring to the undeformed configuration and lower case letters for the deformed configuration, is used.
and the shape functions N j and Nk are found by cyclic permutation of indices. A is the element area given by A=
y
Y
1 ? X j Xk ? XkY j + (Y j ? Yk ) X + (Xk ? X j ) Y ; 2A
1? (X jYk ? XkY j ) ? (XiYk ? XkYi ) + (XiY j ? X jYi ) : 2
The deformation gradient defined by F = ∂x=∂X is the basis for several definitions of strain used in constitutive theories. Consequently the deformation gradient is constant for each element and expressed by the displacements as Fe = 1 +
x
X
Figure 4: Finite element mesh attached to the centroids of the dots.
The surface is divided into triangular elements with nodes at centroids of the dots as illustrated in Figure 4. The deformation is described by x = X + u(X);
(4)
where u is the displacement of a point located at X at the undeformed surface. Y
4.2 Pointwise Evaluation It is assumed that the deformation in the limited area of each dot can be expressed as an affine mapping according to x = F0 X + x 0 ;
uk k
ui
(6)
where F0 is a constant matrix and x0 is a constant vector that determines the mapping of the dot. The constant matrix F0 is the deformation gradient of the surface deformation, see Figure 6.
vj
i
(5)
by differentiation of relation (4). There are several definitions of strain, see [6], used in constitutive theories, that can be constructed from the deformation gradient. Lagrange strain tensor, defined as E = (FT F ? 1)=2, is a commonly used measure of strain. The Lagrange strain at the surface of a stretched rubber membrane, is obtained in the application example below.
vk vi
∂ue ∂X
uj j X
Y
y
Figure 5: Triangular element and nodal displacements.
The displacements at the nodes are interpolated by linear functions defined for each element i.e. linear shape functions are used. This is a standard technique used in finite element analysis, see [4] for further information. The element displacements, ue , are interpolated as
x
X
ue = Ne (X) de ; where Ne is the shape function matrix e
N
=
Ni 0
0 Ni
Nj 0
0 Nj
Nk 0
0 Nk
and de is the element displacement vector, referring to Figure 5, given by e
d
=
ui
vi
uj
vj
uk
vk
T
:
Figure 6: Deformation of a circular dot, the principal axes of the deformation are coinciding with the geometric principal axes of the ellipse.
The second order area moment in (3) is transformed according to F0 SII FT0
=
A sII ; a
(7)
where SII and sII are the second order area moments for the circle and the ellipse respectively. In (7) it is assumed that the second order area moments are determined in a centroid coordinate system. The translational part of the deformation is set to zero i.e. x0 = 0 as it does not affect the second order area moment. One solution to equation (7) can be obtained by the Cholesky factorisations SII = UUT ;
sII = uuT :
(8)
Inserting (8) into (7) yields r
F0 UUT FT0 =
2
r
)
A uuT a
F0 U =
A u; a
(9)
and the solution then becomes r
F0 =
A u U?1 : a
The first example is taken from a major research programme ongoing at the Division of Structural Mechanics since 1985 dealing with the mechanical behaviour of wood structures and components. The second is from another ongoing project concerning constitutive modelling and computational methods for elastomers in cooperation with the major rubber component manufacturers in Sweden.
5.1 Wood Test Specimen Extensive test-series has been carried out to determine the complete stress-deformation curve for solid wood (spruce) exposed to mixed-mode load with tension perpendicular to fibres in combination with shear parallel with fibres, see Figure 7. The aim is to determine material properties as maximum stress, fracture energy and shape of stress-deformation curve.
(10)
stdan0
50
However, this solution is not unique, since if F0 is the solution, in (10), to (7) obtained by Cholesky factorisations, then uRu?1 F0 =
r
100 150 200
2
250
A u R U?1 a
(11)
300 350 400
is a solution to (7) for every orthogonal matrix R. This means that the solutions are given by this one parameter family of solutions in (11), where R can be parametrised as
R=
cos(t ) sin(t )
? sin(t ) cos(t )
11
450
stdan107
500 2 3 43 4
50
550 100
200
100 300
400
500
600
700
150
MPa
:
2 200 250
3
300
A unique solution to (7) is obtained if the principal axes of the deformation are known. The geometric principal axes of the ellipse is then equal to the principal axes of the deformation. We can write
400
SII = VDV
;
sII
= vdv
T
;
500
(12)
F0 =
1 A v(dD?1 ) 2 VT : a
550
3 4
Shear stress
100
200
300
400
500
600
700
1
where D and d are diagonal matrices containing the eigenvalues of SII and sII respectively and V and v contains the eigenvectors. Imposing the condition that F0 maps the eigenvectors in V to the eigenvectors in v, in the same order, we obtain the following unique solution r
1
450
2
1.5
T
350
2.5
(13)
This method has not been evaluated experimentally, due to the difficulties, with the currently available equipment, to determine the corresponding principal axes.
5 Application Examples Two specimens, according to the images below in Figure 7 and Figure 8, has been tested and recorded. The first is a fracture mechanical test piece of solid wood, where in the first place, the relative displacement across the fracture zone is looked for. The second is a rubber membrane subjected to large displacements.
0.5
0
−0.5 0
Normal stress 0.05
Relative displacement 0.1
0.15
0.2
mm
0.25
Figure 7: Biaxial test of wood, images at peak load and after crack opening.
The tests are performed with a bi-axial electromechanical testing machine. The main feature of the machine is its large stiffness, which is needed when this type of stable fracture mechanical tests are to be performed. The biaxial tests are controlled with respect to relative shear- and normal displacements. During the test a sequence of images are captured of the small specimen. The surface is marked with dots according to Figure 7 showing the specimen at peak load and after crack opening. The test illustrated in Figure 7 was performed as a mixed mode bi-axial test with the
strain rate in the normal direction two times the strain rate in the shear direction. The image analysis procedure makes it possible to analyse the relative displacements close to the crack surface for this small specimen with an object height of 5 mm.
5.2
Rubber Test Specimen
Evaluation of surface strains where performed on a series of images from a stretched rubber membrane according to Figure 8. The specimen consists of a membrane of original dimensions 10 10 2 mm bonded to steel plates. The loading head on the right hand side was displaced 10 mm. Twenty images where captured with two images at each millimeter of displacement.
50 100 150 200 250
ellipses where drawn to indicate the deformed dots together with two reference nodes on the steel plates, marked with circles, in Figure 8. The Lagrange surface strains where evaluated for each element. The variation of the strain component Exx is indicated in Figure 8 by a greyscale, with white for the largest strain value and black for the smallest strain value within the mesh.
6 Conclusions A robust and straight forward non-contacting method for experimental deformation analysis has been described. Distinct dots are applied to the test specimen. The image analysis algorithm makes it possible to automatically track the motions of the dots and compute their centroid coordinates in a sequence of images. A method to interpolate displacements and compute surface strains have also been devised, by the use of finite element shape functions. The analysis procedure can be developed further. An automatic procedure for detection of the dots on the first image would be time saving. Also the application of the dots on the test specimen can be made more effective.
300
7 Acknowledgements
350
Financial support was provided by NUTEK-Swedish National Board for Industrial and Technical development and BFR-Swedish Council for Building Research. The support is greatfully acknowledged.
400 450 500 550
10
References
8
100
200
300
400
500
600
700
6
[1] Gonzales, R., C., Wintz, P., Digital Image Processing, Addison-Wesley Publishing Company, 1987.
4
[2] Gonzales, R., C., Woods, R., E., Digital Image Processing, Addison-Wesley Publishing Company, 1992.
2
0
[3] Ga˚svik, K.J., Optical meteorology, John Wiley and sons, Chichester, 1987.
−2
22
[4] Ottosen, N.S. and Petersson, H. Introduction to the Finite Element Method, Prentice Hall, 1992
Figure 8: The deformed membrane and mesh at maximum displacement. The strain in the x-direction is also displayed for the deformed membrane.
[5] Sjo¨dahl, M. An Electronic Speckle Photography System for In Plane Deformation Measurements, Licentiate thesis, LuTH, Lulea˚, Sweden, 1993.
A finite element mesh was constructed from centroid data, for the dots marked with a box in Figure 8. Equivalent
[6] Spencer A.J.M., Continuum mechanics, Longman Mathematical Texts, 1980
−4 2
4
6
8
10
12
14
16
18
20