# Stereo Digital Image Correlation in MATLAB
## 4 Validation  
The temporal matching aspect of ADIC3D has been shown to be sufficiently robust to contrast changes and noise while offering a compromise between noise suppression and spatial resolution consistent with that of established DIC algorithms [53]. Thus, Samples 1 and 2 of the Stereo-DIC Challenge [55], exhibiting rigid body translations which avoid introducing errors during temporal matching due to complex displacement fields, are used to assess the remaining aspects of ADIC3D in a quantitative manner. Sample 5, exhibiting complex displacement fields, assesses ADIC3D in a qualitative manner. ADIC3D was used by setting StopCritVal = \(10^{-4}\) (limited to 100 iterations per subset), FiltSize = 0, RefStrat = 0, SubShape = 'Square', SFOrder = 1, SubSize = 61, and StepSize = 5. A larger subset size was used to reduce errors during temporal matching. Increasing the subset size beyond 61 pixels produced only marginal improvements. Additionally, DICe (Version 2.0-beta.16) [56] and LaVision's StrainMaster (version 1.3) were used to analyze the samples. DICe is well-established [77,78] and its modularity enables it to use the same subset positions in the FIS1 as ADIC3D prior to stereo matching. \begin{table}
\begin{tabular}{c c} \hline \hline
**Line Numbers** & **Task Performed** \\ \hline Line 2 & Compute calibration parameters using MATLAB’s \\  & estimateCameraParameters function; \\ Line 3–4 & Compute canonical projection matrices of first and second cameras; \\ Line 5 & Load the fundamental matrix; \\ Line 6 & for image number d = 1 to d = n, **do** \\ Line 7–8 & Compute \(x_{s_{1}}^{d}\) and \(x_{s_{2}}^{d}\), Equation (49); \\ Line 9 & Determine indices of subsets which do not contain NaNs in either \\  & \(x_{s_{1}}^{d}\) or \(x_{s_{2}}^{d}\); \\ Line 10 & if first image pair of image set **or** RefStrat = 1, **do** \\ Line 11 & Compute \(x_{w}^{d}\) (for subsets identified in line 9) using the \\  & Triangulation subroutine and MATLAB’s undistortPoints function; \\ Line 12 & else \\ Line 13 & Assign \(x_{w}^{d}\) of previous image pair to current image pair; \\ Line 14 & **end if** \\ Line 15 & Compute \(x_{w}^{d}\) (for subsets identified in line 9), using the \\  & Triangulation subroutine and MATLAB’s undistortPoints function, \\  & and subtract \(x_{w}^{d}\) from it to determine \(u_{w}\), \(v_{w}\) and \(v_{w}\) using Equation (51); \\ Line 16 & Save calibration parameters; \\ Line 18 & **end for** \\ \hline \hline \end{tabular}
\end{table} 
Table 13: CSTrans algorithm summary. \begin{table}
\begin{tabular}{c c} \hline \hline
**Line Numbers** & **Task Performed** \\ \hline Line 2 & **for** subset pair number q = 1 to number of subsets, **do** \\ Lines 3–4 & Determine translation matrices of Equation (35); \\ Line 5 & Apply translation matrices to fundamental matrix according to \\  & Equation (36); \\ Lines 6–8 & Compute epipoles and normalize them; \\ Lines 9–10 & Compute rotation matrices according to Equation (37); \\ Line 11 & Apply rotation matrices to fundamental matrix according \\  & to Equation (38); \\ Lines 12–13 & Compute polynomial coefficients of Equation (43); \\ Lines 14–15 & Compute real roots of the polynomial; \\ Line 16 & Evaluate polynomial of Equation (42) at these roots; \\ Line 17 & Determine root corresponding to minimum of Equation (42); \\ Lines 18–20 & Compute ideal subset positions according to Equations (44) and (45); \\ Lines 21–22 & Determine 3D position of noiseless subset positions using linear \\  & triangulation method; \\ Line 23 & **end for** \\ \hline \hline \end{tabular}
\end{table} 
Table 14: Triangulation algorithm summary. DICe was run using the same parameters as ADIC3D. StrainMaster, a streamlined version of LaVision's DaVis software, was used to analyze Samples 1 and 2. Its streamlined nature prevents modifying some correlation parameters such that it employed circular subsets, a stopping criterion of 0.01, and a maximum of 200 iterations.