## 2 Methods
### Image Enhancement Algorithms  
Based on the modified area, image enhancement can be categorized as the local and global enhancement methods; more about the application of these methods on grayscale images can be found in [PERSON] et al. (2019). This study focuses on improving the image characteristics using the global instead of the local method, with the explanation as follows. Vision-based SHM has the capability of measuring multiple locations at the same time by tracking the movement of the artificial templates. In monitoring large-scale structures, these templates are distributed in the entire structure component as shown in Figure 2f. This means that these templates should be correctly identified in the image after the enhancement process. Local operations will be less efficient for this purpose as processing multiple targets is more time-consuming. These operations also result in noise and other types of spatial artifacts that will affect the background separation and feature detection, which requires clarity of the processed images. The mathematical fundamental of global image enhancement is to find the mapping function, \(\mathcal{F}\), to improve the quality of input image, \(I(x,y)\), to the optimum output image, \(O(x,y)\) as shown in Equation (1):  
\[O(x,y)=\mathcal{F}(I(x,y)) \tag{1}\]  
Figure 2: Underexposed and low-contrast images with their associated enhanced versions and identified gray level intensity (green): (**a**–**d**) images from high-speed cameras, (**e**–**f**) images from digital cameras, (**g**) normal image from a digital camera with a zoomed view of detected templates and gray level intensity. In this study, five global image enhancement algorithms as shown in Figure 1 are implemented to improve vision-based image quality. The algorithms are contrast stretching (CS) [71], contrast limited adaptive histogram equalization (CLAHE) [72], histogram equalization (HE), haze removal with an inverted operation (HRIO) [73], and with single dark channel prior (HRDC) [74]. To visualize how each method improves image characteristics, the examples of an underexposed input and enhanced output images are given in Figure 3 with their associated gray level histogram. The processed image size is of width, \(X=2560\) pixels, and height, \(Y=2048\) pixels. The histogram bins for monochrome images with bit \(n=8\) are defined as \(2^{n}=256\) ranging from the darkest gray value of zero to the brightest value of \(N=2^{n}-1=\)255. The gray distribution of the input image in Figure 3a shows a very low gray level intensity with several localized peaks near the top corner of the image from the light background. The contrast stretching (CS) algorithm in Figure 3a linearly scales these underexposed image pixel values between specified upper \(lim_{up}\) and lower limit \(lim_{low}\). The mathematical relationship of CS operation is given in Equation (2):  
\[O(x,y)=\frac{I(x,y)-lim_{low}}{lim_{up}-lim_{low}}\times N \tag{2}\]  
The example in Figure 3a is the output of the CS algorithm that defines the \(lim_{low}=\)0.01 pixel and \(lim_{up}=0.99\) pixel for 255 gray level intensity. This block finds these pixels and saturates the values above and below this limit. Of all the proposed methods, histogram equalization (HE) is the most commonly selected algorithm to improve monochrome images. The HE operation on a dark image can be expressed in Equation (3) as follows:  
\[O(x,y)=\{\mathcal{F}(I(x,y))|\forall I(x,y)\in I\} \tag{3}\]  
The transform function \(\mathcal{F}\) in Equation (3) is based on the cumulative density function (CDF) that maps the input image \(I(x,y)\) to the entire dynamic range \((I_{0}I_{N})\). The enhanced image using the HE method in Figure 3c shows that this method redistributes the probabil  
Figure 3: Underexposed input (**top-left**) and enhanced output images with their associated gray level histogram (**a–e**). ity of occurrence of the input gray level to make it uniform in the output image using the entire range of intensity level \(N\).