# Stereo Digital Image Correlation in MATLAB
## 5 Discussion  
ADIC3D's modularity is threefold. Firstly, the main tasks are performed by separate subroutines, closely linked to the mathematical theory presented, allowing readers to progressively build up their understanding of ADIC3D. For instance, correlation is separated into three subroutines enabling the reader to consider: (i) how data is prepared based on the subset shape (SubShapeExtract); (ii) the SF order's influence on expressions for variables used during correlation (SFExpressions); and (iii) the core operations of correlation (SubCorr) separately. Furthermore, subroutines ImgCorr and StereoMatch show how correlation is utilized differently by temporal and stereo matching. Secondly, the subset shape, SF order, interpolation method, and Gaussian filtering parameters can be readily changed. Although the influence of these on displacement results is well documented in experimental solid mechanics applications [3, 4, 45], this allows investigating their influence in novel applications to fine-tune ADIC3D's setup. Thirdly, the SF order, subset size, and subset shape can be changed on a per subset and per image basis enabling straightforward integration with adaptive strategies. Adaptive strategies, which are gaining interest in the field of DIC, attempt to assign optimal parameters to each subset such that the resulting displacements are, theoretically, as reliable as possible and independent of the user. In order for the code to retain its simplicity, four aspects, identified by [PERSON] [41] as state-of-the-art requirements, were omitted. First, calibration does not use bundle adjustment, proposed by [PERSON] and [PERSON] [80], to refine the calibration parameters. Additionally, [PERSON]'s method [81] of combing the frontal image plane and DIC to more accurately locate the CIs is not implemented. It should be noted that although the camera model presented in Section 2.2 only accounts for radial distortion, accounting for tangential distortion in ADIC3D is straightforward, as outlined in Appendix E.  
Secondly, although the incremental reference image strategy is included, ADIC3D does not automatically employ it if the ZNCC coefficient falls below a certain threshold as recommended [82]. Thirdly, ADIC3D uses bi-cubic b-spline interpolation whereas bi-quintic b-spline interpolation is recommended [3] since increasing the degree of the interpolation method reduces the errors in the \"ultimate error regime\" [83] especially for smaller subsets. Lastly, ADIC3D does not employ [PERSON]'s [84] reliability guided displacement tracking strategy (RCDT). ADIC3D's temporal matching uses the SFPs of each subset of the previous correlation run as initial estimates in the current correlation run. In contrast, RGDT only does this for the subset achieving the best ZNCC in the previous correlation run. This subset's optimized SFPs are used as an initial estimate to correlate its neighboring subsets. Of the correlated subsets, having uncorrelated neighbors, the one with the best ZNCC has its SFPs used as an initial estimate to correlate its neighbors. This is repeated to correlate all subsets in the current correlation run. As noted with ADIC2D [53], this exclusion makes ADIC3D susceptible to propagating spurious SFPs of a subset throughout the image series. Furthermore, RGDT is excluded such that ADIC3D is path-independent (where each subset is correlated independently of its neighbors). Thus, this avoids the need to specify \begin{table}
\begin{tabular}{c c c c c c c c c} \hline \hline
**Image Pair** & \multicolumn{2}{c}{**250**} & \multicolumn{2}{c}{**500**} & \multicolumn{2}{c}{**750**} & \multicolumn{2}{c}{**1000**} \\ \hline
**Metric** & **Mean** & **Max** & **Mean** & **Max** & **Mean** & **Max** & **Mean** & **Max** \\ \hline \(\hat{u}_{w}\) & 0.0342 & 0.131 & 0.0354 & 0.113 & 0.0373 & 0.118 & 0.0374 & 0.122 \\ \(\hat{v}_{w}\) & 0.374 & 2.19 & 0.6 & 2.57 & 0.875 & 2.97 & 1.04 & 3.84 \\ \(\hat{w}_{w}\) & 0.093 & 0.443 & 0.193 & 0.744 & 0.291 & 0.926 & 0.345 & 1.02 \\ \hline \hline \end{tabular}
\end{table}