# Significance of Parallel Computing on the Performance of Digital Image Correlation Algorithms in MATLAB

^{1}

^{2}

^{3}

^{4}

^{*}

^{†}

## Abstract

**:**

## 1. Introduction

## 2. Theoretical Background

#### 2.1. Integer Pixel Displacement

^{T}reaches its maximum if the grey level distributions of both sub-images are equal [22]. This implies that the displacement is determined by determining the position at which the correlation coefficient is maximal.

_{1}, x

_{2}) with velocity

**v**= (v

_{1}, v

_{2}). Through iteration with different generations “t” of the particle “i” an optimal solution is found. The next generation is determined according to:

_{1}and c

_{2}are predefined acceleration coefficients which influence cognitive (e.g., local) optimization behavior and social (e.g., global) optimization behavior, respectively. The parameters r

_{1}and r

_{2}are independent random values between zero and one.

_{best}at which it has perceived its maximal correlation coefficient c

_{best}so far. One particle has perceived the highest correlation coefficient c

_{best}of the whole swarm at the global best position g

_{best}. The generation dependent weight factor w is calculated according to:

_{max}.

#### 2.2. Sub-Pixel Displacement

_{00}+ a

_{10}x

^{j}+ a

_{01}y

^{j}+ a

_{11}x

^{j}y

^{j}.

_{00}, a

_{01}, a

_{10}and a

_{11}are the coefficients of the bilinear interpolation function. Utilizing a linear equation system, those coefficients can be determined by the grey levels of surrounding integer pixel positions. Besides this simple bilinear approach, other methods such as bicubic interpolation [24,25] or higher-order spline interpolation [26] have been used as well. Generally, the higher the approaches’ order the higher the accuracy at the expense of computational effort [2].

#### 2.3. Parallel Computation

#### CPU Parallel Computation in MATLAB

## 3. Tests and Comparisons

^{2}with a sampling size of 15 pixels. The results were 1.06 million data points for dataset 1 and 200,000 data points for dataset 2. All tests were performed with two different hardware settings, giving directly comparable results as well as providing information on the impact of the system being used. The two used computer systems are listed in Table 2.

## 4. Results

#### 4.1. Evaluating Result Correctness

#### 4.2. Evaluating Integer Pixel Routines

#### 4.3. Evaluating Sub-Pixel Routines

#### 4.4. Significance of Parallel Computation

## 5. Discussion

#### 5.1. Hardware Profile and Influence of Dataset Properties

#### 5.2. Integer Pixel Search

**ω**, and achieved a balance between global and local search. The reported results show a linear decrease in the

**ω**while solving the algorithm, which ultimately increased the convergence rate.

#### 5.3. Sub-Pixel Search

#### 5.4. Parallel Computation

#### 5.5. GPU Accelerated Technique

## 6. Conclusions

## Author Contributions

## Funding

## Institutional Review Board Statement

## Informed Consent Statement

## Data Availability Statement

## Conflicts of Interest

## Nomenclature

Symbol and Abbreviation | Description |

MATLAB | Matrix Laboratory |

f | Grey level in the reference image |

g | Grey level in the deformed image |

(x, y) | Denotes the position in the reference image |

(x*, y*) | Denotes the position in the deformed image |

Hz | Hertz |

C | Correlation coefficient |

v | Velocity |

d | Direction of the search |

r | Independent random values |

ω | inertial weights |

M | Number of rows in an image |

N | Number of columns in an image |

w | Weight factor |

G | Grey level distribution at an arbitrary sub-pixel |

a | Coefficients of the bilinear interpolation function |

t | Time |

i | Iterations |

GBit/s | GigaBits per second |

CPU | Central processing unit |

GPU | Graphics processing unit |

CUDA | Compute unified device architecture |

## Appendix A

## References

- Hild, F.; Roux, S. Digital Image Correlation: From Displacement Measurement to Identification of Elastic Properties—A Review. Strain
**2006**, 42, 69–80. [Google Scholar] [CrossRef][Green Version] - Yoneyama, S. Basic principle of digital image correlation for in-plane displacement and strain measurement. Adv. Compos. Mater.
**2016**, 25, 105–123. [Google Scholar] [CrossRef] - Wu, R.; Kong, C.; Li, K.; Zhang, D. Real-Time Digital Image Correlation for Dynamic Strain Measurement. Exp. Mech.
**2016**, 56, 833–843. [Google Scholar] [CrossRef] - Zhong, F.Q.; Indurkar, P.P.; Quan, C.G. Three-dimensional digital image correlation with improved efficiency and accuracy. Measurement
**2018**, 128, 23–33. [Google Scholar] [CrossRef] - Brown, G.M.; Chen, F.; Song, M. Overview of three-dimensional shape measurement using optical methods. Opt. Eng.
**2000**, 39, 10–22. [Google Scholar] [CrossRef] - Vendroux, G.; Knauss, W.G. Submicron deformation field measurements: Part 2. Improved digital image correlation. Exp. Mech.
**1998**, 38, 86–92. [Google Scholar] [CrossRef] - Pan, B.; Qian, K.; Xie, H.; Asundi, A. Two-dimensional digital image correlation for in-plane displacement and strain measurement: A review. Meas. Sci. Technol.
**2009**, 20. [Google Scholar] [CrossRef] - Peters, W.H.; Ranson, W.F. Digital Imaging Techniques in Experimental Stress Analysis. Opt. Eng.
**1982**, 21, 213427. [Google Scholar] [CrossRef] - Mudassar, A.A.; Butt, S. Improved Digital Image Correlation method. Opt. Lasers Eng.
**2016**, 87, 156–167. [Google Scholar] [CrossRef] - Simončič, S.; Podržaj, P. An Improved Digital Image Correlation Calculation in the Case of Substantial Lighting Variation. Exp. Mech.
**2017**, 57, 743–753. [Google Scholar] [CrossRef] - Pan, B. Digital image correlation for surface deformation measurement: Historical developments, recent advances and future goals. Meas. Sci. Technol.
**2018**, 29, 082001. [Google Scholar] [CrossRef] - Yoneyama, S.; Murasawa, G. Digital image correlation. In Experimental Mechanics; Freire, J.F., Ed.; Encyclopedia of Life Support System (EOLSS) Publishers: Oxford, UK, 2009. [Google Scholar]
- Beyerer, J.; Leon, F.P.; Frese, C. Machine Vision: Automated Visual Inspection: Theory, Practice and Applications; Springer: Berlin/Heidelberg, Germany, 2015. [Google Scholar] [CrossRef]
- Jiang, Z.; Gao, Y.; Liu, J. A lid approach for predicting wave induced motions of trimaran in regular waves. Brodogradnja
**2019**, 70, 171–185. [Google Scholar] [CrossRef] - Gil, P. Short Project-Based Learning with MATLAB Applications to Support the Learning of Video-Image Processing. J. Sci. Educ. Technol.
**2017**, 26, 508–518. [Google Scholar] [CrossRef] - Jaton, F. We get the algorithms of our ground truths: Designing referential databases in digital image processing. Soc. Stud. Sci.
**2017**, 47, 811–840. [Google Scholar] [CrossRef] [PubMed][Green Version] - Solav, D.; Moerman, K.M.; Jaeger, A.M.; Genovese, K.; Herr, H.M. MultiDIC: An Open-Source Toolbox for Multi-View 3D Digital Image Correlation. IEEE Access
**2018**, 6, 30520–30535. [Google Scholar] [CrossRef] - Cheng, J.A.; Grossman, M.; Mckercher, T. Professional CUDA C Programming; John Wiley & Sons, Inc.: Indianapolis, IN, USA, 2014; ISBN 978-1-118-73927-3. [Google Scholar]
- Kim, P. Convolutional neural network. In MATLAB Deep Learning; Springer, Apress: Berkeley, CA, USA, 2017. [Google Scholar] [CrossRef]
- Pan, B.; Xie, H.M.; Xu, B.Q.; Dai, F.L. Performance of sub-pixel registration algorithms in digital image correlation. Meas. Sci. Technol.
**2006**, 17, 1615–1621. [Google Scholar] [CrossRef] - Lin, Y.; Lan, Z. Sub-Pixel Displacement Measurement in Digital Image Correlation Using Particle Swarm Optimization. In Proceedings of the ICINA-International Conference on Information, Networking and Automation, Kunming, China, 18–19 October 2010. [Google Scholar] [CrossRef]
- Rafael, C.G.; Richard, E.W.; Steven, L.E. Digital Image Processing Using MATLAB, 2nd ed.; Gatesmark: Knoxville, TN, USA, 2008; ISBN 978-09-8208-540-0. [Google Scholar]
- Chu, T.C.; Ranson, W.F.; Sutton, M.A. Applications of digital-image-correlation techniques to experimental mechanics. Exp. Mech.
**1985**, 25, 232–244. [Google Scholar] [CrossRef] - Bruck, H.A.; McNeill, S.R.; Sutton, M.A.; Peters, W.H. Digital image correlation using Newton-Raphson method of partial differential correction. Exp. Mech.
**1989**, 29, 261–267. [Google Scholar] [CrossRef] - Pan, B.; Wu, D.; Wang, Z. Internal displacement and strain measurement using digital volume correlation: A least-squares framework. Meas. Sci. Technol.
**2012**, 23. [Google Scholar] [CrossRef] - Bornert, M.; Doumalin, P.; Dupré, J.-C.; Poilâne, C.; Robert, L.; Toussaint, E.; Wattrisse, B. Assessment of Digital Image Correlation Measurement Accuracy in the Ultimate Error Regime: Improved Models of Systematic and Random Errors. Exp. Mech.
**2017**, 58, 33–48. [Google Scholar] [CrossRef][Green Version] - Shao, X.; Dai, X.; He, X. Noise robustness and parallel computation of the inverse compositional Gauss–Newton algorithm in digital image correlation. Opt. Lasers Eng.
**2015**, 71, 9–19. [Google Scholar] [CrossRef] - Pan, B.; Li, K.; Tong, W. Fast, Robust and Accurate Digital Image Correlation Calculation without Redundant Computations. Exp. Mech.
**2013**, 53, 1277–1289. [Google Scholar] [CrossRef] - Asanovic, K.; Bodik, R.; Demmel, J.; Keaveny, T.; Keutzer, K.; Kubiatowicz, J.; Morgan, N.; Patterson, D.; Sen, K.; Wawrzynek, J.; et al. A view of the parallel computing landscape. Commun. ACM
**2009**, 52, 56–67. [Google Scholar] [CrossRef][Green Version] - Zhang, L.; Wang, T.; Jiang, Z.; Kemao, Q.; Liu, Y.; Liu, Z.; Tang, L.; Dong, S. High accuracy digital image correlation powered by GPU-based parallel computing. Opt. Lasers Eng.
**2015**, 69, 7–12. [Google Scholar] [CrossRef] - Gates, M.; Heath, M.T.; Lambros, J. High-performance hybrid CPU and GPU parallel algorithm for digital volume correlation. Int. J. High Perform. Comput. Appl.
**2014**, 29, 92–106. [Google Scholar] [CrossRef] - NVIDIA. CUDA Developer Zone. 2017. Available online: https://developer.nvidia.com/cuda-zone (accessed on 19 March 2019).
- NVIDIA. CUDA C Best Practices Guide. Available online: http://docs.nvidia.com/cuda/cuda-c-best-practices-guide/index.html (accessed on 19 March 2019).
- Blaber, J.; Adair, B.S.; Antoniou, A. Ncorr: Open-Source 2D Digital Image Correlation Matlab Software. Exp. Mech.
**2015**, 55, 1105–1122. [Google Scholar] [CrossRef] - Baker, S.; Matthews, I. Lucas-Kanade 20 Years On: A Unifying Framework. Int. J. Comput. Vis.
**2004**, 56, 221–255. [Google Scholar] [CrossRef] - Bigger, R.; Blaysat, B.; Boo, C.; Grewer, M.; Hu, J.; Jones, A.; Klein, M.; Raghavan, K.; Reu, P.; Schmidt, T.; et al. A Good Practices Guide for Digital Image Correlation; International Digital Image Correlation Society: Hangzhou, China, 2018. [Google Scholar] [CrossRef]
- Conrad, F.; Blug, A.; Kerl, J.; Fehrenbach, J.; Regina, D.; Bertz, A.; Kontermann, C.; Carl, D.; Oechsner, M. GPU-based digital image correlation system for uniaxial and biaxial crack growth investigations. Procedia Struct. Integr.
**2020**, 28, 2195–2205. [Google Scholar] [CrossRef] - Sutton, M.A.; Matta, F.; Rizos, D.; Ghorbani, R.; Rajan, S.; Mollenhauer, D.H.; Schreier, H.W.; Lasprilla, A.O. Recent Progress in Digital Image Correlation: Background and Developments since the 2013 W M Murray Lecture. Exp. Mech.
**2016**, 57, 1–30. [Google Scholar] [CrossRef] - Wang, T.; Kemao, Q.; Seah, H.S.; Lin, F. A flexible heterogeneous real-time digital image correlation system. Opt. Lasers Eng.
**2018**, 110, 7–17. [Google Scholar] [CrossRef] - Wang, C.; Song, W. A modified particle swarm optimization algorithm based on velocity updating mechanism. Ain Shams Eng. J.
**2019**, 10, 847–866. [Google Scholar] [CrossRef] - Yao, J.; Han, D. Improved Barebones Particle Swarm Optimization with Neighborhood Search and Its Application on Ship Design. Math. Probl. Eng.
**2013**, 2013, 175848. [Google Scholar] [CrossRef][Green Version] - Shi, Y.; Eberhart, R. Modified Particle Swarm Optimizer. In Proceedings of the IEEE Conference on Evolutionary Computation, ICEC, Anchorage, AK, USA, 4–9 May 1998. [Google Scholar] [CrossRef]
- Balit, Y.; Charkaluk, E.; Constantinescu, A. Digital image correlation for microstructural analysis of deformation pattern in additively manufactured 316L thin walls. Addit. Manuf.
**2020**, 31, 100862. [Google Scholar] [CrossRef] - Shao, X.; Zhong, F.; Huang, W.; Dai, X.; Chen, Z.; He, X. Digital image correlation with improved efficiency by pixel selection. Appl. Opt.
**2020**, 59, 3389–3398. [Google Scholar] [CrossRef] - Blug, A.; Regina, D.J.; Eckmann, S.; Senn, M.; Bertz, A.; Carl, D.; Eberl, C. Real-Time GPU-Based Digital Image Correlation Sensor for Marker-Free Strain-Controlled Fatigue Testing. Appl. Sci.
**2019**, 9, 2025. [Google Scholar] [CrossRef][Green Version] - Yang, J.; Huang, J.; Jiang, Z.; Dong, S.; Tang, L.; Liu, Y.; Liu, Z.; Zhou, L. 3D SIFT aided path independent digital volume correlation and its GPU acceleration. Opt. Lasers Eng.
**2021**, 136, 106323. [Google Scholar] [CrossRef] - Tyagi, V. Understanding Digital Image Processing; CRC Press: Boca Raton, FL, USA, 2018. [Google Scholar] [CrossRef]

**Figure 2.**The displacement between the first and the twenty-second image of dataset 1 in the horizontal (X) direction. The upper part displays the displacement determined by the author’s program.

**Figure 3.**The displacement between the first and the twenty-second image of dataset 1 in the horizontal (X) direction. The lower part represents the displacement calculated with NCORR developed by Blaber et al. [34].

**Figure 4.**On the left side is the displacement in the Y direction, between image 1 and image 4 of dataset 2, obtained by the program developed by the authors. On the right side, the same displacement for the same image pair is shown but obtained by the program by Blaber et al. [34].

Algorithms | Type |
---|---|

Brute Force Search Algorithm | Integer-pixel search algorithm |

Particle Swarm Optimization | Integer-pixel search algorithm |

Modified Particle Swarm Optimization (integrated Star Search algorithm) | Integer-pixel search algorithm |

Newton–Raphson method | Sub-pixel search algorithm |

Inverse-compositional Gauss–Newton method self-implemented | Sub-pixel search algorithm |

Inverse-compositional Gauss–Newton method by Baker and Matthews [35] | Sub-pixel search algorithm |

Parameter | Computer 1 | Computer 2 |
---|---|---|

Operating System | Windows Server 2012 R2 64-bit | Windows 7 enterprise |

RAM | 4 GB DDR2 | 16 GB |

CPU | Intel Xeon Dual Core CPU E5 2726v3 2.4 GHz | Intel Core i7-6700 Quad-Core 3.4 GHz |

Hard drive | N/A | Samsung PM871a |

Ethernet Connection | Intel I219-LM | N/A |

Data Transfer Rate [GBit/s] | 1 | 4.16 |

Integer-Pixel Search | Sub-Pixel Search Algorithm | Time PC 1 [s] | Time PC 2 [s] | ||
---|---|---|---|---|---|

Set 1 | Set 2 | Set 1 | Set 2 | ||

Brute Force | Newton–Raphson | 3345.5 | 65.23 | 2084.4 | 45.38 |

PSO (Particle Swarm Optimization) | Newton–Raphson | 582.4 | 19.10 | 346.6 | 7.64 |

Mod. PSO | Newton–Raphson | 556.9 | 17.94 | 327.2 | 7.34 |

Brute Force | IC-GN | 3351.3 | 89.44 | 2198.5 | 58.04 |

PSO | IC-GN | 677.0 | 29.72 | 452.5 | 13.60 |

Mod. PSO | IC-GN | 706.3 | 30.29 | 464.7 | 12.39 |

Brute Force | IC-GN by Baker [35] | 3197.2 | 78.86 | 2090.3 | 52.65 |

PSO | IC-GN by Baker [35] | 534.8 | 20.80 | 309.2 | 7.26 |

Mod. PSO | IC-GN by Baker [35] | 524.2 | 21.39 | 305.7 | 7.15 |

Integer-Pixel Search | Sub-Pixel Search Algorithm | Time PC 1 [s] | Time PC 2 [s] | ||
---|---|---|---|---|---|

Set 1 | Set 2 | Set 1 | Set 2 | ||

Brute Force | Newton–Raphson | 2682.5 | 58.66 | 1905.4 | 36.722 |

PSO | Newton–Raphson | 863.5 | 20.00 | 677.6 | 8.38 |

Mod. PSO | Newton–Raphson | 861.5 | 19.41 | 618.9 | 8.17 |

Brute Force | IC-GN | 2938.0 | 61.56 | 1942.1 | 38.756 |

PSO | IC-GN | 914.6 | 24.18 | 678.8 | 11.10 |

Mod. PSO | IC-GN | 964.6 | 24.15 | 685.7 | 10.99 |

Brute Force | IC-GN by Baker [35] | 2348.4 | 55.13 | 1776.4 | 35.00 |

PSO | IC-GN by Baker [35] | 552.2 | 17.98 | 424.2 | 7.49 |

Mod. PSO | IC-GN by Baker [35] | 902.7 | 20.19 | 418.9 | 6.60 |

Integer-Pixel Search | Sub-Pixel Search Algorithm | Time PC 1 [s] | Time PC 2 [s] | ||
---|---|---|---|---|---|

Set 1 | Set 2 | Set 1 | Set 2 | ||

Brute Force | Newton–Raphson | 1778.7 | 41.20 | 1208.3 | 24.94 |

PSO | Newton–Raphson | 152.8 | 5.57 | 105.5 | 2.90 |

Mod. PSO | Newton–Raphson | 158.9 | 5.44 | 108.0 | 2.89 |

Brute Force | IC-GN | 1823.6 | 45.66 | 1239.8 | 26.13 |

PSO | IC-GN | 186.9 | 8.82 | 124.4 | 4.36 |

Mod. PSO | IC-GN | 189.7 | 8.10 | 135.8 | 4.36 |

Brute Force | IC-GN by Baker [35] | 1766.4 | 43.32 | 1193.6 | 24.73 |

PSO | IC-GN by Baker [35] | 156.0 | 5.63 | 107.2 | 2.99 |

Mod. PSO | IC-GN by Baker [35] | 148.0 | 5.74 | 106.0 | 2.91 |

Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |

© 2021 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Thoma, A.; Moni, A.; Ravi, S.
Significance of Parallel Computing on the Performance of Digital Image Correlation Algorithms in MATLAB. *Designs* **2021**, *5*, 15.
https://doi.org/10.3390/designs5010015

**AMA Style**

Thoma A, Moni A, Ravi S.
Significance of Parallel Computing on the Performance of Digital Image Correlation Algorithms in MATLAB. *Designs*. 2021; 5(1):15.
https://doi.org/10.3390/designs5010015

**Chicago/Turabian Style**

Thoma, Andreas, Abhijith Moni, and Sridhar Ravi.
2021. "Significance of Parallel Computing on the Performance of Digital Image Correlation Algorithms in MATLAB" *Designs* 5, no. 1: 15.
https://doi.org/10.3390/designs5010015