Strain Calculation by Image Processing
(i) The captured image is shown in figure a.
(ii) The captured image is converted to gray scale as shown in figure b.
(iii) Separation of electrode coated region from the background is done by keeping a threshold to the gray-scale image. The threshold can be found by studying the histogram of the image . After background removal the image is shown in figure c. As the actuation region of the film is coated with black colour the intensity value is close to zero. The threshold is selected in-between 40-60 based on the histogram such that the actuation part is separated from the background image.
(iv) The function used for converting gray-scale image to binary image is 'im2bw' in Matlab. The function takes two arguments. They are image intensity matrix and the threshold. The threshold which it takes is normalized i.e. from 0 to 1. So the threshold which is obtained from histogram must be scaled down in the scale of 0-1.
(v)After selecting the threshold value pixel with intensity value less than threshold is made 0 and the pixel with intensity value greater than threshold is made 1 to form a binary image.
(vi) As we can see from the Figure 4.6 there are some white spots in the actuation area of the film. This is due to the lighting conditions while capturing the image. The white spots are removed from the image using the function 'roipoly' from the image processing toolbox in matlab. Figure d shows the image after removing the white spots in the actuation area.
 Agus Zainal Arifin and Akira Asano "Image Segmentation by histogram thresholding using hierarchical cluster analysis", Pattern Recognition letters, Vol. 27, No. 13, pp 1515-1521, 2006.