# Algorithm for Fatigue Crack Initiation Assessment Based on Industrial Photogrammetry
## 2 Materials and Methods
### Crack Initiation Assessment  
A crack initiation assessment method was developed based on input data obtained using industrial photogrammetry, which allows non-contact data acquisition independent of the test subject. The aim of the development of the crack initiation assessment method based on industrial photogrammetry is the possibility of wide application in similar engineering tasks. In this work, a method was developed to support the fatigue tests of steel welded details, but this method can also be applied to other different purposes where it is necessary to monitor the small displacements and assess the cracks. The calculated displacements for each test imagery are automatically determined from the data using the algorithm described in the previous section (Figure 3). For the autonomous assessment of crack initiation using displacement data, various data interpolation methods are tested, e.g., the moving average, the moving minimum and maximum, and the approximation of the data by a polynomial of the nth degree. Moving averages, along with moving minimums and maximums, are used in a variety of fields, including finance, economics, weather forecasting, and engineering, primarily for analysis, forecasting, and decision making. These techniques help to smooth out short-term fluctuations and highlight long-term trends or cycles from time-series data [32]. The idea behind using moving averages for smoothing is that observations that are close in time also have a similar value. So, taking the average of points in the vicinity of an observation will give a reasonable estimate of the trend in that observation. The average eliminates some of the randomness in the data and leaves a smooth trend component. The sample size for group averages should be chosen so that a sufficient degree of memory of previous observations is retained to recognize a particular change in location at an early stage. Moving averages with a large sample size retain more memory of previous observations and thus provide early signals for small changes, while averages with a small sample size retain less memory of previous observations to signal large changes in the target quickly and efficiently [33]. Using the nth-degree polynomial approximation method, we determined the following: Due to the nature of the data, this polynomial will have its maxima. If the maxima are taken from the middle of the data, i.e., if the ends of the data, which are all unstable, are discarded, the representative maximum value of the growing material is obtained. Following [PERSON]'s statistical method presented in [11], the moment at which the value of the polynomial exceeds the maximum from the middle of the data for a certain percentage is sought, and this cycle is considered to be the detection of the crack of the test specimen, i.e., the critical value at which the crack begins. To ensure that the method is scientifically sound, tests and research were carried out on the optimum order of the polynomial and the percentage deviation of the critical value. The tests were carried out with polynomials of even order numbers from 4 to 40, and the values 3%, 5%, 7%, 10%, 13%, 15%, and 20% were taken as percentages [34]. It is worth noting that the influence of the nature of the data may result in one of the polynomials not providing a solution, as is the case with data with smaller oscillations and lower-degree polynomials, where the polynomial function does not change but resembles a line. Image processing was performed through the Idle interface using Python version 3.8, OpenCV library version 4.6.0, Pandas version 1.2.4, NumPy version 1.16.6, and Scikit-Image version 0.16.2. The input data of the algorithm are imageries in JPG format, the output data are records in CSV format, separated by a semicolon.