## 2 Methods and Materials
### Size and Depth Estimation Techniques  
Accurately measuring the depth, width, and length of detected defects in the aviation industry is a complex process. Manual tools, as discussed earlier, have limitations in precision and consistency. Automating this process improves reliability, consistency, and safety. The following section analyses three examples of depth measurement techniques researchers used for various aircraft defects. Additionally, two examples will demonstrate methods to estimate the width and length of detected defects. As described by [PERSON] et al. [20] the 3D scanning process was employed to measure dent depths on damaged aircraft panels by comparing the actual panel surface (represented as a 3D point cloud) with an approximated undamaged surface. As illustrated in Figure 14, this undamaged surface was digitally recreated using undisturbed regions of the panel. The comparison was performed using deviation analysis, which calculated dent depths as the perpendicular distance between the two surfaces. The analysis generated a colour map that clearly indicated the extent and depth of the dents. The method demonstrated reliable accuracy, with a maximum deviation of \(\pm\)0.06 mm for flat panels and \(\pm\)0.05 mm for curved panels. These results matched closely with measurements taken using traditional manual depth gauges but required significantly less inspection time. Additionally, the method was capable of supporting the detection of Barely Visible Impact Damage (BVID), a critical threshold in aviation maintenance standards. In another similar study, [PERSON] et al. [19] used the above approach to estimate the defect's depth. As shown in Figure 15, the process started by identifying undamaged surface areas. These regions acted as a reference for recreating the original geometry. A Weighted Least Squares (WLS) method was used to fit a smooth quadratic surface to these points, creating the ideal reference surface. The defect depth was then calculated by measuring the vertical difference between the ideal surface and the damaged surface. This difference, \(\Delta z\), followed the formula:  
\[\left|\Delta z\right|=\left|z_{\text{{\tiny{H}}deal}}-z_{\text{{\tiny{original }}}}\right| \tag{1}\]  
A colour-coded map highlighted depth variations across the surface. The method achieved high accuracy, with less than 10% error compared to standard measurements. Another way to estimate the pixel depth is to use photogrammetry and, more specifically, specialised software such as Meshroom [106] using the AliceVision framework, which applies a step-by-step process to calculate pixel depth in a scene. It starts by confirming the positions and angles of cameras using a method called Structure-from-Motion (SfM). This ensures that at least two images of the same area are available for comparison. The next step involves measuring pixel similarities across images using a technique known as Zero-Mean Normalized Cross-Correlation (ZNCC). These measurements help form an initial depth  
Figure 14: Illustration of the dent depth measurement [20]. map that combines local and global data for accuracy. The depth map is then refined by increasing its resolution and fine-tuning depth values through computational adjustments. To remove inaccuracies, the system aligns depth variations with visible features in the images, such as edges. The result is a detailed depth map, which can be visualised in both 2D and 3D. In a recent paper, [PERSON] et al. [35] developed a method to measure defects on aircraft surfaces using UAVs equipped with cameras and LiDAR. It started by capturing images with calibrated camera settings, including focal length, sensor dimensions, and LiDAR-measured distances. Grayscale conversion and Gaussian blurring reduced noise in the images. The method then applied Canny edge detection to identify edges, followed by dilation and erosion operations to refine contours. Pixel distances within defect contours were calculated for measurements like width and height.