# Stereo Digital Image Correlation in MATLAB
## 2 Framework Theory
### Stereo-DIC Overview  
The core operations of Stereo-DIC are subset matching, calibration, and displacement transformation. For a point on the specimen, subset matching determines the two sets of in-plane, pixel displacements it experiences in each distorted sensor CS which, along with the calibration parameters determined by the calibration process, are used by displacement transformation to determine the in-plane and out-of-plane (thus 3D) metric displacements it experiences in the world CS. Note that with regards to subset matching and displacement transformation, the term _in-plane_ refers to the x-y plane of the distorted sensor CSs and world CS respectively. Subset matching is composed of stereo and temporal matching which utilize correlation differently. First, subset matching breaks up the first image of the first image series (FIS1) into subsets. Second, stereo matching determines the location of the corresponding subsets in the first image of the second image series (FIS2). Such subsets, one from each image of an image pair which correspond to the same point on the specimen, are termed a subset pair. Lastly, temporal matching, processing each image series separately, determines the displacements experienced by these subsets through their respective image series. This is achieved by sequentially stepping through an image series, starting at the second image, and at each step performing correlation by treating the current image as the deformed image while the reference image is dictated by the reference image strategy as discussed in Section 2.6.1. Thus, stereo matching is unique to Stereo-DIC while temporal matching is identical to that of 2D DIC. The calibration method is identical to that of 2D DIC. However, in order to determine the epipolar geometry from the calibration parameters requires that the two calibration image series, used to calibrate the cameras separately, form part of the same calibration image set. Displacement transformation, illustrated in Figure 3, steps through image pairs of the image set similarly to temporal matching. More specifically, considering a single reference subset pair with known locations, \(\mathbf{x}^{o}_{s_{j}}\), it uses the in-plane displacements determined by temporal matching (\(u_{j}\) and \(v_{j}\) in the x- and y-directions) between the reference images (of the reference image pair) and the deformed images (of the deformed image pair) to determine the locations of the investigated subset pair, \(\mathbf{x}^{d}_{s_{j}}\). In contrast to 2D DIC, distortion correction alone is insufficient to determine the ideal coordinate of a subset in the ideal sensor CS. More specifically, discretization of light to form an image introduces noise in the images [66] and displacements measured by correlation, which are used to determine the locations of subsets, inherently contain some noise. Thus, correcting \(\mathbf{x}^{o}_{s_{j}}\) and \(\mathbf{x}^{d}_{s_{j}}\) for radial distortion results in the measured coordinates of the reference, \(\hat{\mathbf{x}}^{o}_{s_{j}}\), and investigated subset pair, \(\hat{\mathbf{x}}^{d}_{s_{j}}\), in the ideal sensor CS respectively. Generally, these measured coordinates of a subset pair, represented as \(\hat{\mathbf{x}}_{s_{j}}\), do not satisfy the epipolar constraint of Equation (24) since their back-projection rays do not intersect. Thus, triangulation, which determines the 3D coordinate in the world CS, \(\hat{\mathbf{x}}_{w}\), from \(\hat{\mathbf{x}}_{s_{j}}\), is performed in two steps. First the polynomial triangulation method, detailed in Section 2.7, determines the ideal coordinates of a subset pair, \(\hat{\mathbf{x}}_{s_{j}}\), which lie as close to \(\hat{\mathbf{x}}_{s_{j}}\) as possible while satisfying the epipolar constraint. Thereafter the linear triangulation method, detailed in Section 2.8, determines \(\hat{\mathbf{x}}_{w}\) to which \(\hat{\mathbf{x}}_{s_{j}}\) correspond as the intersection of their back-projected rays.