# Use of Image Correlation to Measure Macroscopic Strains by Hygric Swelling in Sandstone Rocks
## 2 Materials and Methods
### Image Processing Methods  
Rock deformation was assessed by surface texture displacements, achieved by calculating the normalized digital image cross-correlation (DIC) between the first frame in the sequence and all the other frames. To increase the accuracy of this result, the correlation peak was interpolated as detailed below [13]. This is a preferred procedure to the other strategy, which consists of interpolating the image itself, as this procedure can induce systematic DIC errors due to inaccurate subpixel image reconstruction [14]. The DIC calculation was not applied to the whole specimen but to some specific ROIs. The size of these ROIs was determined after a texture size analysis by autocorrelation. Different ROIs of fixed sizes were randomly located in 50 different positions on the sample's surface. Autocorrelation was calculated for each ROI, as was the full width at half maximum of the autocorrelation peak to, thus, estimate the average size of the particles in ROIs. This procedure was repeated for the different ROI sizes, ranging from 5 \(\times\) 5 px to 200 \(\times\) 200 px. Figure 4 represents the mean values of the correlation peak of each ROI size for one particular sample and the green channel. Standard deviations are represented  
Figure 3: Photo studio light box, with one of its sides open. Figure 2: Setup for the imaging system and sample. as error bars. This figure depicts that small ROIs presented wide variability in detail size, depending on their position, and merely showed sample non-homogeneity. Note that for ROIs larger than 80 \(\times\) 80, peak width is stable and the variation with ROI location is relatively narrow. A similar graph was obtained for all the samples, with the stability region ranging between 80 and 120 px. Thus, our calculations were performed on ROIs measuring 100 \(\times\) 100 px for all the samples. Note that the larger ROIs were, the longer the calculation time required, with no clear benefits obtained in quality results terms. Finally, we stress that after some preliminary tests [11], we decided to select the 20 px template smaller than the ROI on both sides to allow texture displacement without going beyond interrogation area limits. The aim of the method is to determine the macroscopic strains due to hygric swelling. According to this, the deformation has been only calculated in six ROIs of the calculated size at specific positions close to the upper and lateral edges (see Figure 5). Every ROI from each frame was compared by DIC to the corresponding ROI in the same position from the first frame. This distribution allowed us to find the material strain in both the vertical (on both sides of the probe) and the horizontal (at three different heights) directions by using (1). \[\varepsilon_{ij}(t)=\frac{Pos_{ROI_{i}}(t)-Pos_{ROI_{j}}(t)}{Pos_{ROI_{i}}(0)- Pos_{ROI_{j}}(0)} \tag{1}\]  
where \(Pos_{ROI_{i}}(t)\) is the location of ROI \(i\) for time \(t\). As previously mentioned, the DIC results were refined by interpolating the correlation peak following the procedure explained in [12]. According to the literature, both the interpolation area around the peak and the used fitting function are critical for obtaining accurate results. Two different strategies can be followed: taking a small interpolation area and using a quadratic function as a fitting function, or employing a large area with a Gaussian function. In order to select the best method, we implemented both strategies on the particular rock texture by imposing a synthetic displacement and comparing the results obtained by both methods. Figure 4: Size of the texture details estimated as the autocorrelation FWHM for the different region of interest (ROI) sizes for sample 1 in the green channel at 50 random positions. The results of other channels and samples showed similar outcomes. This test was prepared by taking the six ROIs represented in Figure 5 from the first picture of a sequence and numerically displacing by a total of 10 px in the vertical direction in steps of 0.1 px.