Optical Strain Measurement
by Digital Image Analysis

Frank S., Spolenak R.

Laboratory for Nanometallurgy, Dept. of Materials,
ETH
Zurich, 8093 Zurich, Switzerland

-  Introduction  -

Traditionally, precise strain measurements during uniaxial tensile testing can be performed by clamping a strain gauge to the sample. However, if the sample is very small, stripe-shaped or very compliant, this may alter the testing geometry and hence influence the measurement significantly. Contactless strain measurement is possible with laser extensometers or by using cameras combined with digital image correlation software. The drawback of such systems is that they are often quite expensive, usually predefined and thus have a limited flexibility. Strain determination by digital image correlation may be challenging if the sample surface is reflective. Additionally, it is nearly impossible if the surface structure changes significantly during the course of experiment, for example due to thin film fragmentation or buckling under externally applied strain. Motivated by these difficulties, we have developed this program as a basis for simple, yet effective and universally applicable uniaxial strain measurement.

The basic principle of the program is to monitor the positions of two parallel markers by analysis of a digital images series. These images can be taken either during microscope analysis or separately with a digital camera. Depending on the objective used, the working distance may vary widely. The marker displacement is determined by analyzing the intensity profile of the images along the tensile direction, and hence the strain of the sample can be calculated.

Basic concepts of the program have been motivated by a MATLAB code for digital image correlation written by Christoph Eberl et al. [Eberl C., Thompson R., Gianola D.: “Digital Image Correlation and Tracking”, also available at http://www.mathworks.com/matlabcentral/fileexchange]. Our program has been optimized for strain determination by monitoring the displacement of two parallel markers. Due to the graphical user interface, the use of the program is straightforward and hence, the user does not need any MATLAB skills. The strain determination procedure is effective and accurate, which makes this method a true alternative to commercial products.

 


-  Requirements  -

a. Software

The program was written using MATLAB 7.1 (R14) and it uses the Optimization toolbox. Thus, any MATLAB Version from 7 or later should be suitable. Until now, its functionality has only been verified on Windows® PCs. The screen resolution should be set at least 1280 x 1024 pixels. In addition, it is necessary to use a batch image processing program such as IrfanView (http://www.irfanview.com).

 

 

b. Images

A series of images which were taken with a microscope or with a digital camera (preferentially SLR camera with high resolution) is suitable for the analysis. Figure 1 shows a light microscope image of a thin tantalum film on polyimide substrate during tensile testing. An example for strain measurement on a more macroscopic scale is given in Figure 2 for a similar sample during in situ XRD stress analysis. For those experiments, we used a remotely triggered Nikon D80 SLR camera, equipped with a Nikkor 200 mm macro objective. Thus, we were able to obtain high resolution images of the samples from a distance of approx. 0.8 m.

 

 

Strain markers have to be applied to the sample, for example with a black pen and a ruler for alignment. The marker size and distance have to be adapted to the experimental setup. For a high quality of strain measurement, the markers have to be straight and have a perfectly sharp edge facing the area of interest. The images given in Figure 1 and Figure 2 are suitable for strain measurement with high accuracy, while an example for very bad strain markers is displayed in Figure 3.

 

 

It is crucial that the light conditions do not change during a series of images. Additionally, the monitored section of the sample should not move significantly. Hence, for microscope images the sample should be realigned carefully, while a SLR camera should be mounted on a tripod. The filenames have to consist of four letters for identification (e. g. “pic0”), four letters for the sequential number of the image (e. g. “0001”) and the file extension. For example, “pic00001.tif” is a valid filename. Every sequential number should be represented in an image series; this means that the series “pic00001.tif, pic00002.tif, pic00004.tif” is inappropriate.

 

 

c. Installation

Copy the files ‘StrainMeasurement.m’ and ‘StrainMeasurement.fig’ to your MATLAB work folder. If you choose a non-standard folder, you have to make this folder an active MATLAB search path. For this purpose, open the ‘Set Path…’ window in the ‘File’ menu and add the respective folder.

To improve the accessibility to your image data, open the file StrainMeasurement.m with the MATLAB editor and enter the name of your default directory in line 31. For example, ‘D:\ExperimentalData\StrainAnalysis\’ is a valid pathname.

 


-  First steps - image processing  -

Usually, the raw images taken during tensile testing are not directly suitable for strain analysis. The necessary steps for image processing are described in the following section for a sample consisting of a thin gold film on polyimide substrate. For processing, it is appropriate to use an image viewer with batch conversion function, e. g. IrfanView. With this program, it is possible to perform all the described steps within one operation procedure for a complete series of images.

 

 

The selection which is important for strain analysis is cut out of the raw image (Figure 4). As the file size is decreased by this process, the speed of analysis is increased significantly (Figure 5 a). Then, the contrast of the image is enhanced. Usually, it is appropriate to set the contrast to its maximum value. The markers should be perfectly black-colored (RGB-intensity = [0 0 0]) after this process (Figure 5 b). If this is not the case, the brightness has to be adjusted. This method can also be used to make defects and unwanted shading invisible. It has to be taken into account that marker fragmentation might occur at high strains, which leads to an overall increase of intensity at the markers. Hence, the brightness value should be chosen in a way that it is appropriate both for the first and the last image of a series (Figure 5 c). Additionally, the color of the image can be tuned to emphasize its essential contrast features. In the example given here, the blue color channel is decreased to its minimum value. The result is a binary image with black and yellow color (Figure 5 d). Although its appearance is slightly artificial, the image is now perfectly suited for strain analysis. It has been observed that strain analysis is significantly slowed down if .jpg-images are used. Therefore, the images should be saved preferentially in .tif-format after processing.

 

 


-  Using the program - strain analysis  -

The program is started by typing StrainMeasurement in the MATLAB command line. The graphical user interface as displayed in Figure 6 will be opened. In the following section, a stepwise guide for operating the strain measurement program is presented.

 

 

In order to load the image files for strain analysis, press the LOAD button (C). Two dialog boxes appear, and you are asked to select the first and the last file for strain analysis. The files must have the same identification (i. e. first four letters of filename) and file extension. Additionally, they have to be located in the same folder. After selecting the first and last file, a file list with sequential image numbers is created, and the first image is displayed in the image window (A). Additionally, the intensity profile, which has been integrated along the vertical direction, is plotted versus the horizontal coordinate in the intensity window (B). The filename of the active image is displayed in field (G).

The integration range can be adjusted with the SET BOUNDARIES buttons (D) or (E). Press (D), then click the upper and the lower boundary of the integration range within the image window (A). The resulting integrated intensity profile is displayed in the intensity window (B). Adjust the top/bottom boundaries in a way that imperfections and defects are excluded and that the markers within the selected range are not curved. Check if the selected top/bottom boundaries are suitable for the other images of the series, as the marker quality may change and unwanted reflections might appear at large strains. Thus, click the CHANGE FILE button (I) and select the filename of the image you want to display.

To adjust the left/right boundaries, select the first file of the series with the CHANGE FILE button (I), press button (E) and click the left and right edge of the integration range in either window (A) or (B). The zone of the markers, which is taken into account for analysis, may be very narrow, if the option VARIABLE ANALYSIS RANGE (F) is activated. Thus, marker defects can be excluded from the analysis. However, check window (B) to make sure that the integrated intensity at the left/right boundaries equals zero.

Strain analysis can be performed using the option VARIABLE ANALYSIS RANGE. It is also possible to IGNORE CRACKS AND BUCKLES. Both settings can be selected in field (F). Checking the option VARIBLE ANALYSIS RANGE causes the left/right boundaries of the integration range to be shifted according to the displacements of the markers. Thus, there is the possibility to use only narrow sections of the markers for analysis and exclude the remaining part. If IGNORE CRACKS AND BUCKLES is checked, local intensity drops between the markers are canceled out by assigning the upper intensity value to the intensity profile within its plateau range. By applying this feature, pronounced defects like cracks and buckles, which may appear during in situ microscope imaging, do not alter the intensity profile and are not taken into account for analysis.

After the top/bottom and left/right boundaries have been defined appropriately, initial values for the curve fit of the intensity profile can be assigned. Therefore, press the INITIALIZE button (K). Click the center of the left slope, then the center of the right slope of the intensity profile in window (B). The program is now ready for starting the strain analysis routine. Note that the initialization procedure has to be repeated if the boundaries of the integration range are changed.

Strain analysis can be launched by clicking the START button (J). The intensity profile will be approximated by a sum of two error functions, where the inflection point (x1, x2) of each error function identifies the position of the respective marker:

While the analysis is running, check the intensity window (B) carefully to make sure that every curve fit is of good quality. This is especially important for the first image, as the initial marker distance serves as a basis for subsequent strain calculation. After the analysis has been completed, three output files will be created automatically within the folder of the image files. The file StrainX.dat consists of a column vector containing the determined strain values, which are plotted versus the image number in the MATLAB figure file StrainX.fig. The complete set of parameters, which is derived during the analysis, is given in StrainMeasurement.dat. The first column contains the image number starting with one. The marker positions are given in the second and third column, while the marker distance is recorded in the forth column. The resulting strain is listed in the fifth column.

If it is required, the boundaries of the integration range and the options can be readjusted, and the analysis routine can be restarted after initialization. Hence, already existing output files will be replaced. To perform the strain measurement procedure for another series of images, press the RESET button (L). The active data and settings are cleared, and by repeating the previously described steps a new strain analysis procedure can be performed.