#
py2DIC: A New Free and Open Source Software for Displacement and Strain Measurements in the Field of Experimental Mechanics^{ †}

^{1}

^{2}

^{3}

^{*}

^{†}

## Abstract

**:**

## 1. Introduction

## 2. Commercial and Open Source DIC Software

#### 2.1. Commercial Software

^{TM}software offers the possibility to perform DIC to identify areas of high stress, crack opening or other discontinuities [21].

#### 2.2. Open Source Software

## 3. py2DIC

`matchTemplate`with the FNCC (Fast Normalized Cross-Correlation) similarity criterion (Equation (1)) [36]:

- T denotes the reference template;
- I denotes the search window;
- $\rho $ denotes the correlation coefficient;
- w (width) and h (height) denote the reference template dimensions.

- ${E}_{xx}$, ${E}_{xy}$ and ${E}_{yy}$ are the Green Lagrangian strains;
- $\frac{\partial u}{\partial x}$, $\frac{\partial u}{\partial y}$, $\frac{\partial v}{\partial x}$, $\frac{\partial v}{\partial y}$ are the displacement gradients.

## 4. Case Studies

#### 4.1. Plate Hole DIC Challenge

#### 4.2. Tensile Test of Glass Fiber Reinforced Polymer Samples

## 5. Results and Discussion

- $\overline{\Delta u}$$\overline{\Delta v}$: mean value of the horizontal and vertical displacement differences
- $\tilde{\Delta u}$$\tilde{\Delta v}$: median value of the horizontal and vertical displacement differences
- $Std.Dev$: standard deviation of the horizontal and vertical displacement differences where N is the number of data points:${\sigma}_{u}=\sqrt{\frac{1}{N}{\sum}_{i,j}{(\Delta u-\overline{\Delta u})}^{2}}$${\sigma}_{v}=\sqrt{\frac{1}{N}{\sum}_{i,j}{(\Delta v-\overline{\Delta v})}^{2}}$
- $RMSE$: Root Mean Square Error of the horizontal and vertical displacement differences$RMS{E}_{u}=\sqrt{{\left({\sigma}_{u}\right)}^{2}+{\left(\overline{\Delta u}\right)}^{2}}$$RMS{E}_{v}=\sqrt{{\left({\sigma}_{v}\right)}^{2}+{\left(\overline{\Delta v}\right)}^{2}}$
- $NMAD$: Normalized Median Absolute Deviation$NMA{D}_{u}=1.4826\ast median|\Delta u-\tilde{\Delta u}|$$NMA{D}_{v}=1.4826\ast median|\Delta v-\tilde{\Delta v}|$
- LE68: Linear error with 68% of probability
- LE95: Linear error with 95% of probability

#### 5.1. Plate Hole DIC Challenge Displacement Field Comparison

#### 5.2. Plate Hole DIC Challenge Strain Field Comparison

#### 5.3. Tensile Test of GFRP Sample Displacement Field Comparison

#### 5.4. Tensile Test of GFRP Sample Strain Gauge Comparison

## 6. Conclusions and Prospects

## Author Contributions

## Funding

## Acknowledgments

## Conflicts of Interest

## References

- Baqersad, J.; Poozesh, P.; Niezrecki, C.; Avitabile, P. Photogrammetry and optical methods in structural dynamics—A review. Mech. Syst. Sig. Process.
**2017**, 86, 17–34. [Google Scholar] [CrossRef] - Lee, J.J.; Shinozuka, M. A vision-based system for remote sensing of bridge displacement. NDT E Int.
**2006**, 39, 425–431. [Google Scholar] [CrossRef] - Fukuda, Y.; Feng, M.Q.; Shinozuka, M. Cost-effective vision-based system for monitoring dynamic response of civil engineering structures. Struct. Control Health Monit.
**2010**, 17, 918–936. [Google Scholar] [CrossRef] - Feng, D.; Feng, M.Q.; Ozer, E.; Fukuda, Y. A Vision-Based Sensor for Noncontact Structural Displacement Measurement. Sensors
**2015**, 15, 16557–16575. [Google Scholar] [CrossRef] [PubMed] - Busca, G.; Cigada, A.; Mazzoleni, P.; Zappa, E. Vibration Monitoring of Multiple Bridge Points by Means of a Unique Vision-Based Measuring System. Exp. Mech.
**2014**, 54, 255–271. [Google Scholar] [CrossRef] - Kim, S.W.; Jeon, B.G.; Kim, N.S.; Park, J.C. Vision-based monitoring system for evaluating cable tensile forces on a cable-stayed bridge. Struct. Health Monit.
**2013**, 12, 440–456. [Google Scholar] [CrossRef] - Kohut, P.; Holak, K.; Uhl, T.; Ortyl, L.; Owerko, T.; Kuras, P.; Kocierz, R. Monitoring of a civil structure’s state based on noncontact measurements. Struct. Health Monit.
**2013**, 12, 411–429. [Google Scholar] [CrossRef] - Wang, B.; Pan, B. Subset-based local vs. finite element-based global digital image correlation: A comparison study. Theor. Appl. Mech. Lett.
**2016**, 6, 200–208. [Google Scholar] [CrossRef] [Green Version] - International Digital Image Correlation Society. A Good Practices Guide for Digital Image Correlation. Jones, E.M.C., Iadicola, M.A., Eds.; 2018. Available online: http://idics.org/wp-content/uploads/2018/10/DICGoodPracticesGuide_PrintVersion-V5h-181024.pdf (accessed on 20 January 2019).
- 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, 062001. [Google Scholar] [CrossRef] - Belloni, V.; Ravanelli, R.; Nascetti, A.; Di Rita, M.; Mattei, D.; Crespi, M. Digital Image Correlation From Commercial to Fos Software: A Mature Technique for Full-Field Displacement Measurement. In ISPRS—International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Proceedings of ISPRS TC II Mid-term Symposium “Towards Photogrammetry 2020”, Riva del Garda, Italy, 4–7 June 2018; ISPRS: Riva del Garda, Italy, 2018; XLII-2; pp. 91–95. [Google Scholar] [CrossRef]
- Harilal, R.; Ramji, M. Adaptation of Open Source 2D DIC Software Ncorr for Solid Mechanics Applications. In Proceedings of the 9th International Symposium on Advanced Science and Technology in Experimental Mechanics, New Delhi, India, 1–6 November 2014. [Google Scholar] [CrossRef]
- Ravanelli, R.; Nascetti, A.; Di Rita, M.; Belloni, V.; Mattei, D.; Nisticó, N.; Crespi, M. A New Digital Image Correlation Software for Displacement Field Measurement in Structural Applications. In ISPRS–International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences, Proceedings of FOSS4G-Europe 2017–Academic Track, Marne La Vallée, France, 18–22 July 2017; ISPRS: Marne La Vallée, France, 2017; XLII-4/W2; pp. 139–145. [Google Scholar] [CrossRef]
- Ayatollahi, M.R.; Moazzami, M. Digital image correlation method for calculating coefficients of Williams expansion in compact tension specimen. Opt. Lasers Eng.
**2017**, 90, 26–33. [Google Scholar] [CrossRef] - Lorenzino, P.; Beretta, G.; Navarro, A. Application of Digital Image Correlation (DIC) in resonance machines for measuring fatigue crack growth. Frattura ed Integrità Strutturale
**2014**, 30, 369–374. [Google Scholar] [CrossRef] - Correlated Solutions. 2019. Available online: http://correlatedsolutions.com (accessed on 24 June 2019).
- CorreliSTC. 2019. Available online: http://www.correli-stc.com (accessed on 24 June 2019).
- Dantec Dynamics. 2019. Available online: https://www.dantecdynamics.com/digital-image-correlation (accessed on 21 June 2019).
- GOM. 2019. Available online: https://www.gom.com/metrology-systems/aramis.html (accessed on 23 June 2019).
- Image Systems. 2019. Available online: http://www.imagesystems.se/index.php (accessed on 23 June 2019).
- Imetrum. 2019. Available online: https://www.imetrum.com/products (accessed on 20 June 2019).
- LaVision. 2019. Available online: https://www.imetrum.com/products (accessed on 21 June 2019).
- MatchID. 2019. Available online: http://www.matchidmbc.be (accessed on 22 June 2019).
- Blaber, J.; Adair, B.; Antoniou, A. Ncorr: Open-Source 2D Digital Image Correlation Matlab Software. Exp. Mech.
**2015**, 55, 1105–1122. [Google Scholar] [CrossRef] - Ncorr. 2018. Available online: http://www.ncorr.com (accessed on 8 September 2018).
- Turner, D.Z. Digital Image Correlation Engine (DICe) Reference Manual. Sandia Nat. Lab.: Livermore, CA, USA, 2015; Sandia Rep. SAND2015-10606 O. Available online: https://devhub.io/repos/dicengine-dice (accessed on 15 May 2019).
- Paraview. 2019. Available online: https://www.paraview.org (accessed on 15 June 2019).
- YADICS. 2019. Available online: http://yadics.univ-lille1.fr/wordpress/ (accessed on 9 January 2019).
- Seghir, R.; Arscott, S. Mechanically robust, electrically stable metal arrays on plasma-oxidized polydimethylsiloxane for stretchable technologies. J. Appl. Phys.
**2015**, 118, 045309. [Google Scholar] [CrossRef] - Seghir, R.; Arscott, S. Photo-hardenable and patternable PDMS/SU-8 hybrid functional material: A smart substrate for flexible systems. J. Polym. Sci. Part B Polym. Phys.
**2015**, 53, 1281–1291. [Google Scholar] [CrossRef] - Pierré, J.E.; Passieux, J.C.; Périé, J.N. Finite element stereo digital image correlation: framework and mechanical regularization. Exp. Mech.
**2017**, 57, 443–456. [Google Scholar] [CrossRef] - Pierré, J.E.; Passieux, J.C.; Périé, J.N.; Bugarin, F.; Robert, L. Unstructured finite element-based digital image correlation with enhanced management of quadrature and lens distortions. Opt. Lasers Eng.
**2016**, 77, 44–53. [Google Scholar] [CrossRef] [Green Version] - pydic. 2019. Available online: https://gitlab.com/damien.andre/pydic (accessed on 30 June 2019).
- Bradski, G.; Kaehler, A. Learning OpenCV: Computer vision with the OpenCV library; O’Reilly Media: Sebastopol, CA, USA, 2008. [Google Scholar]
- dolphin. 2019. Available online: https://bitbucket.org/mgenet/dolfin_dic/src/master/ (accessed on 15 June 2019).
- Available online: http://docs.opencv.org/2.4/doc/tutorials/imgproc///histograms/template_matching/template_matching.html (accessed on 8 September 2018).
- Fornberg, B. Generation of finite difference formulas on arbitrarily spaced grids. Math. Comput.
**1988**, 51, 699–706. [Google Scholar] [CrossRef] - Society for Experimental Mechanics. 2017. Available online: http://www.sem.org/dicchallenge (accessed on 16 December 2017).
- Reu, P.L.; Toussaint, E.; Jones, E.; Bruck, H.A.; Iadicola, M.; Balcaen, R.; Turner, D.Z.; Siebert, T.; Lava, P.; Simonsen, M. DIC Challenge: Developing Images and Guidelines for Evaluating Accuracy and Resolution of 2D Analyses. Exp. Mech.
**2017**, 58, 1067–1099. [Google Scholar] [CrossRef] - Pan, B.; Asundi, A.; Xie, H.; Gao, J. Digital image correlation using iterative least squares and pointwise least squares for displacement field and strain field measurements. Opt. Lasers Eng.
**2009**, 47, 865–874. [Google Scholar] [CrossRef]

**Figure 2.**Scheme of the image pairs together with the reference template, the central pixel and the search window: the reference template width and height (w) and the dimensions of the edges ($d/2,b/2$) of the search window must be specified by the user in the GUI before starting the processing [13].

**Figure 5.**u displacements (px) for the “plate hole” sample from SEM DIC challenge obtained from DIC technique. (

**a**) py2DIC raw results (

**b**) py2DIC smoothed results using Gaussian filter (

**c**) Ncorr results (

**d**) Vic-2D results (

**e**) DICe results.

**Figure 6.**v displacements (px) for the “plate hole” sample from SEM DIC challenge obtained from DIC technique. (

**a**) py2DIC raw results (

**b**) py2DIC smoothed results using Gaussian filter (

**c**) Ncorr results (

**d**) Vic-2D results (

**e**) DICe results.

**Figure 8.**${E}_{xy}$ Green Lagrangian strains for the “plate hole” sample from SEM DIC challenge obtained from DIC technique. (

**a**) py2DIC results using Gaussian filter (

**b**) py2DIC results using spline filter (

**c**) Ncorr results (

**d**) DICe results.

**Figure 9.**${E}_{yy}$ Green Lagrangian strains for the “plate hole” sample from SEM DIC challenge obtained from DIC technique. (

**a**) py2DIC results using Gaussian filter (

**b**) py2DIC results using spline filter (

**c**) Ncorr results (

**d**) DICe results.

**Figure 10.**u displacements (mm) for the tensile test of GFRP sample obtained from DIC technique. (

**a**) py2DIC raw results (

**b**) py2DIC smoothed results using Gaussian filter (

**c**) Ncorr results (

**d**) Vic-2D results (

**e**) DICe results [11].

**Figure 11.**v displacements (mm) for the tensile test of GFRP sample obtained from DIC technique. (

**a**) py2DIC raw results (

**b**) py2DIC smoothed results using Gaussian filter (

**c**) Ncorr results (

**d**) Vic-2D results (

**e**) DICe results [11].

Software | 2D/3D | Approach | Language | OS | Code Repository |
---|---|---|---|---|---|

DICe | 2D/3D | Local/Global | C++ | Cross-platform | https://github.com/dicengine/dice |

dolphin_dic | 2D/3D | Global | Python | Cross-platform | https://bitbucket.org/mgenet/dolfin_dic/src/master/ |

Ncorr | 2D | Local | Matlab | Linux/Windows | https://github.com/justinblaber/ncorr_2D_matlab |

pydic | 2D | Local | Python | Cross-platform | https://gitlab.com/damien.andre/pydic |

pyxel | 2D | Global | Python | Cross-platform | https://github.com/jcpassieux/pyxel |

py2DIC | 2D | Local | Python | Cross-platform | http://github.com/Geod-Geom/py2DIC/ |

YaDICs | 2D/3D | Local/Global | C++ | Linux | http://yadics.univ-lille1.fr/wordpress/ |

Width (mm) | Height (mm) | Thickness (mm) |
---|---|---|

30 | 120 | 8 |

(px) | $\mathbf{\Delta}\mathit{u}$ py2DIC-Ncorr | $\mathbf{\Delta}\mathit{v}$ py2DIC-Ncorr |
---|---|---|

Mean | −0.0023 | −0.0027 |

Median | −0.0023 | −0.0027 |

Std.Dev | 0.0302 | 0.0389 |

RMSE | 0.0303 | 0.0390 |

NMAD | 0.0298 | 0.0416 |

LE68 | 0.0301 | 0.0400 |

LE95 | 0.0586 | 0.0740 |

(px) | $\mathbf{\Delta}\mathit{u}$ py2DIC-Vic-2D | $\mathbf{\Delta}\mathit{v}$ py2DIC-Vic-2D |
---|---|---|

Mean | −0.0048 | −0.0050 |

Median | −0.0050 | −0.0049 |

Std.Dev | 0.0303 | 0.0381 |

RMSE | 0.0307 | 0.0385 |

NMAD | 0.0298 | 0.0410 |

LE68 | 0.0302 | 0.0396 |

LE95 | 0.0588 | 0.0721 |

(px) | $\mathbf{\Delta}\mathit{u}$ py2DIC-DICe | $\mathbf{\Delta}\mathit{v}$ py2DIC-DICe |
---|---|---|

Mean | −0.0054 | −0.0033 |

Median | −0.0063 | −0.0033 |

Std.Dev | 0.0339 | 0.0411 |

RMSE | 0.0344 | 0.0412 |

NMAD | 0.0338 | 0.0431 |

LE68 | 0.0340 | 0.0422 |

LE95 | 0.0657 | 0.0785 |

(mm) | $\mathbf{\Delta}\mathit{u}$ py2DIC-Ncorr | $\mathbf{\Delta}\mathit{v}$ py2DIC-Ncorr |
---|---|---|

Mean | −0.0001 | 0.0002 |

Median | −0.0001 | 0.0002 |

Std.Dev | 0.0035 | 0.0055 |

RMSE | 0.0035 | 0.0055 |

NMAD | 0.0023 | 0.0041 |

LE68 | 0.0026 | 0.0044 |

LE95 | 0.0074 | 0.0112 |

(mm) | $\mathbf{\Delta}\mathit{u}$ py2DIC-Vic-2D | $\mathbf{\Delta}\mathit{v}$ py2DIC-Vic-2D |
---|---|---|

Mean | −0.0001 | 0.0004 |

Median | −0.0000 | 0.0002 |

Std.Dev | 0.0034 | 0.0058 |

RMSE | 0.0034 | 0.0058 |

NMAD | 0.0022 | 0.0039 |

LE68 | 0.0025 | 0.0043 |

LE95 | 0.0069 | 0.0114 |

(mm) | $\mathbf{\Delta}\mathit{u}$ py2DIC-DICe | $\mathbf{\Delta}\mathit{v}$ py2DIC-DICe |
---|---|---|

Mean | −0.0003 | −0.0004 |

Median | −0.0005 | −0.0002 |

Std.Dev | 0.0051 | 0.0075 |

RMSE | 0.0051 | 0.0075 |

NMAD | 0.0043 | 0.0067 |

LE68 | 0.0044 | 0.0068 |

LE95 | 0.0106 | 0.0150 |

© 2019 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**

Belloni, V.; Ravanelli, R.; Nascetti, A.; Di Rita, M.; Mattei, D.; Crespi, M.
py2DIC: A New Free and Open Source Software for Displacement and Strain Measurements in the Field of Experimental Mechanics. *Sensors* **2019**, *19*, 3832.
https://doi.org/10.3390/s19183832

**AMA Style**

Belloni V, Ravanelli R, Nascetti A, Di Rita M, Mattei D, Crespi M.
py2DIC: A New Free and Open Source Software for Displacement and Strain Measurements in the Field of Experimental Mechanics. *Sensors*. 2019; 19(18):3832.
https://doi.org/10.3390/s19183832

**Chicago/Turabian Style**

Belloni, Valeria, Roberta Ravanelli, Andrea Nascetti, Martina Di Rita, Domitilla Mattei, and Mattia Crespi.
2019. "py2DIC: A New Free and Open Source Software for Displacement and Strain Measurements in the Field of Experimental Mechanics" *Sensors* 19, no. 18: 3832.
https://doi.org/10.3390/s19183832