# Adaptive Subset-Based Digital Image Correlation for Fatigue Crack Evaluation
## 2 Automated Determination Algorithm of Adaptive Subset Sizes  
Figure 1 shows the overview of the automated adaptive size determination algorithm. The proposed algorithm consists of the following four steps: (1) initial parameter setting within the ROI, (2) the determination of the converging size by evaluating a matching distance, (3) the establishment of a convergence map and (4) the determination of adaptive subset sizes. The details of each step are as follows. Step (1) Initial parameter setting within the ROI: First, \(R\) number of the reference images are taken by a digital camera at a certain time interval without any deformation of the target structure, as shown in Step (1) of Figure 1. The pair of reference images, i.e., \(R_{q}\) and \(R_{q}^{\prime}\), are then selected via the two different combinations of the reference images. Subsequently, the ROI to be analyzed is selected within \(R_{q}\), and the seed point \(O_{i}\) is then spatially assigned with a certain spatial interval on the ROI. Note that the spatial interval of \(O_{i}\) should not be larger than the minimum size of the reference subset \(S_{i}\) to be investigated in the subsequent step, so that searching pixel missing can be avoided. Once \(O_{i}\) is assigned in the ROI, \(S_{1}\), centered at \(O_{1}\), starts to be determined with the size of \((2M_{1}+1)\times(2M_{1}+1)\) to have integer pixel values. Step (2) The determination of the converging size by evaluating a matching distance: As depicted in Step (2) of Figure 1, the NCC of \(S_{1}\) with respect to \(R_{1}^{\prime}\) is calculated to establish the correlation coefficient (\(C_{NCC}\)) map. \(C_{NCC}\) can be expressed by:  
Figure 1: Overview of the automated size determination algorithm of adaptive subsets: \(R_{q}\) and \(R_{q}^{\prime}\) are the pair reference images. \(O_{i}\) is the seed point on \(R_{q}\), and \(S_{i}\) is the reference subset centered at \(O_{i}\). \(M_{j}\) is the size parameter of \(S_{i}\), and \(S_{i}(j)\) is \(\left(2M_{j}+1\right)\times\left(2M_{j}+1\right)\). \(S_{i}^{\prime}\) is the matched subset of \(S_{i}\) centered at \(O_{i}^{\prime}\). \(D\) is the matching distance between \(S_{i}\) and \(S_{i}^{\prime}\). \(D^{\prime}\) is the derivative of \(D\). \(V_{i}\) is the converging size and \(A_{i}\) is the adaptive subset size. PDF is the probability density function. \[C_{\text{NCC}}=\sum_{a=-M_{j}}^{M_{j}}\sum_{b=-M_{j}}^{M_{j}}\left[\frac{[f(x_{a}, y_{b})-f^{\prime}]\times[g(x^{\prime}_{a},y^{\prime}_{b})-g^{\prime}]}{\Delta f \Delta g}\right], \tag{1}\] \[\Delta f=\sqrt{\sum_{a=-M_{j}}^{M_{j}}\sum_{b=-M_{j}}^{M_{j}}[f(x_ {a},y_{b})-f^{\prime}]^{2}},\ \Delta g=\sqrt{\sum_{a=-M_{j}}^{M_{j}}\sum_{b=-M_{j}}^{M_{j}}[g(x^{\prime}_{a},y^{\prime}_{b})-g^{\prime}]^{2}}\] \[f^{\prime}=\frac{1}{(2M_{j}+1)^{2}}\sum_{a=-M_{j}}^{M_{j}}\sum_{ b=-M_{j}}^{M_{j}}f(x_{a},y_{b}),\ g^{\prime}=\frac{1}{(2M_{j}+1)^{2}}\sum_{a=-M_{j}}^{M_{j}} \sum_{b=-M_{j}}^{M_{j}}g(x^{\prime}_{a},y^{\prime}_{b})\]  
where \(f\) and \(g\) represent the grayscale intensity value at spatial points \((x_{a},y_{b})\) and \((x^{\prime}_{a},y^{\prime}_{b})\) in \(R_{q}\) and \(R^{\prime}_{q}\), respectively. The pixel of the highest \(C_{\text{NCC}}\) within the \(C_{\text{NCC}}\) map is selected as \(O^{\prime}_{1}\) which is the center point of the matched subset \(S^{\prime}_{1}\). Physically, \(S^{\prime}_{1}\) is the most similar to \(S_{1}\) within \(R^{\prime}_{1}\). \(S^{\prime}_{1}\) is then assigned to \(R_{1}\), centered at \(O^{\prime}_{1}\). If there is no deformation between \(R_{q}\) and \(R^{\prime}_{q}\), \(O^{\prime}_{i}\) and \(O_{i}\) theoretically have the same locations on \(R_{q}\) and \(R^{\prime}_{q}\), respectively.